VLC Stuttering When Receiving RTSP Stream

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
MetaHyperBolic2
New Cone
New Cone
Posts: 2
Joined: 07 Jan 2013 16:57

VLC Stuttering When Receiving RTSP Stream

Postby MetaHyperBolic2 » 07 Jan 2013 18:35

I've been preparing material (AAC audio and MPEG-4 Part 2 video) using ffmpeg for streaming over RTSP by our Helix Server. While RealPlayer seems to (unsurprisingly) play my video just fine, as does QuickTime, VLC 2 has major "stuttering."

I receive a bunch of "picture is too late to be displayed," "timing screwed, stopping resampling," and "buffery way too late (), dropping buffer" messages in the Messages window.

Are there any known-good RTSP streams that VLC does like? I would like to emulate them. I'd rather not have our users have to tweak settings (although even playing with the various cache sizes hasn't yet helped me).

If anyone here is familiar with ffmpeg, are there any additional flags I ought to be using to ensure a smoother video streaming experience for VLC?

MetaHyperBolic2
New Cone
New Cone
Posts: 2
Joined: 07 Jan 2013 16:57

Re: VLC Stuttering When Receiving RTSP Stream

Postby MetaHyperBolic2 » 10 Jan 2013 21:04

No ideas? Should I float this by the developers? Has anyone seen anything like this?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC Stuttering When Receiving RTSP Stream

Postby Jean-Baptiste Kempf » 10 Jan 2013 23:43

Did you increase rtsp caching?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

bitcore
New Cone
New Cone
Posts: 1
Joined: 27 Apr 2013 01:41

Re: VLC Stuttering When Receiving RTSP Stream

Postby bitcore » 27 Apr 2013 02:10

I've got the same issues.
server:

Code: Select all

vlc.exe dshow:// --dshow-adev="Stereo Mix (SoundMAX Integrated" --sout="#transcode{acodec=mp3,ab=320}:rtp{sdp=rtsp://192.168.2.9:5544/}" --no-sout-rtp-sap --no-sout-standard-sap --ttl=5 --sout-keep
clients:

Code: Select all

"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" rtsp://192.168.2.9:5544/
fresh installs, 2.0.6, cache & configs cleared.

results in this on my clients (all 3: XP, 2k3 datacenter, win 7)

Code: Select all

