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

梦幻工作室 fantasyvideo at 126.com
Sat Sep 29 04:52:26 PDT 2012


Thanks for your patient. 

Now I adjust the settings. Since I collect the data from one card, then
convert them to g711 and h264.

My card’s raw video:50fps.

Raw audio: 48000hz,16bits, 2channel.

Then I convert audio to be g711 8000hz,8bit, 1channel.

Video is still 50fps.

 

At last the duration of  video and audio are all 20000us, and I call
newTask()=envir().taskScheduler().scheduleDelayedTask(20000,(TaskFunc*)Frame
dSource::aftergetting,this) in the doGetNextFrame().

So in such case, my fPresentationTime should be correct.

But I don’t know why the vlc said “early picture skipped”, it seems that
shows my video frame is old.

 

发件人: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] 代表 Ross Finlayson
发送时间: 2012年9月28日 22:18
收件人: LIVE555 Streaming Media - development & use
主题: Re: [Live-devel] Regarding the audio and video packet sent rate

 

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/20120929/2e9e04f4/attachment-0001.html>


More information about the live-devel mailing list