[FFmpeg-user] FFprobe scripting question

Rodney Baker rodney.baker at iinet.net.au
Fri Jun 15 09:35:11 CEST 2012

Hi all. Is there an easy way to use FFprobe in a script to get just the size 
or bitrate of a video stream? I have a video conversion script using FFmpeg 
and I want to make a decision on encoding bitrate based on whether or not the 
original stream is a HD (1440x1080) or SD (720x576) stream (as recorded from a 
dvb-t card). 

I know I could probably do it using something like 

ffprobe -show_streams 2>/dev/null  |  grep 'width' 

and then strip off the "width=" string but I was kind of hoping there might be 
an easier way to do it.

Thanks in advance,

Rodney Baker VK5ZTV
rodney.baker at iinet.net.au

More information about the ffmpeg-user mailing list