main debug: processing request item: rtsp://192.168.2.9:5544/, node: Playlist, skip: 0 main debug: resyncing on rtsp://192.168.2.9:5544/ main debug: rtsp://192.168.2.9:5544/ is at 0 main debug: starting playback of the new playlist item main debug: resyncing on rtsp://192.168.2.9:5544/ main debug: rtsp://192.168.2.9:5544/ is at 0 main debug: creating new input thread main debug: Creating an input for 'rtsp://192.168.2.9:5544/' main debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Bitcore\AppData\Local\Temp' main debug: `rtsp://192.168.2.9:5544/' gives access `rtsp' demux `' path `192.168.2.9:5544/' main debug: creating demux: access='rtsp' demux='' location='192.168.2.9:5544/' file='\\192.168.2.9:5544\' main debug: looking for access_demux module: 1 candidate live555 debug: version 2012.12.18 qt4 debug: IM: Setting an input live555 debug: RTP subsession 'audio/L16' main debug: selecting program id=0 live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: We have a timeout of 60 seconds live555 debug: spawned timeout thread live555 debug: play start: 741.055987 stop:0.000000 main debug: using access_demux module "live555" main debug: TIMER module_need() : 142.235 ms - Total 142.235 ms / 1 intvls (Avg 142.235 ms) main debug: looking for decoder module: 32 candidates araw debug: samplerate:44100Hz channels:2 bits/sample:16 main debug: using decoder module "araw" main debug: TIMER module_need() : 0.101 ms - Total 0.101 ms / 1 intvls (Avg 0.101 ms) main debug: looking for meta reader module: 2 candidates lua debug: Trying Lua scripts in C:\Users\Bitcore\AppData\Roaming\vlc\lua\meta\reader lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader\filename.luac main debug: no meta reader module matching "any" could be loaded main debug: TIMER module_need() : 0.639 ms - Total 0.639 ms / 1 intvls (Avg 0.639 ms) main debug: `rtsp://192.168.2.9:5544/' successfully opened main debug: Buffering 0% main debug: recycling audio output main debug: Buffering 0% main debug: Buffering 0% main debug: looking for audio output module: 2 candidates aout_directx debug: Opening DirectSound Audio Output aout_directx debug: found device: Primary Sound Driver aout_directx debug: found device: Multichannel (M-Audio Delta Audiophile) aout_directx debug: found device: Line 1/2 (M-Audio Delta Audiophile) aout_directx debug: found device: S/PDIF (M-Audio Delta Audiophile) aout_directx debug: found device: Speakers (SoundMAX Integrated Digital HD Audio) aout_directx debug: found device: SPDIF Interface (SoundMAX Integrated Digital HD Audio) main debug: Buffering 0% aout_directx debug: device supports 2 channels (DEFAULT!) aout_directx debug: device supports 1 channel aout_directx debug: Windows says your SpeakerConfig is stereo aout_directx debug: creating DirectSoundThread main debug: using audio output module "aout_directx" main debug: TIMER module_need() : 11.321 ms - Total 11.321 ms / 1 intvls (Avg 11.321 ms) aout_directx debug: DirectSoundThread ready main debug: Buffering 0% main debug: output 's16l' 44100 Hz Stereo frame=1 samples/4 bytes main debug: mixer 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes main debug: filter(s) 'f32l'->'s16l' 44100 Hz->44100 Hz Stereo->Stereo main debug: looking for audio filter module: 13 candidates audio_format debug: f32l->s16l, bits per sample: 32->16 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.094 ms - Total 0.094 ms / 1 intvls (Avg 0.094 ms) main debug: conversion pipeline completed main debug: looking for audio mixer module: 2 candidates main debug: using audio mixer module "float32_mixer" main debug: TIMER module_need() : 0.061 ms - Total 0.061 ms / 1 intvls (Avg 0.061 ms) main debug: input 's16b' 44100 Hz Stereo frame=1 samples/4 bytes main debug: filter(s) 's16b'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo main debug: looking for audio filter module: 13 candidates audio_format debug: s16b->f32l, bits per sample: 16->32 main debug: using audio filter module "audio_format" main debug: TIMER module_need() : 0.070 ms - Total 0.070 ms / 1 intvls (Avg 0.070 ms) main debug: conversion pipeline completed main debug: filter(s) 'f32l'->'f32l' 48510 Hz->44100 Hz Stereo->Stereo main debug: looking for audio filter module: 13 candidates main debug: using audio filter module "samplerate" main debug: TIMER module_need() : 0.101 ms - Total 0.101 ms / 1 intvls (Avg 0.101 ms) main debug: conversion pipeline completed main debug: End of audio preroll main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 22% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 43% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 87% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Buffering 98% main debug: Stream buffering done (1091 ms in 1055 ms) main debug: Decoder buffering done in 0 ms main warning: PTS is out of range (-9983), dropping buffer main warning: PTS is out of range (-17834), dropping buffer main warning: PTS is out of range (-25695), dropping buffer main warning: PTS is out of range (-33556), dropping buffer main warning: buffer too late (74832), up-sampling main warning: audio output out of sync, adjusting dates (63280 us) main warning: not synchronized (63281 us), resampling main warning: resampling stopped after 1208942 usec (drift: -93498) main warning: buffer too late (112242), up-sampling main warning: resampling stopped after 1229283 usec (drift: -85233) main warning: buffer too late (85234), up-sampling main warning: timing screwed, stopping resampling main warning: buffer too late (131880), up-sampling live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called main debug: Buffering 0% main debug: End of audio preroll main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 0% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 11% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 21% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 33% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 44% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 54% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 65% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 76% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 86% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Buffering 97% main debug: Stream buffering done (1089 ms in 1034 ms) main debug: Decoder buffering done in 0 ms main warning: PTS is out of range (-9989), dropping buffer main warning: PTS is out of range (-17841), dropping buffer main warning: PTS is out of range (-25702), dropping buffer main warning: PTS is out of range (-33564), dropping buffer main warning: buffer too early (-57166), down-sampling main warning: resampling stopped after 2228597 usec (drift: 30379) main warning: buffer too late (69980), up-sampling main warning: resampling stopped after 85596 usec (drift: -4982) main warning: buffer too late (101809), up-sampling main warning: resampling stopped after 37617 usec (drift: -7229) main warning: buffer too late (126310), up-sampling main warning: resampling stopped after 2834460 usec (drift: -49092) main warning: buffer too late (88071), up-sampling main warning: resampling stopped after 125842 usec (drift: -40657) main warning: buffer too late (115444), up-sampling main warning: resampling stopped after 85539 usec (drift: -42840) main warning: buffer too late (114960), up-sampling main warning: resampling stopped after 85692 usec (drift: -44961) main warning: buffer too late (117368), up-sampling main warning: resampling stopped after 81782 usec (drift: -45396) main warning: buffer too late (154171), up-sampling main warning: resampling stopped after 7710018 usec (drift: 68466) main warning: buffer too early (-68465), down-sampling main warning: resampling stopped after 4858720 usec (drift: 25797) main warning: buffer too late (88375), up-sampling main warning: resampling stopped after 6001257 usec (drift: -9841)
This is a sample of about 15 seconds of stream playback.

It buffers twice, for some unknown reason. Plays a few seconds, stops, and completely re-buffers. it does that every time, without fail. Then it CONSTANTLY resamples the stream. You can noticeably hear the resampling in action, the pitch speeds up and slows down. it oscillates rather frequently and sounds like a VERY faulty vinyl record motor. Notes are shifted quite a bit such that they are not the same notes anymore.

I've tried not using a codec, (mp3 transcode seems to not do it quite as badly, could be placebo). I've adjusted caching, but it seems to not have any effect: 1,000ms, 200ms, 10,000ms, no difference.

What I'm doing is capturing the output of a 2nd soundcard on my PC that winamp outputs to. I re-broadcast it to localhost (receive the stream and output to my good sound card), and two other rooms in my house - for a pseudo whole-house audio system where I don't have to rig up an audio distribution system. The goal is to have sync between rooms to be acceptable such that the delay isn't too bad.
This works, and it works just fine except for the resampling that I can't seem to stop.

tried (with no success):
audio-> enable time strech (disable/enable seems to have no effect)
changing output modules (dshow vs. waveOut)
I've had all sorts of fun with the different audio resampler settings (in all preferences)

The fact that this problem occurs on three different windows platforms (XP, 2K3 datacenter, and win 7) indicates it's VLC - or at least a default VLC configuration - or related to my source [dshow]


Any ideas?


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 97 guests