1

I'm looking for a way to stream a webcam video with as low latency as possible. Quality and resolution are far less important.

This is the command I'm currently using is:

cvlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp4v,vb=800,acodec=none}:rtp{sdp=rtsp://:8554/}'

It works but has a 2000ms delay over a LAN which is too high. I'm happy to sacrifice resolution or quality to reduce the delay.

VLC has a list of codecs but I don't want to spend hours trying to install them if they end up been slow.

Nathan
  • 193

1 Answers1

4

Latency is a very problem mainly when using audio capture synchronization with the video online. For me works with the theo codec, I am using this codec to control the resolution of transmission the implementation of this codec is native almost all compilations of VLC. In your case, you can set using this form:

cvlc v4l2:///dev/video0 :v4l2-standard= :live-caching=1000 :sout="#transcode{vcodec=theo,vb=XXX,fps=30,scale=Y.Y}:rtp{sdp=rtsp://:554/test}"

where XXX is the resolution and Y.Y is the scale, example:

cvlc v4l2:///dev/video0 :v4l2-standard= :live-caching=1000 :sout="#transcode{vcodec=theo,vb=300,fps=30,scale=0.2}:rtp{sdp=rtsp://:554/test}"

Source: https://forum.videolan.org/viewtopic.php?t=101547