Top FFprobe Commands to Get Video Information

Get video width and height:

ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=width,height input.avi

Get audio channels:

ffprobe -v error -of flat=s=_ -select_streams a:0 -show_entries stream=channels input.avi

Get audio bit rate:

ffprobe -v error -of flat=s=_ -select_streams a:0 -show_entries stream=bit_rate input.avi

Get video stream duration:

ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal input.avi

Get entire video duration:

ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 -sexagesimal input.avi

Get frame rate of video stream:

ffprobe -v error -select_streams v:0 -show_entries stream=avg_frame_rate -of default=noprint_wrappers=1:nokey=1 input.avi

Get all streams details:

ffprobe -v error -show_format -show_streams input.avi

Get output in JSON:

ffprobe -v quiet -print_format json -show_format -show_streams "input.avi" > "input.avi.json"

More information:

FFprobeTips – FFmpeg

More Related Posts