ffprobes3 package¶
Classes and methods¶
Python3 wrapper for ffprobe command line tool. ffprobe must exist in the path.
-
class
ffprobes3.
FFProbes3
(video_file)[source]¶ FFProbes3 wraps the ffprobe command and pulls the data into an object. For example: metadata = FFProbes3(“this_is_a_multimedia_file.mp4’)
-
class
ffprobes3.
FFStream
(data_lines)[source]¶ An object representation of an individual stream in a multimedia file.
FFStream
objects are created fromFFProbes3
as it reads the file. The constructor creates a dynamic list of attributes, based on the “xx = yy” format of ffprobe’s text output.For example, two lines of ffprobe’s output like these:
avg_frame_rate=0/0 time_base=1/48000
will generate these
FFStream
’s attributes:avg_frame_rate time_base
with these values:
0/0 1/48000
Parameters: data_lines (list) – list of lines from the output obtained from ffprobe -
duration_seconds
()[source]¶ Returns the runtime duration of the video stream as a floating point number of seconds. Returns 0.0 if not a video stream.
-