Page 1 of 1

Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 06 Oct 2020 13:56
by MrInteractive
I have just started playing with some of the more extensive features of VLC and have recently tried the webcam rendering via the "Open capture Device" and selecting my Logitech C920 webcam, and than asking it to "play".

I was surprised at the awful performance. I am running a windows 7 machine with a 2.8MHz, Intel Xeon W3530 four core CPU.

1) The frame rate was absolutely awful, I selected "advanced options" and was surprised to see 0 in the fps field, I changed this to 25fps and tried again, there was a huge improvement the frame rate, but it was still not good.
2) I tried waving my hand across the webcam and the lag in the screen update was a second or more, which is absolutely appalling.

Is there a configuration issue here? Skype, Discord and OBS have no lag, the screen rendering from these pieces of software is instant. Now I appreciate that in some sense I am "playing" the input feed to the output VLC, but still, why the huge lag?

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 06 Oct 2020 17:35
by RĂ©mi Denis-Courmont
Same hardware in VLC on Linux works much better than that, so I guess it's just a problem with the DirectShow plugin.

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 07 Oct 2020 02:23
by MrInteractive
Hmmmm............... interesting.

I wonder if other people have experienced the same thing on windows 7.

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 03 Nov 2020 21:02
by WBIs
Hi there,
I also want to use Direct Show / of WebCams. Logitech C920 and Brio. Using the same settings, sometimes it works and sometimes it does not. If it works I does have just a short lag somewhere inbetween 1/4 - 1/3 sek.
No problem for my needs. Worst case the lag does increase with the run time. It can easily reach more than 30sek. At this time I have no clue, where to improve the situation and I would be happy to get any hint. Thanks in advance.
Werner

Using Win10 / tried different PCs already

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 07 Nov 2020 13:23
by Hitchhiker
You could try using Shotcut which supports webcam capture. https://www.shotcut.org/ There are a large number of tutorials on youtube which explain how to do things.

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 02 Oct 2024 13:54
by ts2995
I have solved this problem for users with the same issue, windows 10 / windows 11

By default the colour space compression is set to YUY2, this needs to be swapped to MJPG.
Tick show more options when opening the 'Direct Show' device
Press Play
No Options need to be modified in the first Properties Pop Up, click ok
Select MJPG from the colourspace/compression drop down in the second properties pop up window
Click Apply Ok

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 17 Oct 2024 17:48
by Sqrly
I have solved this problem for users with the same issue, windows 10 / windows 11

By default the colour space compression is set to YUY2, this needs to be swapped to MJPG.
Tick show more options when opening the 'Direct Show' device
Press Play
No Options need to be modified in the first Properties Pop Up, click ok
Select MJPG from the colourspace/compression drop down in the second properties pop up window
Click Apply Ok

These instructions make no sense at all but, I think your onto something.

Re: Lag and slow FPS in VLC player when capturing logictech webcam

Posted: 17 Oct 2024 19:02
by Sqrly
Ok, after reading ts2995's post and thinking he at least found the root cause, he did, I did a bunch of testing and figured out how to capture some lag free webcam video.

1. Plug in your webcam
2. Open VLC
3. Click Media > Convert/Save
4. Select the "Capture Device" tab
5. Select your webcam in the "Video Device Name" drop down box
6. Select your mic in the "Audio Device Name" drop down box (I haven't worked out the audio yet because I am choosing 'none' as I don't need audio for what I'm doing.)
7. Click the "Advanced Options" button and tick the "Device properties" box. (this is what will make those windows popup that ts2995 was reffering to)
8. Click the "ok" button
9. Click the "Convert/Save" button
10. Tic the "Display the Output" box if you need to see what your recording live, to aim the camera I assume. If the camera is all setup and you don't need to see the picture live, you don't need to do this.
11. Select the "Video - H.264 + MP3 (MP4)" profile then click on the little wrench button next to it.
12. Select the "Video Codec" tab and tic the box "Keep original video track" then click the "Save" button
13. Click the "Browse" button and choose a folder and filename for the video
14. Click the "Start" button and the "Properties" box will popup. Click the "OK" button on this first one (This is what ts2995 was reffering to)
15. A second properties box will popup. In the "Color Space/Compression" drop down box change it to "MJPG"
16: I also changed the "Output Size" to the default. (1920x1080 for me, this is the cameras default)
17. Click the "Apply" button
18. Click the "OK" button and the recording will start.

There's still a little delay between waving your hand in front of the camera and seeing it on the screen but it doesn't affect the recording.

I'm doing all this on a 10 year old HP Envy laptop running Windows 10 with a no name 1080p wide angle Webcam I got off Amazon.

I tried using the built in Camera app but it stops recording after 3 hours because M.$ thinks everyone is forking stupid and they must control everything we do. If you need a video shorter then that, the Camera app would work fine for you.

We are trying to identify exactly what is leaving tiny excrements on our back patio at night so I need to record for 10 hours at a time.