To use the ffprobe
command, you need to have FFmpeg installed on your system. Here’s how you can use ffprobe
to get information about a video file:
ffprobe {{video_file}}
Replace {{video_file}}
with the path to your video file.
By default, ffprobe
will provide detailed information about the video file, including the video and audio streams, codecs, duration, resolution, bit rate, and more.
If you want to extract specific information from the video file, you can use various options and filters with ffprobe
. Here are a few examples:
To display only the video stream information:
ffprobe -select_streams v -show_streams {{video_file}}
To display only the audio stream information:
ffprobe -select_streams a -show_streams {{video_file}}
To display only the video codec information:
ffprobe -select_streams v -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 {{video_file}}
To display only the video duration:
ffprobe -select_streams v -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 {{video_file}}
These are just a few examples of how you can use ffprobe
to extract specific information from a video file. You can refer to the ffprobe
documentation for more options and filters that you can use to customize the output according to your needs.