[Live-devel] fDurationInMicroseconds

Dan Weber dweber at robotics.net
Wed May 30 11:22:29 PDT 2007


33333 should be the appropriate value as long as you're timing
each frame once.  If each slice is part of a single frame,
they must all carry the same presentation timestamp, and
the duration of every frame up until the slice that completes,
the frame should be 0.

Dan

On Wed, May 30, 2007 at 08:46:59AM -0700, Abe Friesen wrote:
> 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
> 
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel


More information about the live-devel mailing list