0

I am trying to find the bitrate value of a video using ffprobe as follows:

ffprobe -i sample_5.mkv -v quiet -show_entries stream=bit_rate -hide_banner -of default=noprint_wrappers=1:nokey=1

but all files have Mkv format and this command returns N/A. when I use ffmpeg -i input.mkv in the last line of output the bitrate value is shown. I do not know what is the problem. I need to have the bitrate value of each video. Could you please tell me how can I find it in python? Thank you.

david
  • 1,255
  • 4
  • 13
  • 26
  • Do you get a bitrate if you use `-show_entries format=bit_rate` instead? – bgfvdu3w Jul 11 '22 at 07:10
  • when I use subprocess in python ( a=subprocess.call(['ffprobe', '-i',pname1,'-v', 'quiet', '-show_entries', 'format=bit_rate', '-hide_banner', '-of', 'default=noprint_wrappers=1:nokey=1']) ) the output is 0 for all videos but when I used in command line the bitrate is true. do you know what is the problem? – david Jul 11 '22 at 08:10
  • I can't reproduce that issue. I get a bitrate output both when using Python and when using the command line. Maybe it's similar to [this](https://stackoverflow.com/questions/10034059/ffprobe-shows-bitrate-of-0-0-or-n-a-for-h264-stream) issue? – bgfvdu3w Jul 11 '22 at 18:46

0 Answers0