[Live-devel] frame skiping during streaming

Andrew Voznytsa andrew.voznytsa at gmail.com
Sun Jan 28 06:21:56 PST 2007


Hello all,

Let's assume that in this case all frames are key frames (sync point/I 
frame/IDR frame/etc), fps is constant, size of each frame is constant.

Presentation time of any frame in terms of file timeline is frame index 
* MILLION / fps.

RTP presentation time is 'initial gettimeofday()' + file presentation time.

So consider next samples:

A)

1) I sent 0 frame from the file. Presentation time 0, duration = MILLION 
/ fps
2) I skip N frames
3) I sent N + 1 frame. Presentation time (N + 1) * MILLION / fps, 
duration = MILLION / fps
4) end of stream

B)

1) I sent 0 frame from the file. Presentation time 0. Decide N for step 
step 2, duration = (1 + N) * MILLION / fps
2) I skip N frames
3) I sent N + 1 frame. Presentation time (N + 1) * MILLION / fps, 
duration = MILLION / fps
4) end of stream

I noticed some problems with A. After consideration I got conclusion 
that I've to modify duration at step 1 (Sample B).

Before I start with implementation - could anyone confirm that it is 
right? Or, if I missed something, could you please point me in right 
direction?

-- 
Best regards,
Andrew Voznytsa


More information about the live-devel mailing list