# [Feature request] NVFBC api capture support



## Voodooman (Feb 24, 2018)

https://developer.nvidia.com/sites/...IDIA_Capture_SDK_6/NVIDIA-Capture-SDK-FAQ.pdf 

Its not really hard, does not require to pay anything, and make me wonder, why NVFBC still not implemented in OBS and we have to use slow software capture that hurts performance of games, especially on old software? Please, somebody, do NVFBC support ASAP!

Nvidia Expirience while lacking features, still outperforms OBS in every aspect thanks to NVFBC and NVENC, while ENC already exist in OBS it only soves half of problem - real time hardware encoding, but not the real time hardware capture without lag and performance cost.


----------



## ynetwork (Feb 25, 2018)

I have heard that NVFBC 'appears' to be free, but it is only for the registered making an open-source program like OBS Studio is unable to access.

*typo.


----------



## Osiris (Feb 25, 2018)

Voodooman said:


> https://developer.nvidia.com/sites/...IDIA_Capture_SDK_6/NVIDIA-Capture-SDK-FAQ.pdf
> 
> Its not really hard, does not require to pay anything, and make me wonder, why NVFBC still not implemented in OBS and we have to use slow software capture that hurts performance of games, especially on old software? Please, somebody, do NVFBC support ASAP!
> 
> Nvidia Expirience while lacking features, still outperforms OBS in every aspect thanks to NVFBC and NVENC, while ENC already exist in OBS it only soves half of problem - real time hardware encoding, but not the real time hardware capture without lag and performance cost.



OBS cannot use NVFBC (NVIDIA does not allow it), it also won't improve performance that much. OBS also does scene compositing on the GPU, Shadowplay has no scene compositing at all.


----------



## Voodooman (Jan 24, 2019)

Like how OBS cannot use it? It totally can.

You need to be registered user on developer portal to download SDK, but it does not restrict you from using it in open source software.
If you worried about compilation on systems that has no SKD installed - precompiller definitions exist for that - if sdk not present than compile with alt code path that does not utilize sdk headers.

Here is example of open source software that uses NVFBC https://github.com/gnif/LookingGlass/tree/master/host/Capture just examine this code and repeat it, and download SDK for headers, and thats it.

OBS has NVENC support, and its license terms does not differ from NVFBC. If you can use NVENC you can use NVFBC and NVIFR.

Another even better example of usage of NVFBC in open source software is here
https://github.com/bloodelves88/CloudyNvCapture

Here some documentation https://developer.nvidia.com/sites/...docs/NVIDIA Capture SDK Programming Guide.pdf
http://on-demand.gputechconf.com/gt...deshpande-get-to-know-the-nvidia-grid-sdk.pdf

Here the capture SDK itself: https://developer.nvidia.com/capture-sdk

Please, implement it into OBS! Im tired to wait years, not using OBS because of negative performance impact on my old CPU, while Shadowplay gives silk smooth performance, and difference is huge since it does not cost CPU and GPU power.

As about composition - this is incorrect, latest version of Shadowplay uses composition for picture overlay and even for rendering of chat, yet again while its not connected to capture with NVFBC since compostion happens after that, it does not affect game performance at all and in terms of performance and compatibility shadowplay is superior to OBS.

The biggest advantage of NVFBC and NVIFR is not just low latency and good performance its also compatibility since you dont need to hook any rendering api at all and basically NVFBC and NVIFR is low level and bypasses all rendering apis levels and just gets frame directly from framebuffer. Direct access to hardware frame buffer is always better than all the hacks and tricks OBS uses now.

Capturing apps with current OBS methods is a pain, its not always works, it does not work well when game switch from fullscreen to windowed or alt tabs or changes resolution, it also has conflicts with some sofware and graphical mods that hooks rendering api and on top of that software capture eats CPU on breakfast, slow and lagging behind game, and as more game CPU sensitive, as slower performance of it with OBS. NVFBC and NVIFR is absolutely a must option for OBS and there is no reason to not implement it.


----------



## dodgepong (Jan 24, 2019)

