Inspecting Media Information
General FFmpeg Usage
Inspecting Media Information
4.1 Quick Inspection
ffprobe -hide_banner input.mp4Alternatively:
ffmpeg -hide_banner -i input.mp4When no output file is provided, ffmpeg -i exits with an error but still prints input media information. Automated applications should use ffprobe.
4.2 JSON Output
ffprobe \
-v error \
-show_format \
-show_streams \
-of json \
input.mp4Display only the codec, dimensions, and frame rate of the first video stream:
ffprobe \
-v error \
-select_streams v:0 \
-show_entries stream=codec_name,width,height,pix_fmt,r_frame_rate \
-of default=noprint_wrappers=1 \
input.mp4Display the media duration:
ffprobe \
-v error \
-show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 \
input.mp4
