profile

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedTarget = errors.New("unsupported target format")
	ErrUnsupportedInput  = errors.New("unsupported input")
	ErrMissingCapability = errors.New("required FFmpeg capability is missing")
	ErrUnsupportedPreset = errors.New("unsupported preset")
)

Functions

func Verify

func Verify(plan media.Plan, info media.Info) error

Types

type Registry

type Registry struct{}

func (Registry) Formats

func (Registry) Formats() []SupportedFormat

func (Registry) Plan

func (Registry) Plan(inputPath, outputPath, target, preset string, info media.Info, capabilities media.Capabilities) (media.Plan, error)

func (Registry) Target added in v0.6.0

func (Registry) Target(name string) (Target, bool)

Target looks up one output format by name.

func (Registry) TargetNames added in v0.6.0

func (Registry) TargetNames() []string

TargetNames lists the supported output formats, for error messages.

func (Registry) Targets added in v0.6.0

func (Registry) Targets() []Target

Targets lists every supported output format.

type SupportedFormat

type SupportedFormat struct {
	Source      string `json:"source"`
	Target      string `json:"target"`
	Profile     string `json:"profile"`
	VideoCodec  string `json:"video_codec"`
	AudioCodec  string `json:"audio_codec"`
	Description string `json:"description"`
}

type Target added in v0.6.0

type Target struct {
	Name          string
	DefaultPreset string
	// BatchExtensions are the input extensions `mediaconv batch` picks up for
	// this target. The target's own extension is deliberately absent, so a
	// batch never converts a file onto itself. A single `convert` is less
	// restrictive: re-encoding an MP4 to MP4 is a legitimate request.
	BatchExtensions []string
}

Target is an output format the registry can plan for. It is the single source of truth: internal/app asks here instead of keeping its own copy of the list, so adding a format stays inside this package, as ADR 0003 intends.

Jump to

Keyboard shortcuts

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