media

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: 4 Imported by: 0

Documentation

Overview

Package media defines provider-neutral media metadata probing contracts.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidInput       = errors.New("media: invalid input")
	ErrInputUnavailable   = errors.New("media: input unavailable")
	ErrBinaryUnavailable  = errors.New("media: binary unavailable")
	ErrVersionUnsupported = errors.New("media: version unsupported")
	ErrProbeFailed        = errors.New("media: probe failed")
	ErrOutputInvalid      = errors.New("media: invalid probe output")
	ErrOutputLimit        = errors.New("media: output limit exceeded")
)

Functions

This section is empty.

Types

type AudioStream

type AudioStream struct {
	Index         int
	Codec         string
	Profile       string
	SampleRate    int
	Channels      int
	ChannelLayout string
	Language      string
}

type Error

type Error struct {
	Operation string
	Summary   string
	Err       error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Info

type Info struct {
	Container       string
	ContainerLong   string
	Duration        time.Duration
	SizeBytes       int64
	BitRate         int64
	VideoStreams    []VideoStream
	AudioStreams    []AudioStream
	SubtitleStreams []SubtitleStream
}

type Input

type Input struct {
	Path string
}

type ProbeOptions

type ProbeOptions struct {
	OutputLimit int64
}

type Prober

type Prober interface {
	Probe(ctx context.Context, input Input, opts ProbeOptions) (Info, error)
}

type SubtitleStream

type SubtitleStream struct {
	Index    int
	Codec    string
	Language string
	Title    string
}

type VideoStream

type VideoStream struct {
	Index                int
	Codec                string
	Profile              string
	Width                int
	Height               int
	PixelFormat          string
	FrameRate            float64
	FrameRateRatio       string
	Rotation             int
	ColorRange           string
	ColorSpace           string
	ColorTransfer        string
	ColorPrimaries       string
	HighDynamicRange     bool
	HighDynamicRangeType string
	Language             string
}

Directories

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

Jump to

Keyboard shortcuts

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