Page 1 of 1

MJPEG playing - problem with buffering

Posted: 23 Mar 2012 09:52
by kbaranowski
I'm using VLC to play MJPEG stream. I saw that it buffers some frames at fixed time intervals instead of displaying it instantly. How to force vlc to not buffer frames but display every frame that is available? I'd like to add that i set buffering parameter to 0ms.

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 10:07
by Sébastien Escudier
did you try network caching = 0 ?
Also, I don't understand, does it buffer again, after the start ? if yes, what are the logs ?

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 10:34
by kbaranowski
Yes, I set network caching to 0. I also set mjpeg-fps to 1. After start it plays some frames, and after it, it starts to buffer. After buffering, it plays buffered frames and then buffers next frames.

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 10:37
by Sébastien Escudier
why do you force mjpeg-fps to 1 ? if you receive less than 1 frame per second, vlc will try to buffer again, that's normal.

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 11:14
by kbaranowski
I set mjpeg-fps to 0.1 too and effect is the same. There are about 2 frames per second so why it buffers about 20 forward? Movies in mpeg or wmv have predetermined fps but mjpeg stream hasn't or maybe there should be some parameters in http header that tells about fps of a mjpeg stream?

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 11:17
by Sébastien Escudier
don't set mjpeg-fps for live streams.
set it to 0...
read this option description !

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 11:30
by kbaranowski
First time i didn't set mjpeg-fps (the default is 0 so it was 0) and problem occured. We have a sfotware that grabs jpegs from camera and builds mjpeg http response. Each jpeg is added to response with 'boundary' keyword and after every adding response cache is flushed. In the header of http response is set no-cache parameter. I need to display frames that are available, if they comes to slow, program shouldn't buffer anything but should stop and wait for next available frame.

Re: MJPEG playing - problem with buffering

Posted: 23 Mar 2012 11:47
by Sébastien Escudier
it works fine here.
What are the logs.