[Live-devel] Regarding the audio and video packet sent rate

Ross Finlayson finlayson at live555.com
Fri Sep 28 07:17:54 PDT 2012


> I use live555 send the audio and video packet as soon as possible.
> but the video and audio encoding rate isn't same. so the video and audio packet  vlc receives  isn't synchro.
> So I tried to adjust the video and audio send rate, but I can't get the balance. I always get the error "pts is out of range" or "the received buffer is in future".
> Does live555 have mechanism to balance it?

Once again, you are probably not setting "fPresentationTime" correctly for both audio and video streams.

In the code that you noted in one of your earlier messages, there was a bug:

    fDurationInMicroseconds = 5000; // because 40 samples at 8000 samples-per-second have a duration of 5 ms (== 5000 us)

That line of code is correct for audio (because each outgoing audio packet contains 40 samples).  However, you used the exact same line for video, which is wrong (because your video frame rate is (presumably) *not* also 200 frames-per-second).

For video, you need to set a correct value of "fDurationInMicroseconds" that corresponds to your video frame rate.


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120928/4d2cabba/attachment.html>


More information about the live-devel mailing list