Which codec do I use for low latency video streaming with VLC?

0

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

Posted 2017-09-27T22:50:57.953

Reputation: 153

1Honestly, if you're looking for low latency I would move away from VLC. In my experience its not possible to get low latency video from VLC. – heavyd – 2017-09-27T22:53:43.923

@heavyd thanks, do you have recommendations? – Nathan – 2017-09-27T23:14:20.247

Possible duplicate of How to reduce latency on FFmpeg video streaming?

– Ramhound – 2019-02-24T23:07:16.550

Answers

3

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

Rafael Duarte

Posted 2017-09-27T22:50:57.953

Reputation: 46

Congrats on your accepted answer and welcome to Super User! – juniorRubyist – 2019-02-25T02:24:05.863