Progress
A parsed progress snapshot from ffmpeg’s-progress pipe:1 output.
This struct contains real-time information about the encoding process, including frame count, encoding speed, bitrate, and overall progress state.
Number of frames processed so far.
Current encoding speed in frames per second.
Current bitrate in bytes per second.
Total output size in bytes.
Elapsed output time (position in the output stream).
Number of duplicated frames.
Number of dropped frames.
Encoding speed as a multiplier of realtime (e.g. 2.0 = 2x realtime).
Whether ffmpeg is still processing or has finished.
Example
PartialProgress
Accumulator for parsing ffmpeg’s-progress pipe:1 output line by line.
Feed lines via with_line(), then call finish() once a complete progress block has been received to produce a Progress snapshot.
Accumulated frame count.
Accumulated frames per second value.
Accumulated bitrate string (e.g., “1234kbits/s”).
Accumulated total output size.
Accumulated output time in microseconds.
Accumulated duplicated frame count.
Accumulated dropped frame count.
Accumulated speed string (e.g., “2.5x”).
Current progress state.
Methods
with_line
key=value line from ffmpeg’s progress output.
Returns true if the line was recognized (or intentionally ignored), false if the key was completely unknown.
finish
Progress snapshot from the accumulated state.
Returns None if no progress= line has been received yet, or if the bitrate value could not be parsed.
Example
ProgressState
The state reported in ffmpeg’sprogress= line.
Variants
ffmpeg is continuing to process the input. More progress updates are expected.
ffmpeg has finished processing. This is the final progress update.
An unrecognized progress state was reported.Fields:
String- The raw, unrecognized state value
Example
PartialProgressState
Internal state tracking forPartialProgress accumulation.
Variants
Progress state is set to “continue”.
Progress state is set to “end”.
An unrecognized progress state value was encountered.Fields:
String- The raw, unrecognized state value
No progress state has been set yet (initial state).