Hi all! I want to make a c++ program which will extract the bitrate from MPEG video files. I'm also wanting to extract other information such as total playing time. For those with programing knowledge and MPEG codec knowledge, can you please give me some insight on how to do this? Thanks!!
No such a Thing...You must mean you want to find out the Bitrate of the Mpeg file you have?? Well the Max and Min Bitrates of a Mpeg file are Inbeded in the header of the mpeg File But the actual Bitrates of every Frame have to be analized useing a Bitrate Viewer.. I use a Program called "Terac Bitrate Viewer" maybe you can decompile the Program and figure out how it works but you would Probably need a Very advanced Knowlege of the Structure of Mpeg files becides haveing advanced Programming skills...Well Good Luck
Thanks for the reply, Are all MPEG files (ie: MPEG 1/2/4) variable bit rate... or are some fixed bit rate? Since extracting bitrate is very difficult, is there an easier way to extract the total playing time (length) of the MPEG file? With that, at least I can approximate a bitrate with the file size and playing time.
Mpeg1 and Mpeg2 are Totally Different From Mpeg4 so theory"s that work for Mpeg 1/2 will not nescessarilly work with Mpeg4....Both Mpeg1 and 2 can use Both Constant Bitrate or Variable Bitrate but even Constant Bitrates Fluctuate a Little Bit...There are quite a Few Tools that you can use to find out the Bitrate of your Mpeg1/2 file like the Bitrate Viewer I mentioned Before, If you go here : http://www.tecoltd.com/bitratev.htm You can download a Bitrate Viewer that will tell you the Bitrate used to encode your Mpeg files...Cheers
Hi, You mentioned that the max and min bitrates of an mpeg file are imbedded in the header. Would you happen to have a link or something that shows the header structure for mpeg 1/2 (video) files? I can only find audio mpeg header information... (ie: mp3). Thanks
Sory I can not help you there but you Might try a Hex editor and Look the the Appropriate Values in the Header...There is a Program Called "DVD Patcher" that can read the headers of Mpeg2 files and even Change some of the headers Information Like the Frame Rate and Aspect ratio and Bitrate and Resolution, so if you can Decompile that program then you can Probably find out were the Bitrate Values in the headers are or you can use it on a Mpeg2 file and then see were the changes have been Made to the Mpeg2 file ...well good Luck