You are not logged in.

#1 2021-06-05 13:30:03

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

[SOLVED] Camera lag, but not with a dummy device

I was setting up a quick "mirror" using my webcam, and created the loopback per https://wiki.archlinux.org/title/Webcam … deo_stream. Works a treat, and I can now run a virtual mirror with a single command.

However, this has exposed something. Using ffplay to connect to the dummy camera, everything is fine. If I do the same to the actual camera, there's a camera lag (maybe 1 - 2 seconds).

If I set the camera going via the dummy device with no filtering (the mirror slips horizontally), it's real time.

What's causing the delay on direct to camera.

for info, I'm using:

 ffplay /dev/videoX

in both cases. Directly to the camera device = lag. To the dummy device = no lag.

Last edited by Roken (2021-06-06 19:49:13)


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

#2 2021-06-05 14:16:22

JonL
Member
Registered: 2021-06-05
Posts: 7

Re: [SOLVED] Camera lag, but not with a dummy device

The buffer options are under the extended (ffplay-all) man page.

ffplay -fflags nobuffer -avioflags direct -i /dev/videoX

Offline

#3 2021-06-06 19:48:58

Roken
Member
From: South Wales, UK
Registered: 2012-01-16
Posts: 1,253

Re: [SOLVED] Camera lag, but not with a dummy device

Thank you. Not only answered my question, but also greatly simplified my mirror.


Ryzen 5900X 12 core/24 thread - RTX 3090 FE 24 Gb, Asus Prime B450 Plus, 32Gb Corsair DDR4, Cooler Master N300 chassis, 5 HD (1 NvME PCI, 4SSD) + 1 x optical.
Linux user #545703

Offline

Board footer

Powered by FluxBB