MJPEG stream to h.264 stream?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
waterbug
Blank Cone
Blank Cone
Posts: 15
Joined: 27 Nov 2003 20:06
Location: Westlake Village, CA
Contact:

MJPEG stream to h.264 stream?

Postby waterbug » 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:
  1. It can read and play the MJPEG stream
  2. 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.
  3. 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.
  4. I can connect 2 clients to an output stream.
So at one point I had Mac #1 reading an MP4 file and transcoding it to an MJPEG stream that I read on Mac #2 and streamed back out to my iPhone, and all 3 screens were showing the same video.

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!
Never refuse a breath mint.

hackeron
Blank Cone
Blank Cone
Posts: 24
Joined: 18 Jul 2008 13:30

Re: MJPEG stream to h.264 stream?

Postby hackeron » 13 Nov 2020 20:38

Anyone?

waterbug
Blank Cone
Blank Cone
Posts: 15
Joined: 27 Nov 2003 20:06
Location: Westlake Village, CA
Contact:

Re: MJPEG stream to h.264 stream?

Postby waterbug » 13 Nov 2020 21:27

I never was able to get this working via VLC, but I was able to get ffmpeg installed on my Pi to grab the RTSP stream and push it to YouTube.

So it's not an answer to this particular problem, but it's an alternate solution.
Never refuse a breath mint.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 19 guests