Streaming camera to RTSP using VLC

Streaming connected camera to RTSP using VLC is pretty much easy,

$ vlc v4l2:///dev/video0 --sout ‘#rtp{mux=ts,sdp=rtsp://IP:PORT/cam.sdp}’

Make sure to have camera plugged into the computer or host.

rtp — is the name of the VLC module we will use to stream to RTSP.
mux=ts — this is multiplex format, for live streaming, it should be ts.
sdp=rtsp://IP:PORT/cam.sdp — specify the output SDP on RTSP.

To play this RTSP stream,

$ vlc rtsp://IP:PORT/cam.sdp

Have fun :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.