Page 1 of 1

playing mjpeg files (not streams)

Posted: 02 Aug 2016 09:14
by rawbob
Hello all
New member, hope I'm posting this correctly.

Am trying to use VLC 2.2.4 under Windows 7 (64-bit) to play an MJPEG file captured from an IP camera. If I stream directly from the camera into VLC it plays just fine; but if I capture a file and try to play it with VLC I get nothing. (streaming directly from the camera to Firefox browser also works just fine.)

I've looked directly at the raw file data; it's of the form

--video boundary--
Content-length: ...
Content-type: image/jpeg

(raw jpeg data)ÿØÿÄ......ÿÙ

--video boundary--
Content-length: ...
Content-type: image/jpeg

(raw jpeg data)ÿØÿÄ......ÿÙ

...etc

Any idea what I'm doing wrong? Thanx in advance

Re: playing mjpeg files (not streams)

Posted: 02 Aug 2016 11:49
by Rémi Denis-Courmont
Those streams can only be played straight from HTTP. If you save them to a file, the critical parameters from the HTTP response header lines are lost.

Re: playing mjpeg files (not streams)

Posted: 02 Aug 2016 22:56
by rawbob
I guess I don't understand that. The data I'm streaming to the file is exactly what gets streamed directly to VLC or Firefox, including the (only) two HTTP headers for each JPG image. Since the only difference to VLC is the origin of the data; I would think what VLC does with it should be the same regardless of whether the source is a stream or a file (?)