Delay/lag in MJPEG live stream

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
diafygi
Blank Cone
Blank Cone
Posts: 13
Joined: 07 Aug 2007 09:13

Delay/lag in MJPEG live stream

Postby diafygi » 21 Sep 2010 18:25

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?

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: Delay/lag in MJPEG live stream

Postby Jean-Baptiste Kempf » 21 Sep 2010 22:27

VLC has an important http cache by default.
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.

diafygi
Blank Cone
Blank Cone
Posts: 13
Joined: 07 Aug 2007 09:13

Re: Delay/lag in MJPEG live stream

Postby diafygi » 21 Sep 2010 22:31

VLC has an important http cache by default.
Ok, is there an option to reduce the http cache? I'm ok with dropped frames.

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: Delay/lag in MJPEG live stream

Postby Jean-Baptiste Kempf » 21 Sep 2010 22:32

http-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.

diafygi
Blank Cone
Blank Cone
Posts: 13
Joined: 07 Aug 2007 09:13

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

Postby diafygi » 29 Sep 2010 18:35

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

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: Delay/lag in MJPEG live stream

Postby Jean-Baptiste Kempf » 10 Oct 2010 19:48

:D
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.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 18 guests