MJPEG stream to h.264 stream?
Posted: 19 Jan 2017 08:42
Hi! I've built a weatherproof (?) BeeCam from a Raspberry Pi board running MotionEye, and it outputs an 800 x 600 x 30 fps MJPEG stream over http at about 40 Mbps. The Pi doesn't have enough CPU to compress it down to h.264 at an acceptable frame rate, and I don't want to serve 40 Mbps to the public.
So I though I'd use a spare Mac running VLC to read the MJPEG stream, transcode it to h.264, and stream it back out over http, and then offer that to the public at around 1 Mbps per stream.
I think VLC should be able to do this, too, but I can't figure out to get it done without it crashing. I can do each of the parts separately, but when I try to put it all together, it crashes:
So it can read in and output all the formats I want, and it can re-stream a stream. But it can't re-stream a stream while transcoding it without crashing immediately. I've tried a bunch of different output formats, and they all crashed the same way.
I get the same crash running VLC on OS X and on Windows, so it looks like a core VLC problem. Both platforms were running the latest release, 2.2.4.
Am I missing a key step? I'm doing this all from the GUI, using Advanced Open File or Open Network and then turning on the streaming options.
Thanks!
So I though I'd use a spare Mac running VLC to read the MJPEG stream, transcode it to h.264, and stream it back out over http, and then offer that to the public at around 1 Mbps per stream.
I think VLC should be able to do this, too, but I can't figure out to get it done without it crashing. I can do each of the parts separately, but when I try to put it all together, it crashes:
- It can read and play the MJPEG stream
- It can open an MP4 file or AVI file and transcode and stream in either h.264 or MJPEG, which I can then view in another instance of VLC on the same computer or another computer.
- It can open an h.264 stream or an MJPEG stream and re-stream that video without transcoding, which I can then view on another computer or from my iPhone.
- I can connect 2 clients to an output stream.
So it can read in and output all the formats I want, and it can re-stream a stream. But it can't re-stream a stream while transcoding it without crashing immediately. I've tried a bunch of different output formats, and they all crashed the same way.
I get the same crash running VLC on OS X and on Windows, so it looks like a core VLC problem. Both platforms were running the latest release, 2.2.4.
Am I missing a key step? I'm doing this all from the GUI, using Advanced Open File or Open Network and then turning on the streaming options.
Thanks!