moviepy.video.io.ffmpeg_reader.FFmpegInfosParser#
- class moviepy.video.io.ffmpeg_reader.FFmpegInfosParser(infos, filename, fps_source='fps', check_duration=True, decode_file=False)[source]#
An (hopefully) robuste ffmpeg -i command option file information parser. Is designed to parse the output by extracting the different blocks of informations, based on the indentation, in order to create an easy to handle block tree
- Parameters:
filename -- Name of the file parsed, only used to raise accurate error messages.
infos -- Information returned by FFmpeg.
fps_source -- Indicates what source data will be preferably used to retrieve fps data.
check_duration -- Enable or disable the parsing of the duration of the file. Useful to skip the duration check, for example, for images.
decode_file -- Indicates if the whole file has been decoded. The duration parsing strategy will differ depending on this argument.
- class InfoBlock(block_line, indent_level=0)[source]#
Represents a block of output from ffmpeg, which can be an input file, stream, chapter or metadata.