Bug 6072

Summary: Huge amount of error logs on OBS Studio when camera doesn't return framerate
Product: Fedora Reporter: Daniel Sales <daniel.sales.z>
Component: obs-studioAssignee: Momcilo Medic <fedorauser>
Status: RESOLVED EOL    
Severity: major CC: leigh123linux, mgansser
Priority: P1    
Version: f34   
Hardware: x86_64   
OS: GNU/Linux   
namespace:

Description Daniel Sales 2021-08-27 21:18:16 CEST
Hello,

I have 4 webcams connected to obs under linux (Fedora). When the application starts, a huge amount of errors start to appear related to two of the cameras (Xbox camera connected using the kinect driver and a VGA usb webcam). They are used for secondary footage, but the logs start appearing when OBS is initialized, even if the cameras are not being used, but set in at least one scene. This started happening when I moved from Fedora 32 with OBS 26.1.0 to F34 with OBS 27.0.0.

The cameras work correctly, but the error messages are logged at a rate of several thousands per second, and can create a log of several GB in a few minutes. These are the errors:

v4l2-input: /dev/video1: select timed out
v4l2-input: /dev/video1: failed to log status
v4l2-input: /dev/video8: select timed out
v4l2-input: /dev/video8: failed to log status
...[same messages thousands of times]

The initial configuration shows that those 2 cameras display a negative timeout:

07:55:56 PM.835: v4l2-input: Start capture from /dev/video1
07:55:56 PM.835: v4l2-input: Input: 0
07:55:56 PM.835: v4l2-input: Resolution: 640x480
07:55:56 PM.835: v4l2-input: Pixelformat: BGR3
07:55:56 PM.835: v4l2-input: Linesize: 1920 Bytes
07:55:56 PM.835: v4l2-input: Framerate: -nan fps
07:55:56 PM.836: v4l2-input: /dev/video1: select timeout set to -9223372036854775808us (5x frame periods)
07:55:56 PM.836: v4l2-input: Start capture from /dev/video2
07:55:56 PM.932: v4l2-input: Input: 0
07:55:56 PM.933: v4l2-input: Resolution: 640x360
07:55:56 PM.933: v4l2-input: Pixelformat: YUYV
07:55:56 PM.933: v4l2-input: Linesize: 1280 Bytes
07:55:56 PM.933: v4l2-input: Framerate: 30.00 fps
07:55:56 PM.933: v4l2-input: /dev/video2: select timeout set to 166666us (5x frame periods)
07:55:56 PM.933: v4l2-input: Start capture from /dev/video6
07:55:56 PM.989: v4l2-input: Input: 0
07:55:56 PM.990: v4l2-input: Resolution: 1920x1080
07:55:56 PM.990: v4l2-input: Pixelformat: BGR3
07:55:56 PM.990: v4l2-input: Linesize: 5760 Bytes
07:55:56 PM.990: v4l2-input: Framerate: 30.00 fps
07:55:56 PM.991: v4l2-input: /dev/video6: select timeout set to 166666us (5x frame periods)
07:55:56 PM.999: v4l2-input: Start capture from /dev/video8
07:55:57 PM.000: v4l2-input: Input: 0
07:55:57 PM.000: v4l2-input: Resolution: 1280x1024
07:55:57 PM.000: v4l2-input: Pixelformat: YU12
07:55:57 PM.000: v4l2-input: Linesize: 1280 Bytes
07:55:57 PM.000: v4l2-input: Framerate: -nan fps
07:55:57 PM.001: v4l2-input: /dev/video8: select timeout set to -9223372036854775808us (5x frame periods)

I guess the problem is because v4l doesn't return the framerate for those cameras

Code:
> v4l2-ctl -d /dev/video1 --get-parm
Streaming Parameters Video Capture:
    Frames per second: invalid (0/0)
    Read buffers     : 2

> v4l2-ctl -d /dev/video8 --get-parm
Streaming Parameters Video Capture:
    Frames per second: invalid (0/0)
    Read buffers     : 2