Documentation
¶
Index ¶
- type AudioFingerprintLookupRequest
- type AudioFingerprintLookupResponse
- type AudioFingerprintRequest
- type AudioFingerprintResponse
- type Codec
- type Device
- type Filter
- type Format
- type ListCodecRequest
- type ListCodecResponse
- type ListFilterRequest
- type ListFilterResponse
- type ListFormatRequest
- type ListFormatResponse
- type MediaType
- type Meta
- type MetaItem
- type ProbeRequest
- type ProbeResponse
- type SegmentAudioRequest
- type Source
- type Stream
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AudioFingerprintLookupResponse ¶
type AudioFingerprintLookupResponse struct {
Matches [][]*chromaprintschema.ResponseMatch `json:"matches,omitempty"` // AcoustID matches
}
func (AudioFingerprintLookupResponse) String ¶
func (r AudioFingerprintLookupResponse) String() string
type AudioFingerprintRequest ¶
type AudioFingerprintRequest struct {
Input string `json:"input,omitempty"` // 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. s16le)"`
InputOpts []string `json:"input_opts,omitempty" name:"input-opt" help:"Input format option key=value (repeatable)"`
Duration float64 `json:"duration,omitempty"` // Full track duration in seconds (0 = auto-detect)
}
type AudioFingerprintResponse ¶
type AudioFingerprintResponse struct {
Fingerprint string `json:"fingerprint"` // Audio fingerprint string
Duration float64 `json:"duration"` // Track duration in seconds
}
func (AudioFingerprintResponse) String ¶
func (r AudioFingerprintResponse) String() string
type Codec ¶
func (Codec) MarshalJSON ¶
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"`
Extensions []string `json:"extensions,omitempty"`
IsInput bool `json:"is_input"`
IsOutput bool `json:"is_output"`
IsDevice bool `json:"is_device,omitempty"`
Flags []string `json:"flags,omitempty"`
MediaTypes []string `json:"media_types,omitempty"`
DefaultVideoCodec string `json:"default_video_codec,omitempty"`
DefaultAudioCodec string `json:"default_audio_codec,omitempty"`
DefaultSubtitleCodec string `json:"default_subtitle_codec,omitempty"`
Devices []Device `json:"devices,omitempty"`
Opts []*ff.AVOption `json:"options,omitempty"`
}
func NewInputFormat ¶
func NewInputFormat(input *ff.AVInputFormat, isDevice bool) *Format
func NewOutputFormat ¶
func NewOutputFormat(output *ff.AVOutputFormat, isDevice bool) *Format
func (*Format) AddMediaType ¶
func (*Format) SetDevices ¶
type ListCodecRequest ¶
type ListCodecRequest struct {
Name string `json:"name,omitempty" help:"Filter by codec name (partial match)"`
Type string `json:"type,omitempty" help:"Filter by media type: video, audio, subtitle, data"`
IsEncoder *bool `json:"is_encoder,omitempty" help:"Filter by encoder (true) or decoder (false)"`
}
type ListCodecResponse ¶
type ListCodecResponse []Codec
func (ListCodecResponse) String ¶
func (r ListCodecResponse) String() string
type ListFilterRequest ¶
type ListFilterRequest struct {
Name string `json:"name" help:"Filter by filter name (partial match)"`
}
type ListFilterResponse ¶
type ListFilterResponse []Filter
func (ListFilterResponse) String ¶
func (r ListFilterResponse) String() string
type ListFormatRequest ¶
type ListFormatRequest struct {
Name string `json:"name,omitempty" help:"Filter by format name (partial match)"`
IsInput *bool `json:"is_input,omitempty" help:"Filter by input format (demuxer)"`
IsOutput *bool `json:"is_output,omitempty" help:"Filter by output format (muxer)"`
IsDevice *bool `json:"is_device,omitempty" help:"Filter by device format"`
}
type ListFormatResponse ¶
type ListFormatResponse []Format
func (ListFormatResponse) String ¶
func (r ListFormatResponse) String() string
type MediaType ¶
type MediaType ff.AVMediaType
func (*MediaType) Equals ¶
func (mt *MediaType) Equals(t ff.AVMediaType) bool
Equals checks if the MediaType equals the given AVMediaType.
func (MediaType) MarshalJSON ¶
type MetaItem ¶
type MetaItem struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"`
MetaKey string `json:"key,omitempty" yaml:"key,omitempty"`
MetaValue any `json:"value,omitempty" yaml:"value,omitempty"`
gomedia.Metadata `json:"-" yaml:"-"`
}
func (MetaItem) MarshalJSON ¶
func (MetaItem) MarshalYAML ¶
type ProbeRequest ¶
type ProbeRequest struct {
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 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
}
func (ProbeResponse) String ¶
func (r ProbeResponse) String() string
type SegmentAudioRequest ¶
type SegmentAudioRequest struct {
Reader io.Reader `json:"-" kong:"-"`
OutputDir string `json:"output_dir,omitempty" name:"out" help:"Output directory for encoded segment M4A files."`
Duration time.Duration `json:"duration,omitempty" name:"duration" help:"Target segment duration (e.g. 30s). Use 0s to disable fixed-size splits."`
Silence bool `json:"silence" name:"silence" help:"Enable silence-based segmentation." negatable:"" default:"true"`
SilenceDuration time.Duration `` /* 168-byte string literal not displayed */
SilenceThreshold float64 `` /* 172-byte string literal not displayed */
}
type Source ¶
type Source interface {
// Streams describes each stream's raw format, in the same order
// Encoder.Add / Writer.Create expect — stream ID equals slice index. A
// source's own Profile typically resolves to a raw codec (pcm_f32le,
// rawvideo, ...) rather than a compressed one.
Streams() []profile.Profile
// NextFrame blocks until the next frame is ready, ctx is cancelled, or
// the source has no more frames (io.EOF). Frames are paced by the
// source itself — callers just pull in a loop.
NextFrame(ctx context.Context) (frame.Frame, error)
// Close releases resources the source holds (file handles, devices, ...).
Close() error
}
Source produces frames for one or more streams until ctx is cancelled or the source naturally ends. It is the abstract input side of an encoding job — a live capture, a file, or a fallback generator like a test card — so a job can be built once and swap sources without restarting the encoder.
type Stream ¶
Stream wraps pkg/ffmpeg/schema Stream and adds CLI table formatting helpers.
func WrapStream ¶
func (Stream) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.