Search code examples
h.264frame-rate

calculating the encoded framerate in H264


I have a video with an unknown frame rate. I need to calculate the frame rate it was encoded for. I am trying to calculate it using the data in SPS but I cannot decode it. The bitstream for the NAL is :

67 64 00 1e ac d9 40 a0 2f f9 61 00 00 03 00 7d 00 00 17 6a 0f 16 2d 96

From an online guide (http://www.cardinalpeak.com/blog/the-h-264-sequence-parameter-set/), I could figure out its profile and level fields, but to figure out everything after the "seq_parameter_set_id" field in the table, I need to know the ue(v). Here is where I get confused. According to this page the "ue(v)" should be called with the value v=32? (why?) What exactly should I feed into the exponential-golomb function? Do I read 32 digits from the beginning of the bitstream, or from after the previously read bytes, to regard it as the "seq_parameter_set_id"? ( My ultimate goal is to decode the VUI parameters so that I can recalculate the framerate.)

Thanks!


Solution

  • ue = Unsigned Exponential golomb coding.

    (v) = variable number of bits.

    http://en.wikipedia.org/wiki/Exponential-Golomb_coding