Page 1 of 1

How can I stream in MJEPG?

Posted: 02 Jun 2018 20:45
by Pernicek
I have a raspberry pi with a camera from which I'm streaming the footage with

Code: Select all

raspivid -vf -hf -o - -t 0 -w 1920 -h 1080 -fps 30 -b 1500000 | cvlc -vvv stream:///dev/stdin --sout '#rtp{access=udp,sdp=rtsp://:8554/stream}' :demux=h264
This command works fine.

What I need to figure out, is how to change that command so that the stream coming out of it is in the MJEPG format, I tried to change it in various ways, such as

Code: Select all

raspivid -vf -hf -o - -t 0 -w 1920 -h 1080 -fps 30 -b 1500000 | cvlc -vvv stream:///dev/stdin --sout '#transcode{vcodec=MJPG,vb=800}:standard{access=http,mux=mpjpeg,dst=:18223/},#rtp{access=udp,sdp=rtsp://:8554/stream}' :demux=h264
I tried many other variants as well but it never works, usually failing with "floating point error"

If you could tell me how to change the command so it streams in mjepg I would be ETERNALLY grateful.

Re: How can I stream in MJEPG?

Posted: 02 Jun 2018 20:49
by InTheWings
you can force demux fps with h264-fps

In any cases, that should not div by zero which seems your issue. Likely an old version.

Re: How can I stream in MJEPG?

Posted: 02 Jun 2018 20:52
by Pernicek
The version is freshly installed from the repository (with apt get vlc). Maybe the repo is old.
Could you please post the edited command? I am pretty sure I got it wrong in my attempt at the bottom since I don't know how to connect those two sout parameters.