How can I stream in MJEPG?

About encoding, codec settings, muxers and filter usage
Pernicek
New Cone
New Cone
Posts: 2
Joined: 02 Jun 2018 20:38

How can I stream in MJEPG?

Postby Pernicek » 02 Jun 2018 20:45

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.

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: How can I stream in MJEPG?

Postby InTheWings » 02 Jun 2018 20:49

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.
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

Pernicek
New Cone
New Cone
Posts: 2
Joined: 02 Jun 2018 20:38

Re: How can I stream in MJEPG?

Postby Pernicek » 02 Jun 2018 20:52

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.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 43 guests