View Single Post
Old 30th June 2012, 13:53   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by ssuave View Post
I wonder how can we compute/extract bit-rate for each frame of an H.264 encoded video file?
Parse the bit-stream somehow and then collect this info but how?
If you want to create your own code for this, rather than using an existing utility to dump the frame sizes, you get the H.264 spec and read the part where it tells how to recognize the start of a new frame in the bitstream. Then you parse the bitstream to find these boundaries. The boundaries let you determine the frame sizes. You have the frame rate and so you have the time per frame. Now you have everything you need to calculate the bitrate for any frame.

If you are asking how to parse H.264, then that is also described in the spec.

There is sample code in the JM reference decoder that I used as the basis for the H.264 parsing in my tools.

Last edited by Guest; 30th June 2012 at 13:58.
Guest is offline   Reply With Quote