Determine video bitrate using ffmpeg

The video bitrate is displayed in the video stream info. The format info contains the bitrate for all streams plus muxing overhead.

If the video bitrate is missing, then a dirty way to get that value is by subtracting the bitrate of all other streams from the total bitrate.

If that's not viable, a cumbersome method is to run ffprobe to show packet sizes and stream duration and then calculating the bitrate by summing all lines except the last one, and dividing by the value in the last line.

ffprobe -select_streams v -show_entries packet=size:stream=duration -of compact=p=0:nk=1 video.mp4

Output:

4199      
2627      
1792      
3921      
2993      
...  
2301      
3076
2879
1543.00000

Of course, this is a last resort solution, and only applicable if the video stream info does not sport a bitrate and estimating the bitrate by discounting the rate of all other streams is not possible either.