View Full Version : Linux average bitrate calculation tool?


tux99
02-07-09, 08:17 AM
What's a simple tool (ideally command line) for Linux to calculate the average video bitrate of a VIDEO/TS, AVI or MKV movie?
Even better one that grafically displays the bitrate for the whole movie with peaks and lows.

Thanks!

Mac The Knife
02-08-09, 03:27 PM
You might try tcprobe and tcscan (part of the "transcode" package).

I've had limited luck with them. YMMV.

I hesitate to mention this, because I think it's probably a deadend. But mencoder produces a "statistics" file when it is performing a multipass encoding. I know it includes signal-to-noise info and I suspect it also includes bit-rate info too. So if you run your files through an high-speed first pass of mencoder, you might be able to extract the info you're interested in from the statistics file. Frankly, I think this would only be a viable option for the person who actually wrote the code that produces the statistics file.

tux99
02-09-09, 06:46 PM
Hmm, I couldn't get any proper average bitrate stats out of the tools you mention.
I'm surprised noone has done such a fairly simple tool for Linux yet.

CityK
02-09-09, 06:54 PM
Avidemux:

File > Information
Tools > Bitrate Histogram

tux99
02-09-09, 10:00 PM
thanks, that looks more like what I wanted, but I'm not sure I understand the numbers it gives, I assume it's kbps as it's numbers like 900, 1500, 4000?

But on a H264 mkv it gave me a max bitrate of 344000 and average of 4093?
The numbers look weird as that mkv is a dvd rip at 2000kbps...

CityK
02-22-09, 11:15 PM
Another neat tool, is Media info ... It won't give you a graphical historgram (or at least I'm unaware that it does), but it gives quick access to bitrate info, codec and container info .blah blah blah ... also, it integrates into your file manager for right click context info (or at least it does with Konqueror). A number of distros should have packages for it, if not, grab the source here: http://mediainfo.sourceforge.net/en

I did not link to it prior because it was busted at the time, however there was a fix pushed shortly afterwards and it is working as expected.

tux99
03-02-09, 01:02 AM
Another neat tool, is Media info ...

thanks for telling me about Mediainfo, I just installed it and I like it, it's what I was looking for (no graphs but I can live without them).

killsforpie
03-04-09, 11:59 AM
Nice tool. Thanks!