Documentation
¶
Overview ¶
Package render probes FFmpeg DVD menu capability and decodes exact-coordinate menu background frames selected by the pure-Go engine.
Index ¶
Constants ¶
View Source
const ( // MaxDiagnosticBytes bounds retained FFmpeg diagnostic output. MaxDiagnosticBytes = 64 << 10 // MaxFrameBytes bounds retained lossless frame output. MaxFrameBytes = 64 << 20 // MaxFrameWidth is the largest accepted decoded frame width. MaxFrameWidth = 4096 // MaxFrameHeight is the largest accepted decoded frame height. MaxFrameHeight = 4096 // MaxFramePixels bounds decoded frame allocation. MaxFramePixels = 16 << 20 )
Variables ¶
View Source
var ( // ErrCapability identifies missing or unusable FFmpeg dvdvideo support. ErrCapability = errors.New("FFmpeg lacks required DVD menu capability") // ErrFrame identifies invalid requests or failed DVD menu frame decoding. ErrFrame = errors.New("FFmpeg DVD menu frame decode failed") )
Functions ¶
func BuildArgs ¶
func BuildArgs(request FrameRequest) ([]string, error)
BuildArgs returns FFmpeg arguments with every dvdvideo input option before -i and no shell-built command string.
func DecodeFrame ¶
func DecodeFrame(ctx context.Context, runner Runner, executable string, request FrameRequest) (image.Image, error)
DecodeFrame invokes FFmpeg and decodes one lossless background image.
Types ¶
type Capability ¶
type Capability struct {
// Available reports that the dvdvideo demuxer and all required options were found.
Available bool
// Version is a bounded first line from FFmpeg's version output.
Version string
// Options contains the required dvdvideo options observed by the probe.
Options []string
}
Capability is safe engine diagnostic metadata without local paths.
type FrameRequest ¶
type FrameRequest struct {
// SourcePath is the host filesystem path of the extracted VIDEO_TS directory.
SourcePath string
// VTS selects zero for the manager domain or 1 through 99 for a title set.
VTS int
// LanguageUnit is the one-based FFmpeg dvdvideo language-unit index.
LanguageUnit int
// PGC is the one-based menu program-chain index.
PGC int
// Program is the one-based program index within PGC.
Program int
// Target is the non-negative seek offset within the selected program.
Target time.Duration
// Deinterlace enables FFmpeg's bwdif filter before frame extraction.
Deinterlace bool
}
FrameRequest contains inventory-validated FFmpeg dvdvideo coordinates.
Click to show internal directories.
Click to hide internal directories.