Documentation
¶
Index ¶
- type Artwork
- type AudioChannelLayout
- type Codec
- type DecodeRequest
- type Device
- type Filter
- type Format
- type FrameWriter
- type ListAudioChannelLayoutRequest
- type ListAudioChannelLayoutResponse
- type ListCodecRequest
- type ListCodecResponse
- type ListFilterRequest
- type ListFilterResponse
- type ListFormatRequest
- type ListFormatResponse
- type ListPixelFormatRequest
- type ListPixelFormatResponse
- type ListSampleFormatRequest
- type ListSampleFormatResponse
- type MediaType
- type Output
- type Packet
- type PixelFormat
- type ProbeRequest
- type ProbeResponse
- type RemuxRequest
- type RemuxResponse
- type Request
- type SampleFormat
- type Stream
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artwork ¶
type Artwork []byte
Artwork represents embedded artwork (cover art, thumbnails, etc.) as raw bytes. When JSON encoded, it is represented as a base64 string.
type AudioChannelLayout ¶
type AudioChannelLayout struct {
*ff.AVChannelLayout
}
func NewAudioChannelLayout ¶
func NewAudioChannelLayout(ch *ff.AVChannelLayout) *AudioChannelLayout
func (AudioChannelLayout) MarshalJSON ¶ added in v1.8.1
func (r AudioChannelLayout) MarshalJSON() ([]byte, error)
func (AudioChannelLayout) String ¶
func (r AudioChannelLayout) String() string
type Codec ¶
func (Codec) MarshalJSON ¶ added in v1.8.1
type DecodeRequest ¶ added in v1.8.1
type DecodeRequest struct {
Request // Embed base request (Input, Reader)
}
DecodeRequest specifies parameters for decoding media.
type Device ¶
type Filter ¶
func (Filter) MarshalJSON ¶
type Format ¶
type Format struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
MimeTypes []string `json:"mime_types,omitempty"` // MIME types
Extensions []string `json:"extensions,omitempty"` // File extensions
IsInput bool `json:"is_input"` // Is demuxer (input format)
IsOutput bool `json:"is_output"` // Is muxer (output format)
IsDevice bool `json:"is_device,omitempty"` // Is device format
Flags []string `json:"flags,omitempty"` // Format flags
MediaTypes []string `json:"media_types,omitempty"` // Supported media types: "video", "audio", "subtitle"
// Output format specific fields
DefaultVideoCodec string `json:"default_video_codec,omitempty"`
DefaultAudioCodec string `json:"default_audio_codec,omitempty"`
DefaultSubtitleCodec string `json:"default_subtitle_codec,omitempty"`
// Device specific fields
Devices []Device `json:"devices,omitempty"` // Available devices (for device formats)
}
func NewInputFormat ¶
func NewInputFormat(input *ff.AVInputFormat, isDevice bool) *Format
func NewOutputFormat ¶
func NewOutputFormat(output *ff.AVOutputFormat, isDevice bool) *Format
func (*Format) AddMediaType ¶
AddMediaType adds a media type to the format if not already present
func (*Format) SetDevices ¶
SetDevices adds device information to a format
type FrameWriter ¶ added in v1.8.1
FrameWriter is an optional interface that writers can implement to receive decoded frames directly instead of JSON output
type ListAudioChannelLayoutResponse ¶
type ListAudioChannelLayoutResponse []AudioChannelLayout
func (ListAudioChannelLayoutResponse) String ¶ added in v1.8.1
func (r ListAudioChannelLayoutResponse) String() string
type ListCodecRequest ¶
type ListCodecRequest struct {
Name string `json:"name,omitempty"` // Filter by codec name
Type string `json:"type,omitempty"` // Filter by media type: "video", "audio", "subtitle", "data"
IsEncoder *bool `json:"is_encoder,omitempty"` // Filter by encoder (true) or decoder (false), nil = no filter
}
type ListCodecResponse ¶
type ListCodecResponse []Codec
func (ListCodecResponse) String ¶ added in v1.8.1
func (r ListCodecResponse) String() string
type ListFilterRequest ¶
type ListFilterRequest struct {
Name string `json:"name"`
}
type ListFilterResponse ¶
type ListFilterResponse []Filter
func (ListFilterResponse) String ¶ added in v1.8.1
func (r ListFilterResponse) String() string
type ListFormatRequest ¶
type ListFormatRequest struct {
Name string `json:"name,omitempty"` // Filter by format name (partial match)
IsInput *bool `json:"is_input,omitempty"` // Filter by input format (demuxer)
IsOutput *bool `json:"is_output,omitempty"` // Filter by output format (muxer)
IsDevice *bool `json:"is_device,omitempty"` // Filter by device format
}
type ListFormatResponse ¶
type ListFormatResponse []Format
func (ListFormatResponse) String ¶ added in v1.8.1
func (r ListFormatResponse) String() string
type ListPixelFormatRequest ¶
type ListPixelFormatResponse ¶
type ListPixelFormatResponse []PixelFormat
func (ListPixelFormatResponse) String ¶ added in v1.8.1
func (r ListPixelFormatResponse) String() string
type ListSampleFormatRequest ¶
type ListSampleFormatResponse ¶
type ListSampleFormatResponse []SampleFormat
func (ListSampleFormatResponse) String ¶ added in v1.8.1
func (r ListSampleFormatResponse) String() string
type MediaType ¶ added in v1.8.1
type MediaType ff.AVMediaType
func (*MediaType) Equals ¶ added in v1.8.1
func (mt *MediaType) Equals(t ff.AVMediaType) bool
Equals checks if the MediaType equals the given AVMediaType
func (MediaType) MarshalJSON ¶ added in v1.8.1
type Packet ¶ added in v1.8.1
func (*Packet) MarshalJSON ¶ added in v1.8.1
type PixelFormat ¶
type PixelFormat struct {
ff.AVPixelFormat
}
func NewPixelFormat ¶
func NewPixelFormat(pixfmt ff.AVPixelFormat) *PixelFormat
func (PixelFormat) MarshalJSON ¶ added in v1.8.1
func (r PixelFormat) MarshalJSON() ([]byte, error)
func (PixelFormat) String ¶
func (r PixelFormat) String() string
type ProbeRequest ¶
type ProbeResponse ¶
type ProbeResponse struct {
Format string `json:"format"` // Format name (e.g., "mov,mp4,m4a,3gp,3g2,mj2")
Description string `json:"description,omitempty"` // Format description (e.g., "QuickTime / MOV")
MimeTypes []string `json:"mime_types,omitempty"` // MIME types
Duration float64 `json:"duration"` // Duration in seconds
Streams []*Stream `json:"streams,omitempty"` // Stream information
Metadata map[string]string `json:"metadata,omitempty"` // Metadata key-value pairs
Artwork []Artwork `json:"artwork,omitempty"` // Artwork images as raw bytes (JSON encodes as base64)
}
func (ProbeResponse) String ¶
func (r ProbeResponse) String() string
type RemuxRequest ¶
type RemuxRequest struct {
Request
Output
Streams []int `json:"streams,omitempty"` // Stream indices to include (empty = all streams)
CopyMetadata bool `json:"copy_metadata,omitempty"` // Copy existing metadata from source
CopyArtwork bool `json:"copy_artwork,omitempty"` // Copy existing artwork from source
Metadata map[string]string `json:"metadata,omitempty"` // Metadata to set (empty string value clears existing)
Artwork []Artwork `json:"artwork,omitempty"` // Artwork to add/replace
}
func (RemuxRequest) String ¶
func (r RemuxRequest) String() string
type RemuxResponse ¶
type RemuxResponse struct {
Format string `json:"format"` // Output format name
Duration float64 `json:"duration"` // Duration in seconds
Size int64 `json:"size"` // Total bytes written
Streams []Stream `json:"streams,omitempty"` // Stream information
Metadata map[string]string `json:"metadata,omitempty"` // Final metadata
Artwork []Artwork `json:"artwork,omitempty"` // Final artwork
}
func (RemuxResponse) String ¶
func (r RemuxResponse) String() string
type Request ¶
type Request struct {
Input string `json:"input" arg:""` // Input media file path
Reader io.Reader `json:"-" kong:"-"` // Reader for media data
InputFormat string `json:"input_format,omitempty" name:"input-format" help:"Input format name (e.g. mpegts)"`
InputOpts []string `json:"input_opts,omitempty" name:"input-opt" help:"Input format option key=value (repeatable)"`
}
type SampleFormat ¶
type SampleFormat struct {
ff.AVSampleFormat
}
func NewSampleFormat ¶
func NewSampleFormat(samplefmt ff.AVSampleFormat) *SampleFormat
func (SampleFormat) MarshalJSON ¶ added in v1.8.1
func (r SampleFormat) MarshalJSON() ([]byte, error)
func (SampleFormat) String ¶
func (r SampleFormat) String() string
Click to show internal directories.
Click to hide internal directories.