[Live-devel] frame skiping during streaming

Ross Finlayson finlayson at live555.com
Sun Jan 28 11:12:30 PST 2007


>Sorry, I misunderstood or it won't work.
>
>If after sending frame 0 I skip N frames and assign presentation time
>1*MILLION/fps for N+1 frame then I'll just lose audio/video sync because
>I'm not skipping audio samples.
>
>(Skipping was meant for video only, source media has two streams: audio
>and video).

OK, that was an important piece of information that should have been 
mentioned before.  In this case, then, each video frame's 
presentation time needs to match that of the audio frame with which 
it is synchronized.

*In principle*, the "fDurationInMicroseconds" value for a frame 
should be the difference in presentation times between this frame, 
and the next frame that you'll send.  However, I can see that this 
would be difficult if you don't know in advance which future frames 
you're going to be skipping.

*In practice*, however, for (outgoing) RTP streaming, the 
"fDurationInMicroseconds" value serves only to tell the 
"MultiFramedRTPSink" class how long to wait, after sending each 
packet, before asking the input source for new data.

Therefore, in your case, you can leave the "fDurationInMicroseconds" 
field to be the normal duration of a single frame, but change your 
input source to delay appropriately (using 
"TaskScheduler::scheduleDelayedTask()") before calling 
"FramedSource::afterGetting()", if you decide to skip one or more 
frames.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list