Skip to main content

Module transcode

Module transcode 

Source
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§

InputSpec
One input file for a job.
MapSpec
One -map entry: pick stream(s) from input input.
OutputSpec
The output file for a job.
StreamCodec
Per-stream codec selection for the output.
TranscodeReport
A successful run’s summary (frames/packets moved, etc.). Fields will grow as the pipeline does.
TranscodeSpec
A complete, declarative transcoding job.

Enums§

MapSelector
Which input stream(s) a -map entry selects.

Functions§

run
Resolve and run a transcode job against engine.