none
determining bitrate

    Question

  • i'm trying to extract the bitrates for encoded videos saved to disk.

     

    using a bit of Windows Media Player SDK, some IMediaDet, and DirectShow my program can pretty reliably retrieve width, height, fps, bitCount (per pixel), and duration.

     

    the problem is it can get bitrate for wmv and mpg, but not avi (divx/xvid)? a previous post mentioned watching how much data was going by ... but i'm not sure how to do that? any other techniques?

     

    Thanks,

    casey

    Tuesday, October 23, 2007 5:27 AM

Answers

  • Average bit-rate is nothing more than file_size / duration (* 8 for bits).  For more detailed statistics is needs to get information from the file header, but AVI doesn't store this information. 

     

    The only other option is to "play out" the entire file and watch the size of the compressed samples with a Sample Grabber.  You still have to do some short duration averaging because key frames are large and infrequent (1 to 8 seconds typically).

     

     

    Tuesday, October 23, 2007 4:25 PM

All replies

  • Average bit-rate is nothing more than file_size / duration (* 8 for bits).  For more detailed statistics is needs to get information from the file header, but AVI doesn't store this information. 

     

    The only other option is to "play out" the entire file and watch the size of the compressed samples with a Sample Grabber.  You still have to do some short duration averaging because key frames are large and infrequent (1 to 8 seconds typically).

     

     

    Tuesday, October 23, 2007 4:25 PM
  •  

    Thanks, i'll try the SampleGrabber technique to target the video bit rate.
    Wednesday, October 24, 2007 4:29 PM
  • Hi,

     

    I would like to know how to determine the bitrate of a network camera connected to my computer, is there any API available?

     

    Regards

    Abeer

    Tuesday, March 18, 2008 5:13 AM
  • hi casey,

    iam unable to get the height, width and bitrate of wmv file. How can get this.

    Thanks
    Kiran
    Wednesday, May 14, 2008 6:35 AM