[Live-devel] fDurationInMicroseconds

Abe Friesen abefriesen at itiva.com
Wed May 30 12:25:37 PDT 2007


Ah, that makes a lot more sense, thanks for the reply. I had tried that but
had stupidly set fDurationInMicroseconds to 33333 on the first slice of the
frame instead of the last slice which produced terribly choppy video
(obviously).

Strangely, the video seems to play at the correct speed if I now use
66666.66 as the duration (and 33333 is obviously twice as fast). Odds are
that I'm just doing something else that's dumb.

Currently, to determine whether the current slice is the end of a frame, I
have a terrible hard-coded check (will only work for the video I'm testing
with) that checks if the address of the first macroblock in the slice is
1050 (which is the last mb address in the slices in my video). Is there a
way to determine this without pulling in the next NALU to check if the frame
number changes? Is there a way to determine whether this slice ends an
access unit without pulling in the next NALU?

>From the specs, it looks like I will need to compare data between two NALUs
to determine the above. Are there any examples in live555 for pulling in two
frames (NALUs in this case) at the start and then swapping buffers every
subsequent time? Will this fit in easily with the live555 design or will it
be really ugly?


Thanks,
Abe


-----Original Message-----
From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Dan Weber
Sent: Wednesday, May 30, 2007 11:22 AM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] fDurationInMicroseconds


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
_______________________________________________
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