MJPEG playing - problem with buffering

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
kbaranowski
New Cone
New Cone
Posts: 4
Joined: 22 Mar 2012 16:30

MJPEG playing - problem with buffering

Postby kbaranowski » 23 Mar 2012 09:52

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.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MJPEG playing - problem with buffering

Postby Sébastien Escudier » 23 Mar 2012 10:07

did you try network caching = 0 ?
Also, I don't understand, does it buffer again, after the start ? if yes, what are the logs ?

kbaranowski
New Cone
New Cone
Posts: 4
Joined: 22 Mar 2012 16:30

Re: MJPEG playing - problem with buffering

Postby kbaranowski » 23 Mar 2012 10:34

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.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MJPEG playing - problem with buffering

Postby Sébastien Escudier » 23 Mar 2012 10:37

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.

kbaranowski
New Cone
New Cone
Posts: 4
Joined: 22 Mar 2012 16:30

Re: MJPEG playing - problem with buffering

Postby kbaranowski » 23 Mar 2012 11:14

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?

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MJPEG playing - problem with buffering

Postby Sébastien Escudier » 23 Mar 2012 11:17

don't set mjpeg-fps for live streams.
set it to 0...
read this option description !

kbaranowski
New Cone
New Cone
Posts: 4
Joined: 22 Mar 2012 16:30

Re: MJPEG playing - problem with buffering

Postby kbaranowski » 23 Mar 2012 11:30

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.

Sébastien Escudier
Big Cone-huna
Big Cone-huna
Posts: 853
Joined: 06 Nov 2008 08:38
Operating System: linux

Re: MJPEG playing - problem with buffering

Postby Sébastien Escudier » 23 Mar 2012 11:47

it works fine here.
What are the logs.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 26 guests