Page 1 of 1

set cache/buffers manually

Posted: 15 Mar 2007 17:34
by rahim_pardhan
Hello All,

I am trying to open an HTTP video stream on my client computer using VLC. When I connect to my stream video playback is delayed by 7 seconds. I know that the delay is due to VLC buffering video before displaying it.

I used Mplayer with the "nocache" option to open the http stream. This resulted in a delay of 1 second between server and client video. Is there a setting in VLC that I can change to manually set the buffer size? Ideally I would like for there to be no buffer. I'd much rather have dropped frames than have a non-real-time display.

I am using VLC 0.8.6.a for windows.

Thanks

Rahim

Posted: 16 Mar 2007 05:54
by DJ
As VLC is a packet based player it requires a FIFO. There is no way to get real time streaming.

You can adjust the buffer as the adjustment is in the menu for the url or any Open menu except Quick open. It's under Advanced options -> Caching.

Posted: 16 Mar 2007 21:43
by rahim_pardhan
Thanks for the update DJ

I will try it out and see if it impoves any bit.

Do you have any suggestions for other media players that would be able to provide real-time streaming? I have tried MPlayer; however it seems a bit unstable and doesn't have any activeX controls.

I've been reading that the HTTP transfer protocol for video has a lot of overhead associated with it making it unfavourable for real time streaming. All data MUST be received before it is displayed. If data is missing it is stored in a buffer until all data from that frame has been received.

On the other hand the UDP transfer protocol displays data as soon as it is received. Frames may be dropped as a result of this, however video playback on the client is very fast. Do you think that switching my streaming from HTTP to UDP would improve the situation? Does VLC implement a FIFO buffer for UDP streams as well? OR does it display UDP streams as soon as data is available?

Thanks,

Rahim

Posted: 17 Mar 2007 08:51
by DJ
UDP is better for local streaming.

Re:

Posted: 14 Aug 2008 14:39
by jmoore
As VLC is a packet based player it requires a FIFO. There is no way to get real time streaming.
Does this hold when using UDP? As explained above, UDP would be much faster than HTTP, but what is the minimum delay I could expect from VLC?

In experiments with an Ethernet camera I have, I've managed to get delay times down to around 0.5 seconds when connecting via RTSP and setting "caching" to 80. Can it get any better than this?

Re: Re:

Posted: 25 Aug 2008 18:30
by doxsi
As VLC is a packet based player it requires a FIFO. There is no way to get real time streaming.
Does this hold when using UDP? As explained above, UDP would be much faster than HTTP, but what is the minimum delay I could expect from VLC?

In experiments with an Ethernet camera I have, I've managed to get delay times down to around 0.5 seconds when connecting via RTSP and setting "caching" to 80. Can it get any better than this?


I have a VLC----(delay=2sec)---VLC aplication for a web cam service but I don' t ave a delay smaller then 2 sec.

my command lines are:
sender:
vlc -vvv v4l:// :v4l-adev="/dev/audio" :v4l-vdev="/dev/video0" :v4l-norm=1 :v4l-width=320 :v4l-height=240 :v4l-fps=15 :v4l-audio=2 --sout '#duplicate{dst="transcode{vcodec=mp4v,vb=1024,acodec=mpga,ab=192,sfilter=time,soverlay,channels=2,audio-sync}:std{access=udp,mux=ts,dst=x.x.x.x:1236}"}'

and receiver:
vlc udp://@:1236 :sout=#duplicate{dst=display}

Please tell me how you use vlc (command line) to have a delay of 0.5 sec.
thanks a lot

Re: set cache/buffers manually

Posted: 02 Dec 2008 04:15
by schooloffish
DJ wrote:
As VLC is a packet based player it requires a FIFO. There is no way to get real time streaming.


Does this hold when using UDP? As explained above, UDP would be much faster than HTTP, but what is the minimum delay I could expect from VLC?

In experiments with an Ethernet camera I have, I've managed to get delay times down to around 0.5 seconds when connecting via RTSP and setting "caching" to 80. Can it get any better than this?
I am also having an issue with the video delay. How am I able to mitigate that delay down to a more manageable level, say around 0.5 seconds ? And how am I able to set the "caching" in a way to achieve that level ?