1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MPEG bitrate extraction

Discussion in 'Other video questions' started by hata7up, Mar 7, 2004.

  1. hata7up

    hata7up Member

    Joined:
    Mar 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    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!!
     
  2. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,768
    Likes Received:
    0
    Trophy Points:
    116
    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
     
  3. hata7up

    hata7up Member

    Joined:
    Mar 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    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.
     
  4. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,768
    Likes Received:
    0
    Trophy Points:
    116
    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
     
  5. hata7up

    hata7up Member

    Joined:
    Mar 7, 2004
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    11
    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
     
  6. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,768
    Likes Received:
    0
    Trophy Points:
    116
    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
     

Share This Page