3

Since MJPEG over http consists basically on the transmission of a series of JPEG images seperated by a defined seperator, how does MPlayer recognize that it is an MJPEG stream?

Thank you

Emy
  • 45
  • 7
  • How does any application recognise any video stream as a video stream? Mime types/content headers/tries to decode it and sees if it works. – apokryfos Apr 12 '17 at 12:31
  • Yes but since there is no formal specification for MJPEG, there is no indications on how an MJPEG header should be... – Emy Apr 12 '17 at 13:41
  • https://en.wikipedia.org/wiki/Motion_JPEG#M-JPEG_over_HTTP seems to indicate that there's a special content type for it: `multipart/x-mixed-replace;boundary=` Also https://tools.ietf.org/html/rfc2435 may be the spec for it (I'm not 100% sure about this though). – apokryfos Apr 12 '17 at 13:44

1 Answers1

0

Have a look at:

MplayerMjpegStreamViewing < Motion < Foswiki

e.g.

mplayer -fps 4 -demuxer lavf http://rpi-6:8080/?action=stream

does the job for me. Suitable for a streaming server running on a Raspberry like this:

/usr/local/bin/mjpg_streamer -o output_http.so -w ./www -i input_raspicam.so -x 1920 -y 1440 -fps 3 -hf -vf
sparkie
  • 140
  • 4