moviepy.video.io.ffmpeg_reader.ffmpeg_parse_infos#

moviepy.video.io.ffmpeg_reader.ffmpeg_parse_infos(filename, check_duration=True, fps_source='fps', decode_file=False, print_infos=False)[source]#

Get the information of a file using ffmpeg.

Returns a dictionary with next fields:

  • "duration"

  • "metadata"

  • "inputs"

  • "video_found"

  • "video_fps"

  • "video_n_frames"

  • "video_duration"

  • "video_bitrate"

  • "video_metadata"

  • "audio_found"

  • "audio_fps"

  • "audio_bitrate"

  • "audio_metadata"

  • "video_codec_name"

  • "video_profile"

Note that "video_duration" is slightly smaller than "duration" to avoid fetching the incomplete frames at the end, which raises an error.

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 must be read to retrieve their duration. This is needed for some files in order to get the correct duration (see Zulko/moviepy#1222).