ffprobe

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package ffprobe implements media.Prober with a local ffprobe executable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Name        string
	Args        []string
	OutputLimit int64
}

type Config

type Config struct {
	BinaryPath  string `mapstructure:"binary_path" yaml:"binary_path"`
	MinVersion  string `mapstructure:"min_version" yaml:"min_version"`
	MaxVersion  string `mapstructure:"max_version" yaml:"max_version"`
	OutputLimit int64  `mapstructure:"output_limit" yaml:"output_limit"`
}

type Driver

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

func New

func New(ctx context.Context, cfg Config, opts ...Option) (*Driver, error)

func (*Driver) Probe

func (d *Driver) Probe(ctx context.Context, input media.Input, opts media.ProbeOptions) (media.Info, error)

func (*Driver) Version

func (d *Driver) Version() string

type ExecRunner

type ExecRunner struct{}

func (ExecRunner) RunOutput

func (ExecRunner) RunOutput(ctx context.Context, command Command) (Result, error)

type Option

type Option func(*options)

func WithRunner

func WithRunner(runner Runner) Option

type Result

type Result struct {
	Stdout []byte
	Stderr []byte
}

type Runner

type Runner interface {
	RunOutput(ctx context.Context, command Command) (Result, error)
}

Jump to

Keyboard shortcuts

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