How to play mjpeg stream with VLC?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
astrowalker
New Cone
New Cone
Posts: 4
Joined: 21 Oct 2021 14:15

How to play mjpeg stream with VLC?

Postby astrowalker » 22 Oct 2021 08:31

I have mjpeg stream created with ffmpeg and mjpegserver: https://github.com/blueimp/mjpeg-server.
It works without any problems if I open it with web browser -- all it takes is enter "localhost:9000" in a browser and I can see my stream playing.

But if I open VLC and try to open this stream all I get is bouncing progress bar back and forth and nothing is played.

What do I miss? Any special parameter for VLC?

I run mjpegserver without waiting for client, besides I see stream played in browser when I try to do the same in VLC, so for sure it is not the problem that VLC is waiting for actual data. I check windows VLC and linux VLC, both have the same effect. VLC 3.0.11.

The format of the stream is recognized by web browser as "multipart/x-mixed-replace;boundary=ffmpeg".

Rémi Denis-Courmont
Developer
Developer
Posts: 15312
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: How to play mjpeg stream with VLC?

Postby Rémi Denis-Courmont » 22 Oct 2021 15:52

Bouncing back and forth usually means that there is no data.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

astrowalker
New Cone
New Cone
Posts: 4
Joined: 21 Oct 2021 14:15

Re: How to play mjpeg stream with VLC?

Postby astrowalker » 25 Oct 2021 11:43

Thank you. I tested it again, it is not possible there is no data, because I can see this stream in web browser, I copy address from web browser, paste it into VLC and... nothing. Btw. today I tried to save this stream using VLC (just to check if VLC sees the data or has some problem with the output maybe). The dumped/saved stream was just 160B, so it looks like VLC does not indeed does not see the data, but why?

astrowalker
New Cone
New Cone
Posts: 4
Joined: 21 Oct 2021 14:15

Re: How to play mjpeg stream with VLC?

Postby astrowalker » 29 Oct 2021 08:05

After few more tests I noticed VLC can play the stream only if it is the first client playing it. So far I tested it checking web browser first (to ensure I can play it at all), and then tried to play it with VLC (this does not work). But if I skip web browser and open VLC first then I can play stream with VLC.

So why such difference?

astrowalker
New Cone
New Cone
Posts: 4
Joined: 21 Oct 2021 14:15

Re: How to play mjpeg stream with VLC?

Postby astrowalker » 15 Nov 2021 09:59

For the record, it is problem with VLC. Report: https://code.videolan.org/videolan/vlc/-/issues/26260


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests