ffmpegutil

FFmpeg utilities.

This module implements utilities for FFmpeg.

class ffmpegutil.CodecInfo(name: str, container_extension: str, options: List[str])

FFmpeg Codec information.

ffmpegutil.escape(s: str, *, characters="'\\") str

FFmpeg escaping: https://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping FFmpeg filtergraphs have complex escaping rules: https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping

ffmpegutil.ffprobe_avg_frame_rate(file_path: Path) float

Probe the avg_frame_rate entry of the first stream.

ffmpegutil.ffprobe_json(file_path: Path, arguments: List[str]) Dict[str, Any]

Run ffprobe.exe and parse JSON output.

ffmpegutil.ffprobe_json_format(file_path: Path) Dict[str, Any]

Run ffprobe.exe -show_format and parse JSON output.

ffmpegutil.ffprobe_json_streams(file_path: Path) Dict[str, Any]

Run ffprobe.exe -show_streams and parse JSON output.

ffmpegutil.run_ffmpeg(arguments: List[str], *, error_handling: bool = True, **kwargs) CompletedProcess

Run ffmpeg.exe as a subprocess.

ffmpegutil.run_ffprobe(arguments: List[str], **kwargs) CompletedProcess

Run ffprobe.exe as a subprocess.