-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] obs-nvenc on Linux #4974
[WIP] obs-nvenc on Linux #4974
Conversation
How's this going? Many Linux OBS users have been anticipating this kind of addition |
Hi there, any updates on this PR? Thanks! |
Hi, I didn't have interest in working on this more because solving this properly is much more involved than I anticipated. I have a branch in my fork with more WIP work that anyone else is free to pick up. I have a bit of free time over christmas where I might work on this but no promises. |
ddee922
to
d438bb9
Compare
d438bb9
to
50abf62
Compare
Wait I actually didn't test if it compiles lmao Update: Works On My Machine |
50abf62
to
8232799
Compare
I am especially interested in Windows testers, because this PR also does some things to the Windows side. For example, it should have ARGB support now, but that is completely untested and might just be completely broken for all I know, so that would need to be tested and either fixed or disabled again before this PR can be considered for merging. Also testing Intel QSV and other encoders might be a good idea to make sure I didn't break any of them. |
be4927f
to
75b801a
Compare
second obs-qsv11 commit adapted from #4931 |
11735f0
to
5cbffb8
Compare
I applied this PR to OBS 27.2.0-beta1 on Debian 11 making something wrong is possible because I'm a user: Edit: I forgot to choose the "New NVENC" for jim-nvenc, sorry my fault. |
Adapted from code by Lin <christine.m.lin@intel.com>
And use it if non-NULL instead of encode_texture.
Most compilers other than MSVC don't support this.
4101154
to
8840c9c
Compare
I rebased the commits for One small change id recommend Thanks a bunch for this change... despite it not landing yet. |
Out of curiosity, is this still being worked on? |
It is actually. I've finally started working on this just recently in fact |
I applied the commits best I could on top of master. It compiles, but doesn't launch, errors out with Commits have been applied on top of 34e3d64 Patch can be found here, because github won't let me attach the patch file directly. |
Made some more progress, fixed the linkage errors. Compiles, launches, non-ffmpeg nvenc is selectable, but obs segfaults when trying to start a recording. Updated patchset is here, and the backtrace from the segfault is here. I'm struggling to move forward, my lack of in-depth knowledge about all this is finally showing up. Hoping the patchset is a good base for getting things working sooner than later |
yea, I was working on it, but ended up delaying it again 😅 ...I'm sorry about that. It requires merging the texture sharing PR so I had to go through those changes first. I just need to get through that PR and then I'll be able to apply it to these changes. |
I'd love to test this on linux and windows but can't compile openglfreak:linux-jim-nvenc. I can compile origin:master though, is there a more recent rebase I could try? |
@Lain-B could you mention which PR it is so we can track progress and help with testing wherever applicable? |
I'd like to see this improvement on linux version :) |
Description
Adds an OpenGL version of jim-nvenc to obs-ffmpeg.
Motivation and Context
Why is this change required?
The fallback NVENC encoder that is used on Linux copies rendered frames back to the system RAM, copies them again into an FFMPEG
AVFrame
, and makes FFMPEG upload them back to the GPU. This takes a lot of CPU time especially on older or lower-end CPUs, like my Intel i3-4370. Encoding the textures directly without copying them to system RAM solves this issue.How Has This Been Tested?
[WIP] I'm testing on Arch Linux using my Intel i3-4370 + Nvidia GTX 1060 6GB. CPU usage is decreased from around 25-30% to around 11%. The resulting video file looks correct.
Types of changes
Checklist: