vlc to stream webcam with no delay

24,424

Solution 1

That's more than likely just a limitation of the webcam. Like early cellphone cameras (newer ones probably have less of a problem), webcams typically have lower frame rates and have, both, slower light sensors and also take longer to process the captured video frames. This causes there to be a delay between real-time and the displayed video. Having a USB connection between the camera and the PC also adds to the delay.

What you could try doing (besides upgrading to a better webcam) is to improve the lighting conditions. Digital cameras tend to take longer to capture a image in low light conditions because it takes longer to capture the necessary amount of light to produce a decent image (sorta like slowing down the shutter speed in an analog camera). Using a FireWire camera could also speed things up slightly.

Solution 2

On the Capture Device tab:

  • click on Show more options
  • then change caching to 0.

Change caching to zero:

VLC no Delay Camera

Solution 3

Bizarrely I am trying to solve this same problem and I have found a little success. I am using an HP HD 3110. They have them at best buy for about 20 bucks. Anyway I tried using it with VLC and third party software and I had a lag of about 300ms and for what I am doing that is almost unacceptable.

Brightness helped and setting the exposure to be fixed really low appeared to help, but it may simply raise the frame rate which is not necessarily the same as reducing the latency. Ultimately the best performance came from using the software that came with the webcam.

The latency is in the 100ms or lower ballpark which is below what humans typically detect without effort. I have no good explanation for this. Its possible that VLC and the other software I used buffered the images a little much or the software that came with the device may be accessing hidden options for the webcam.

The main issue is your system, but for all I know you may be able to get it to work. Secondly the software that comes with a camera will not make it easy to incorporate into other programs potentially.

Solution 4

Most cameras have some parameters, to adjust brightness level, etc.

You should turn off auto brightness, and maybe lower the brightness level. You will get darker image in low light conditions, but hopefully with reduced lag.

Share:
24,424

Related videos on Youtube

jakob fra fyn
Author by

jakob fra fyn

Updated on September 17, 2022

Comments

  • jakob fra fyn
    jakob fra fyn over 1 year

    I'm trying to get VLC to show my webcam in realtime:

    vlc -I dummy v4l2:///dev/video0
    

    does the trick for the most part, except there's almost a second delay between an action (say, me turning my head) and seeing it in the video window. Is there any way to reduce the lag, or other software I can use (Gentoo Linux)?

  • Nathan Osman
    Nathan Osman almost 14 years
    Honestly, there really isn't much that can be done about this... the webcam likely is the culprit.
  • JustCoding
    JustCoding over 3 years
    Perfect answer. Especially if you're using an external action cam as input device
  • insaner
    insaner about 3 years
    I thought it was my camera to blame. Amazing. Thank you!