Page 1 of 1

Delay/lag in MJPEG live stream

Posted: 21 Sep 2010 18:25
by diafygi
I have a live stream coming from a media server using mjpeg. Here's the example stream address:

Code: Select all

http://192.168.1.25/mjpg/video.mjpg
When I open the stream in Firefox (just type in the url), the stream displays with almost no delay (<20ms). However, when I open the stream in VLC, there is about a 1 second delay/lag in the stream. Is this because VLC is transcoding the stream? Is there a setting that I can use to reduce this delay?

The reason I'm not just using Firefox is because I'd like to have the stream display at fullscreen. Any ideas?

Re: Delay/lag in MJPEG live stream

Posted: 21 Sep 2010 22:27
by Jean-Baptiste Kempf
VLC has an important http cache by default.

Re: Delay/lag in MJPEG live stream

Posted: 21 Sep 2010 22:31
by diafygi
VLC has an important http cache by default.
Ok, is there an option to reduce the http cache? I'm ok with dropped frames.

Re: Delay/lag in MJPEG live stream

Posted: 21 Sep 2010 22:32
by Jean-Baptiste Kempf
http-caching

[SOLVED] Re: Delay/lag in MJPEG live stream

Posted: 29 Sep 2010 18:35
by diafygi
I just wanted to follow up and confirm that I did get rid of the delay/lag in the stream by setting http-caching to zero. There is no time difference between the stream in Firefox and the stream in VLC. Thanks j-b!

Code: Select all

vlc --http-caching=0 http://192.168.1.25/mjpg/video.mjpg

Re: Delay/lag in MJPEG live stream

Posted: 10 Oct 2010 19:48
by Jean-Baptiste Kempf
:D