Open wow-rambler-project opened 3 years ago
I'm having a very similar issue. When I have my video format set to YUYV 4:2:2 on Linux, I get a max of 5 FPS and OBS changes the framerate shown in v4l2-ctl
to 5 FPS as well.
As soon as I switch to any other video format such as BGR3 (Emulated), I have all my framerate options.
That's an unrelated issue. You're using some USB 2.0 device that simply can't push more than 5 FPS of uncompressed video. It will use MJPEG for anything higher but if that's not an option in OBS then I guess our v4l2 source doesn't support that. Using the emulated modes should be fine though.
As far as the issue at hand is concerned, I guess that it might be due to XRGB
corresponding to RGB32
, and PCIe 2.0 x4 is probably just not enough bandwidth to actually transfer a 2160p60 stream with 32 bits per pixel. I don't have that device on hand so it's hard to test, but I imagine that adding a mode that uses RGB24
internally is probably not too difficult.
Ah, that makes a lot of sense and also explains why it worked fine in guvcview
, it was setting the format to MJPEG. Thank you, @derrod.
As far as the issue at hand is concerned, I guess that it might be due to
XRGB
corresponding toRGB32
, and PCIe 2.0 x4 is probably just not enough bandwidth to actually transfer a 2160p60 stream with 32 bits per pixel. I don't have that device on hand so it's hard to test, but I imagine that adding a mode that usesRGB24
internally is probably not too difficult.
I have similar thoughts. Though PCIe 2.0 x4 is capable of transferring 2 GB/s. An 3840x2160 image at 60 FPS is exactly 15,925,248,000 bits per second. So barely below the limit. Nevertheless, it is suspicious as 48 FPS is a "nice looking" number.
As for the solution - I found an old PR which has added BGR3 support. Does not look too complicated. Though I am not familiar with the code base and I might be quite wrong in my assessment.
Same problem with avermedia GC573 on OBS 27.2.3, recording's framerate was obviously lower than nv12.
Platform
Operating system and version: Windows 10 Pro 20H2 19042.746 OBS Studio version: 26.1.1 2021-01-30 16-53-35.txt
AverMedia CL511HN frame grabber.
Two machines:
Expected Behavior
RGB24 should be available on the frame grabber's video format list. Alternatively, XRGB video format provides 60 FPS.
Current Behavior
Available options: ARGB, XRGB. Using XRGB video format causes FPS drop to 48 instead of requested 60.
Steps to Reproduce
Additional information
Also tested with XSplit where RGB24 mode worked well at 60 FPS.
An example log attached.