Documentation
¶
Index ¶
- func OpenReader(parsed *ParsedURL) (*ffmpeg.Reader, error)
- func OpenReaderFromURL(input string) (*ffmpeg.Reader, error)
- type Manager
- func (m *Manager) AudioFingerprint(ctx context.Context, req *chromaprintschema.AudioFingerprintRequest) (*chromaprintschema.AudioFingerprintResponse, error)
- func (m *Manager) Decode(ctx context.Context, w io.Writer, req *schema.DecodeRequest) error
- func (m *Manager) ListAudioChannelLayouts(_ context.Context, req *schema.ListAudioChannelLayoutRequest) (schema.ListAudioChannelLayoutResponse, error)
- func (manager *Manager) ListCodecs(_ context.Context, req *schema.ListCodecRequest) (schema.ListCodecResponse, error)
- func (manager *Manager) ListFilters(_ context.Context, req *schema.ListFilterRequest) (schema.ListFilterResponse, error)
- func (manager *Manager) ListFormats(_ context.Context, req *schema.ListFormatRequest) (schema.ListFormatResponse, error)
- func (manager *Manager) ListPixelFormats(_ context.Context, req *schema.ListPixelFormatRequest) (schema.ListPixelFormatResponse, error)
- func (manager *Manager) ListSampleFormats(_ context.Context, req *schema.ListSampleFormatRequest) (schema.ListSampleFormatResponse, error)
- func (m *Manager) Probe(_ context.Context, req *schema.ProbeRequest) (*schema.ProbeResponse, error)
- func (m *Manager) Remux(ctx context.Context, w io.Writer, req *schema.RemuxRequest) (*schema.RemuxResponse, error)
- type Opt
- type ParsedURL
- type TraceFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenReader ¶ added in v1.8.1
OpenReader creates a Reader from a parsed media URL
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AudioFingerprint ¶
func (m *Manager) AudioFingerprint(ctx context.Context, req *chromaprintschema.AudioFingerprintRequest) (*chromaprintschema.AudioFingerprintResponse, error)
AudioFingerprint generates an audio fingerprint and optionally performs AcoustID lookup
func (*Manager) Decode ¶ added in v1.8.1
Decode decodes media from a file or reader. If the writer implements FrameWriter, frames are passed directly to WriteFrame(). Otherwise, frame metadata is written as JSON to the writer.
The context can be used to cancel decoding.
func (*Manager) ListAudioChannelLayouts ¶
func (m *Manager) ListAudioChannelLayouts(_ context.Context, req *schema.ListAudioChannelLayoutRequest) (schema.ListAudioChannelLayoutResponse, error)
Probe a media file or stream and return information about its format and streams
func (*Manager) ListCodecs ¶
func (manager *Manager) ListCodecs(_ context.Context, req *schema.ListCodecRequest) (schema.ListCodecResponse, error)
Return all supported codecs
func (*Manager) ListFilters ¶
func (manager *Manager) ListFilters(_ context.Context, req *schema.ListFilterRequest) (schema.ListFilterResponse, error)
Return all supported filters
func (*Manager) ListFormats ¶
func (manager *Manager) ListFormats(_ context.Context, req *schema.ListFormatRequest) (schema.ListFormatResponse, error)
Return all supported formats (input/output formats and devices)
func (*Manager) ListPixelFormats ¶
func (manager *Manager) ListPixelFormats(_ context.Context, req *schema.ListPixelFormatRequest) (schema.ListPixelFormatResponse, error)
Return all supported pixel formats
func (*Manager) ListSampleFormats ¶
func (manager *Manager) ListSampleFormats(_ context.Context, req *schema.ListSampleFormatRequest) (schema.ListSampleFormatResponse, error)
Return all supported sample formats
func (*Manager) Probe ¶
func (m *Manager) Probe(_ context.Context, req *schema.ProbeRequest) (*schema.ProbeResponse, error)
Probe a media file or stream and return information about its format and streams
func (*Manager) Remux ¶
func (m *Manager) Remux(ctx context.Context, w io.Writer, req *schema.RemuxRequest) (*schema.RemuxResponse, error)
Remux remuxes media streams from input to output without re-encoding. The writer must implement io.Writer and can optionally implement schema.Writer for enhanced feedback (progress and logging)
type Opt ¶
type Opt func(*opts) error
Opt is a functional option for configuring the Manager
func WithChromaprintKey ¶
WithChromaprintKey sets the AcoustID API key for chromaprint operations
func WithTraceFn ¶
WithTraceFn sets a tracing function for logging
type ParsedURL ¶ added in v1.8.1
type ParsedURL struct {
Scheme string // URL scheme (file, http, https, rtmp, device, etc.)
Path string // File path, URL, or device identifier
Format string // Format name (for device:// URLs)
Options map[string]string // Query parameters as device options
IsDevice bool // True if this is a device URL
IsNetwork bool // True if this is a network stream
}
ParsedURL represents a parsed media URL with device/format information
func ParseMediaURL ¶ added in v1.8.1
ParseMediaURL parses a media URL and extracts device/format information Supports:
- Regular file paths: /path/to/file.mp4, ./file.mp4, file.mp4
- Network streams: http://..., https://..., rtmp://...
- Device URLs: device://format/device-path?options
Examples:
- device://avfoundation/0:0
- device://avfoundation/Logitech%20StreamCam:ZoomAudioDevice?framerate=30
- device://v4l2//dev/video0
- device://alsa/hw:0