Expand description
Transcoding — the engine side of ffmpeg.
The pipeline is the classic FFmpeg shape:
demuxer ─▶ decoder ─▶ [filters] ─▶ encoder ─▶ muxer
(input) (raw frames pass through the middle) (output)TranscodeSpec is the declarative description of a job — inputs, an
output, and the codecs to use. run resolves that spec against an
Engine (finding the demuxer, decoders, encoders, and muxer) and then
drives the loop to completion.
Each input stream is either transcoded (decode → re-encode) when an
output codec is requested for its media type, or stream-copied
(remuxed packet-for-packet) when none is — the same -c:v copy distinction
FFmpeg draws. Video runs through the -vf filter graph (scale/crop); audio
is automatically resampled to a rate the target encoder accepts (FFmpeg’s
implicit aresample).
Structs§
- Input
Spec - One input file for a job.
- MapSpec
- One
-mapentry: pick stream(s) from inputinput. - Output
Spec - The output file for a job.
- Stream
Codec - Per-stream codec selection for the output.
- Transcode
Report - A successful run’s summary (frames/packets moved, etc.). Fields will grow as the pipeline does.
- Transcode
Spec - A complete, declarative transcoding job.
Enums§
- MapSelector
- Which input stream(s) a
-mapentry selects.
Functions§
- run
- Resolve and run a transcode job against
engine.