Mjpeg over Http is not a live streaming format, it takes a lot of bandwidth, it has high latency, it run on TCP which it is not a protocol for streaming,
the only advantage is that all browsers support it.
So (i) if you want a solution that works out of box on any device, (ii) if you have enough bandwidth and (iii) if you are not interested in video quality, Mjpeg over Http is a good trade-off.
Re:A pure C Mjpeg-over-HTTP server
by cardiffspaceman on Thursday January 20, 2022 @02:38AM
(#30005932)
My use case at the moment is to get the video my STB at the office is showing to show in real time in a window on my laptop at home. Currently I use a webcam pointed at a monitor connected to the STB, and I use motion to make the MJPG available. The laptop has a VPN connection to the office and can connect to the HTTP server in motion. I need to be able to resolve text when it is a fairly light color on a supposedly contrasting fairly light background. In practice with the webcam and Motion I'm close. Frequently the text part doesn't quite work.
I was using ffserver also.
I don't particularly need the HTTP layer nor the browser itself. But I can tell a colleague on the office network: Look at my $WEBCAM_URL to show them something on my STB so that's nice. If I could say "ffplay $WEBCAM_PARAMS_AND_IP_ADDRESS" and it was available within the office, that would be the same.
Re:A pure C Mjpeg-over-HTTP server
by stackedinserter on Tuesday January 18, 2022 @03:59PM
(#29985715)
MJPEG is just a stream of JPEG pictures, delimited by some boundary.
Therefore no audio and compression/quality is shit. Also, MJPEG stream doesn't have timestamps, so it's impossible to provide smooth playback of MJPEG stream, or synchronize it with other streams.
MPEGTS would be great for things I have wanted to do in the past, and all you probably have to do is hack the video element so it can handle that.
I think the thing about MJPEG and webcams is that it's relatively easy to make MJPEG from a webcam. MPEGTS would require more code I think?