[Live-devel] fDurationInMicroseconds
Abe Friesen
abefriesen at itiva.com
Wed May 30 08:46:59 PDT 2007
I've written my own H264 Framer and ByteStreamFileSource to read Annex B
encoded H264 data from a file. However, I am having difficulties setting a
proper value for fDurationInMicroseconds. I have been unable to determine
the framerate from the video data but I know that it was encoded at 30 fps
with an I-frame (nalu type = 5) every 10th frame. Furthermore, each frame is
made up of 8 slices (8 separate NALUs). Thus, it would seem that the
calculation for fDurationInMicroseconds would be as follows:
framerate = 30 fps => 1/30 secs/frame = 0.0333333 secs/frame = 33333
us/frame => divide by 8 for the number of slices per frame = 33333 / 8 =
~4166 us/slice
However, when I set this value, the video plays back too fast. And,
obviously, setting the value to 33333 makes it play back too slow. The
optimal value seems to be around 10000-13000.
Thanks,
Abe
More information about the live-devel
mailing list