You are correct that it would be possible to add NVFBC support, sure, but currently the NVIDIA Capture SDK only makes that functionality available to professional-tier GPUs (Teslas and Quadros) (See section 1.4 in the release notes: http://developer.download.nvidia.co.../7.1/NVIDIA_Capture_SDK_7_1_Release_Notes.pdf). NVFBC is not available on consumer-level cards, even the new RTX 20XX series. Even the Looking Glass example that you posted acknowledges this shortcoming.

That's a pretty major shortcoming, making it nearly useless for almost everyone who uses OBS unless they happen to have a professional tier card. If they have such a card, it's not likely that they are having severe enough performance problems to make such an addition worthwhile.

Thus, the reason not to implement this right now is because the amount of of people who would benefit from it does not justify the amount of time that it would take to implement it. There are simply more important things to work on right now.


----------



## Voodooman (Jan 24, 2019)

dodgepong said:


> You are correct that it would be possible to add NVFBC support, sure, but currently the NVIDIA Capture SDK only makes that functionality available to professional-tier GPUs (Teslas and Quadros) (See section 1.4 in the release notes: http://developer.download.nvidia.co.../7.1/NVIDIA_Capture_SDK_7_1_Release_Notes.pdf). NVFBC is not available on consumer-level cards, even the new RTX 20XX series. Even the Looking Glass example that you posted acknowledges this shortcoming.
> 
> That's a pretty major shortcoming, making it nearly useless for almost everyone who uses OBS unless they happen to have a professional tier card. If they have such a card, it's not likely that they are having severe enough performance problems to make such an addition worthwhile.
> 
> Thus, the reason not to implement this right now is because the amount of of people who would benefit from it does not justify the amount of time that it would take to implement it. There are simply more important things to work on right now.



Wait a minute!

First - it is available on any customer Nvidia card starting from GTX 6XX series!

Just gen in here if AppData\Local\NVIDIA Corporation\NvFBC and you may find a log of NVFBC and NVIFR like this

## 2017-04-03 11:13:16.268 | NvFBC | PID 18392 ## : NvFBC_GetStatusEx :: Success (NVFBC_SUCCESS). .

How am i reading and having this is its not available" ? XD

How my Shadowplay works? How my STEAM streams game to Moonshine and Nvidia Shield and my Androind phone?
They all utilize NVFBC*.dll that comes shipped with every driver since 320* .

There is a difference between "not available" and "legaly restricted to use".

Also, this restriction only started to apply to recent versions of capture SDK, the PDF of old 2016 SDK version which i linked above does not have any legal restriction, and its cant be retroactive, new license terms applies to newer SDK, not older. Also. license terms apply to SDK as whole. but not to some stand alone headers and libs taken out of context.

So solution is simple - get older sdk pre GRID\TESLA only and get headers from it... or. get recent SDK with recent headers and mix them with older SDK and pretend like they old and, give no crack about new license terms for newer SDK, since you only need few headers and libs to compile. 
Just in case - i have master of laws degree and know what im talking about in terms of laws. 

Surely you will enter legaly grey area - but Nvidia would not sue you for that, its not an issue for them that will do them any harm, they may not even nottice, and even if they will and try in worst case - OBS has such a huge fan base it will hurt Nvidia reputation and they will fall back and most likely under preasure of negative reaction will remove restriction and will most likely grant legal permission to OBS or anyone. 

Just imagine every twitch and other service streamer who uses OBS will see announcment on  this site or in OBS itself that nvidia try to sue OBS for using NVFBC or requesting to remove (this is really not going to happen, dont be so scared) it - hundreds of thousands if not millions of people will spam nvidia with demands and other not so pleasant words of dissapointmen, and even some gaming sites will surely write about it and nvidia will have to back off. So you should not be afraid to possibly violate this minor license term, or not really violate it if you would get older SDK version which does not have such license restrictions! 

You, western people, are so bullied and scaried by corporations and goverments, and so afraid to do any minor thing that violates something... in Russia we simply dont care much and do what we want with any API and source code and in most cases nobody gives a fruck about any russian software violating any license terms. Maybe you should learn this legal bravery from us? You have an huge army that will protect you in case someone will not be happy that you added NVFBC\NVIFR support to OBS... and even chances of that someone in Nvidia will be that much so unhappy that you implemented api support - are very low, so risk is low and you really have to try doing that.

Also, if you are so legal and so afraid to enter grey are... you can always just contact Nvidia (like their forum moderator ManuelG) as OBS developer and request invidual license permission for OBS to use it. And im pretty sure they will grant it to creator of such a popular software that will surely help NVIDIA to win more customers as OBS users will benefit a lot in terms of performance when using OBS and OBS will simply become yet another promotion source for NVIDIA products (which you should mention to nvidia when you will request permission, so they can realise obvious benefits of implementation of NVFBC and NVIFR in OBS)! You did not yet try to get license permission for it, did not you? Please, try! 

You can also try to request some help with implementation of compostion the most effective way that does not waste much of gpu or cpu power or maybe joing the forces with NVIDIA to let Shadowplay and OBS communicate, so that, for example, Shadowplay would have option to not stream to service directly, but would stream into local OBS which would do the rest of job and would report back to SHadowplay number of viewers and stream status and composed overlays... just saying. Nvidia is very helpful to developers of something popular and OBS is very popular and inspired whole Expirience streaming feature.

In worstest of all cases - you can cut the NVFBC source code part from public open source version, yet release officia compiled binary with its support... which would be overkill since nothing bad will happen so you dont need to do that, but in case you afraid that much this is the last resort.

i forgot to mention - license says about usage of SDK of recent version, but i dont see it restricts shipped product to use nvfbc api on customer cars. So you can use this wildcard as well ;-)

And about this part:



> Thus, the reason not to implement this right now is because the amount of of people who would benefit from it does not justify the amount of time that it would take to implement it. There are simply more important things to work on right now.



Once we already cleared out that API is AVAILABLE ON ANY CUSTOMER GEFORCE CARD and CAN BE USED BY OBS, let me remind you that NVIDIA has majority of market and most of GPU owners has NVIDIA card, so amount of people who would benefit from it as HUUUUUUUUGE, basically every nvidia owner who uses OBS will benefit from it. Last time i checked this https://store.steampowered.com/hwsurvey/videocard/ which was just right now -  74% of steam users will totally benefit from implementation of NVFBC in OBS.

Let me remind you benefits:

No performance affects on games at all, no cpu or gpu utilisation during capture (and encoding as wel in case if combined with NVENC which is implemented in obs)  - which is the most important part!
Almost 100% compatibility and direct hardware capture of basically any fullscreen and desktop app.
Very low latency, perfect video and audio sync for those who loves imediate streams.
Easy implementation - seriosly, look at code from links above, its as easy to add to OBS it can be done in one day, and with testing and debuging it could take a week or two before ready to be release. You dont need to invent a wheel - use sources from above, copy and past code path for other capture source, leave the "shell" that wrapps it around and replace core of copied capture code with nvfbc capture code from examples above, then modified it to make it works, and add toggle option and few settings for it to UI and thats about i. then testing and debuging would take the most of time. If only i would not be such a lazy and busy to re-learn forgotten by me not so often used programming languages, i would add nvfbc to obs myself. I dont remember syntax and some details but i remember basic principles and whole algoritm and i dont see this taks as hard and time consuming. I bet such an expirienced and talanted coder as you are and  rest of OBS could do this at single weekend. 

Maybe you could just at least try to mess with NVFBC ... PLEASE? People wainting years for this to happen in OBS!


----------



## dodgepong (Jan 24, 2019)

No.


----------



## Voodooman (Jan 29, 2019)

Its bad decision, seriosly :-(

Ok, how can a plugin be made that will capture everything via NV apis? I mean where should i read manuals exactly about capture plugin creation?

Because even this exist https://obsproject.com/forum/resour...-framework-encoder-plugin-for-obs-studio.427/ for AMD hardware capture, but nothing for NVIDIA, and you just dont realie what advantage it may give to OBS, it it will stop relyin on software capture and will perform as good as NV Expirience.


----------



## dodgepong (Jan 29, 2019)

I fully understand what advantage NVFBC offers. We're not going to try to hack something or circumvent something to get support for NVFBC for non-Quadro/Tesla cards. We are going to wait until NVIDIA releases an SDK that makes that functionality available in a manner compatible with the GPL.

And that plugin you linked is for the AMF _encoder_. It has nothing to do with _capture_.

Sorry, this is the end of the discussion. Come back when NVIDIA have changed their minds.


----------



## DeMoN (Mar 11, 2019)

dodgepong said:


> Come back when NVIDIA have changed their minds.


I guess they wont. Because there is just one reason I could imagine of:
Artificial better performance in Shadowplay makes marketing happy!

At least they dont reduce memory clock by about 500mhz anymore as soon as a 3rd party application accesses NVEnc.
That showed even more to me that they just want to make shadowplay shine like a bright star.


----------



## MikeZTM (Oct 1, 2019)

dodgepong said:


> I fully understand what advantage NVFBC offers. We're not going to try to hack something or circumvent something to get support for NVFBC for non-Quadro/Tesla cards. We are going to wait until NVIDIA releases an SDK that makes that functionality available in a manner compatible with the GPL.
> 
> And that plugin you linked is for the AMF _encoder_. It has nothing to do with _capture_.
> 
> Sorry, this is the end of the discussion. Come back when NVIDIA have changed their minds.



Good news. NVIDIA is deprecating NVFBC on Windows 10 in favor of native API in Windows 10 doing the same work.
They even post a sample project:
https://github.com/NVIDIA/video-sdk-samples/tree/master/nvEncDXGIOutputDuplicationSample

Will OBS support this on Windows platform in the future?


----------



## dodgepong (Oct 1, 2019)

Possibly. We spoke to an NVIDIA representative about this at NAB last April. The one downside to this capture method is that it puts a yellow rectangle around the thing you're capturing, which users may or may not like. We haven't had opportunity to look into it ourselves but we would welcome discussion around this if there are any developers out there who want to take a stab at implementing this.


----------



## marrizard (Sep 3, 2020)

Any news about getting NVBFC in OBS for windows?
I see there is a plugin for linux. Really hoping we get one for windows as well.


----------



## dodgepong (Sep 3, 2020)

Can you link to said Linux plugin?

As stated earlier, NVFBC is being deprecated on Windows 10 in favor of the new capture API. We have already implemented the new capture API so there isn't much point into implementing anything new for NVFBC on Windows.


----------



## marrizard (Sep 9, 2020)

here is the link for the linux plugin https://obsproject.com/forum/threads/obs-nvfbc.105590/
and what is the new API? very curious.


----------



## dodgepong (Sep 9, 2020)

As noted in the plugin description and earlier in this thread, that is only for Quadro/Tesla cards. It won't work on consumer cards like GeForce/GTX/RTX cards. That is too much of a niche use case for us to both implementing it into the main program.

The new capture API is WIndows Graphics Capture (WGC). It was implemented in OBS Studio v25 as part of Window capture.


----------



## an3k (Apr 14, 2021)

Get this https://github.com/keylase/nvidia-patch/tree/master/win and you can use NVFBC on a RTX 3090 (that's a joke this card doesn't allow you using it) or any other GeForce card.


----------



## DeMoN (Apr 14, 2021)

NVFBC in OBS would be really epic. Then no hook into the games anymore.
But who would program this?
We also STILL have no Overlay in OBS -.-
Every single recording capture program can draw an overlay over your exclusive fullscreen game (even early fraps had a fps display)
But OBS just cant..
Imagine having the chat overlayed in your game, or your current song. All would be possible if the program would finally support a damn overlay.
I also would like to see if I'm recording or not, and if the hook into the game was succesful. All would be possible with an overlay..


----------



## Nyaako (Mar 22, 2022)

I'm also in favor of wanting NvFBC support and feature on OBS. Especially considering there are now patches for it on Windows now thanks to keylase on github (the same link posted by an3k).


----------



## terrorfrog (Apr 11, 2022)

i second this, all problems gone away on single pc linux with nvfbc hackaround.
no framelags, nothing, it just works. on windows i cannto record or stream apex on 1440p (downscale to 720 or something) 
at all. lags are to much, like literally gamechanging. thats on a 9900k 5ghz oc , 3090. its a monster of a machine cant do signle pc streaming.

on linux same machine you wont even notice obs is running or recording. with nvfbc its like zero load. my pc actually might run to cool now and need a winter coat


----------

