Repository navigation
Description
Operating System Info
Other
Other OS
Manjaro Linux
OBS Studio Version
Other
OBS Studio Version (Other)
OBS 32.1.0, 32.1.2 (distro packages), also present in Flatpak; v4l2 plugin distro packaged or latest from git (optionally w/ patch below)
OBS Studio Log URL
OBS Studio Crash Log URL
No response
Expected Behavior
When setting the framerate in Source Properties, the device would be set to the framerate selected. (30 in my case)
Current Behavior
The device in my case ends up set to 60fps.
It attempts to set the device to inf (selected FPS / 0) which results in v4l2 picking the best it can (60 in my case).
Steps to Reproduce
- (optional) In v4l2-input.c, at line 944 add the following:
v4l2_unpack_tuple(&fps_num, &fps_denom, data->framerate); blog(LOG_DEBUG, "Attempting to set framerate: %.2f fps, (%d / %d)", (float)fps_denom / fps_num, fps_denom, fps_num);v4l2-input_better_debug.patch - (assuming a v4l2 source is already set up, if not add one)
- change the framerate in the source properties
- observe that the chosen framerate has not been applied correctly
- (in my case) get mad because input device stops working
...
Anything else we should know?
Best I can tell, the packed framerate is being truncated to 32 bits somewhere in OBS's properties storage, which results in an FPS denominator of 0. If I edit the relevant line in ~/.config/obs-studio/basic/scenes/[scene name].json to have the correct 64bit packed value (4294967326 for 30FPS), the device is initially set correctly (until Properties is opened). (Why does simply opening the Properties even set anything??? see #3092) If setting is changed and saved, the JSON will contain only the numerator (30), rather than the correct packed value.
This is a significant problem for some (probably cheap) video devices like mine which do not actually work at 60FPS at full resolution.
Activity
acscd commentedon May 2, 2026
Possibly
v4l2_set_framerate(v4l2-helpers.c) should sanity check for a FPS numerator or denominator of 0. Could even put a workaround there, but that wouldn't really solve the problem.acscd commentedon May 4, 2026
I just got 32.1.2 from Arch/Manjaro; it also has this issue.
acscd commentedon Aug 20, 2026
Confirmed still present in latest versions, however I found the bug: the
inton line 590 of v4l2-input.cshould be auint64_t.PR opened