0

If I run FFprobe on an .MKV file, with the simplest syntax of FFprobe "TheMovie.mkv", there is a lot of output I don't need to see. How do I limit the output of FFprobe to just the bitrate of the video stream?

I've researched the resources http://ffmpeg.org/ffprobe-all.html#Synopsis and https://hintsandmemories.wordpress.com/2014/04/16/ffprobe-help-output/
but these are bit steep for a simple history teacher, so I ask forgiveness for not being able to figure that out. Please help.

2 Answers 2

1

You can use something like this:

ffprobe -v error -select_streams v:0 -show_entries stream=bit_rate -of default=noprint_wrappers=1 "input.mp4"
4
  • Did you try this with MKV input? OP is asking about MKV, but your command will likely output bit_rate=N/A.
    – llogan
    Commented May 24, 2021 at 18:08
  • Thanks for reacting, but the result is bitrate = N/A while ffprobe "input.mkv" results in a bitrate 932Kb/s Please see my screenshot pasteboard.co/K3pukzl.jpg
    – GngrWtch
    Commented May 24, 2021 at 18:18
  • @llogan You're correct. Every MKV file with videocodec V_MPEG4/ISO/AVC, (according to MediaInfo) gets the output bit_rate=N/A . Files with video codec avc1 do get a resulting bitrate. Do you know any way to improve upon this?? When I use merely ffprobe, there's always an output where the bit rate is displayed in a very readable manner, 1 400 kb/s
    – GngrWtch
    Commented May 24, 2021 at 18:47
  • Sorry, didn't test it with mkv but thought that the result would be the same, I also get bit_rate=N/A with mkv file. Commented May 24, 2021 at 19:44
0

It seems that using the -hide_banner switch is doing the trick.

So, the command is gonna be:

ffprobe -i "input.mkv" -hide_banner

It's not a perfect solution, because then the output would JUST be the line with the bitrate in kb/s, but this will do. Any answers which do that, I will give them my blessing. This works on files with videocodec V_MPEG4/ISO/AVC, and video codec avc1. No "bit_rate=N/A" output-duds whatsoever.

Remarks:

  • This also works with ffmpeg, but it then starts to complain via error massage about output files.
  • Combined with a registry hack plus a batch file, it's possible to add this to the context menu. Which I have done.
  • Perhaps a modification could be made so it works on other formats like mp4 and avi, tóó, but that is for another time.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .