Page 1 of 1

drift is too high, resetting master sync

Posted: 03 Apr 2012 13:57
by jacobs1
I am trying to stream via http and I am getting many errors and frame jitter.

This is the command I am using:
dshow:// :dshow-fps=8 :dshow-vdev=screen-capture-recorder :dshow-adev='SoundMAX Digital Audio' :dshow-caching=400 :sout=#transcode{vcodec=h264,venc=x264{tune=zerolatency,preset=veryfast,nf=true,vbv-maxrate=600},fps=8,vb=550,aenc=ffmpeg,acodec=mp3,ab=32,channels=2,samplerate=22050}:http{mux=ts,dst=:48550/file.avi}

this is the debug output:
http://pastebin.com/MzJUiW4s

The machine I am using has a slow CPU ( Pentium 4 2.8 GHz )

Any ideas how to solve this problem ?

I had a similar problem using ffmpeg ( moved to vlc because needed simple http support ), and it was solved by increasing the real time buffer, is there a way to control this buffer in vlc ?

Re: drift is too high, resetting master sync

Posted: 03 Apr 2012 15:09
by RĂ©mi Denis-Courmont
Yes. IIRC --live-caching on input and --sout-mux-caching on output.

Re: drift is too high, resetting master sync

Posted: 03 Apr 2012 15:36
by jacobs1
live-caching and sout-mux-caching don't help, I am still getting many "stream_out_transcode stream out debug: drift is too high, resetting master sync
" messages

Re: drift is too high, resetting master sync

Posted: 07 Apr 2012 03:03
by str3tmonk
live-caching and sout-mux-caching don't help, I am still getting many "stream_out_transcode stream out debug: drift is too high, resetting master sync
" messages
From my experience, those errors show up because CPU is not able to keep up with input. My suggestion is to tweak the transcode options (VB, for example).

Re: drift is too high, resetting master sync

Posted: 26 Apr 2012 18:09
by rogerdpack
Ok I did some research into these and it appears that VLC is *very* picky about its incoming frames--if it negotiates 30 fps, they can't come in at 28.5 fps or it will show those messages every so often:

avcodec warning: almost fed libavcodec with two frames with the same PTS (754903828860)
avcodec warning: almost fed libavcodec with two frames with the same PTS (754903862193)
stream_out_transcode debug: drift is too high, resetting master sync
stream_out_transcode debug: drift is too high, resetting master sync

over and over again.

I have fixed screen-capture-recorder with 0.6.1 so that it feeds packets more consistently (remember to also use --live-caching=300 or maybe 3000).

If you're using aero it seems the max fps is about 15, so if you set it to higher than that (or if you system genuinely can't keep up) then it will still display these messages.

Also a question: did --live-caching *replace* dshow-caching?
http://www.release-note.com/multimedia/ ... -pre2.html
(as in --dshow-caching no longer has any effect?)

Thanks.
-roger-