task

package
v1.8.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenReader added in v1.8.1

func OpenReader(parsed *ParsedURL) (*ffmpeg.Reader, error)

OpenReader creates a Reader from a parsed media URL

func OpenReaderFromURL added in v1.8.1

func OpenReaderFromURL(input string) (*ffmpeg.Reader, error)

OpenReaderFromURL is a convenience function that parses and opens in one call

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(opt ...Opt) (*Manager, error)

func (*Manager) AudioFingerprint

AudioFingerprint generates an audio fingerprint and optionally performs AcoustID lookup

func (*Manager) Decode added in v1.8.1

func (m *Manager) Decode(ctx context.Context, w io.Writer, req *schema.DecodeRequest) error

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

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

Return all supported pixel formats

func (*Manager) ListSampleFormats

Return all supported sample formats

func (*Manager) Probe

Probe a media file or stream and return information about its format and streams

func (*Manager) Remux

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

func WithChromaprintKey(key string) Opt

WithChromaprintKey sets the AcoustID API key for chromaprint operations

func WithTraceFn

func WithTraceFn(fn TraceFn, verbose bool) Opt

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

func ParseMediaURL(input string) (*ParsedURL, error)

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

type TraceFn

type TraceFn func(v string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL