# QSV Encoder on Windows 7



## Incalex (Jun 14, 2016)

Sooo, I wanna talk about the QSV Encoder currently implemented in OBS Studio.

I already made a thread about a bug I have with the current implementation (see https://obsproject.com/forum/threads/quicksync-encoder-failure.48782/)

Old OBS (OBS Classic?) had a similar bug. It was solved thanks to Shinck's patch for QSVHelper.exe (see https://obsproject.com/forum/thread...killed-encode-failed.19230/page-3#post-161984)

So, I kinda tried to implement the same thing on OBS Studio.

Aaaand so far, it works. I already put a patch on my bug thread, but it was incomplete and would crash as soon as you restart the encoder (stop streaming/recording and restart).

I made some more modifications (still based on Shinck's patch) and now, well it works fine.

I forked the current master branch on GitHub and applied my patch. It is a single commit:
https://github.com/Incalex/obs-studio/commit/8e7c00fea3cf46cc6e47ebbe95eca4f40e97a601

Now, I haven't yet made a pull request because I'm fairly sure I'm REALLY far from respecting OBS Style Guidelines (and let's be honest, I did that a really ugly way).

In conclusion, my patch is more of a PoC on how to fix my problem (but a stable one. I'm really using it to stream!).

Keep in mind it is totally specific on Windows 7 as Win8+ use a DirectX11 Allocator and Device (and it uses specific DX11.1 functions that were never ported on Win7).

Also, I did all of that without any knowledge about DirectX, or QSV. It's totally a port of Shinck's patch on OBS Studio. All credits should go to him!

For the moment, I don't really wanna PR that commit. I'm mostly asking if you think it's not "that" bad and I should mostly try to respect more guidelines without doing a huge refactor (and would love receiving any remarks about my awful patch on what I should change), or if you prefer to take all that data and implement things on your side.

At least, I hope I helped o/


----------



## Jim (Jun 14, 2016)

I'll have one of the quicksync experts take a look, thank you very much for taking the time to do this!


----------



## r1me (Oct 15, 2016)

Hi, was it finally implemented in any form ? OBS Studio 0.16.2 + Windows 7 + QuickSync: is still impossible to record/stream because it crashes internally after quick and random period of time. All latest drivers. I wish i had knowledge of Incalex to apply that patch and rebuild OBS, or maybe someone can do this and post binaries ?


----------



## Incalex (Oct 15, 2016)

r1me said:


> Hi, was it finally implemented in any form ? OBS Studio 0.16.2 + Windows 7 + QuickSync: is still impossible to record/stream because it crashes internally after quick and random period of time. All latest drivers. I wish i had knowledge of Incalex to apply that patch and rebuild OBS, or maybe someone can do this and post binaries ?


Hi, here's a link of the compiled DLL for 32bit and 64bit versions of OBS Studio.
I currently use them without any problem at all. No crashes, nothing wrong, works perfectly >FOR ME<.
Obviously, if you encounter any problem about that modified QSV version, don't contact directly the OBS Studio devs as it could be my DLL that is the source of any problem.
Here's where you can download the DLL: https://github.com/Incalex/obs-studio/releases/tag/0.16.2

Hope it fixes your problems with QSV on Win7 ;)


----------



## Jim (Oct 16, 2016)

I'm sorry, I'll make sure to add it if it works before next patch.  I got majorly overdue for that last patch and didn't get everything in.


----------



## xForcer (Dec 19, 2016)

I am in your debt Incalex. I was so stressed that I couldn't record anything with Quick Sync. I almost gave all the hopes but then I remembered I used Shinck's patch back on OBS classic for streaming. So I gave it another shot in google search and I found you. My savior! ..... I am so happy right now I could kiss you! 
OBS Team, hire him!


----------



## dodgepong (Dec 19, 2016)

xForcer said:


> OBS Team, hire him!


Just to be clear, OBS is an open source project and all contributors are volunteers. Incalex, like anyone else, is free to submit any pull requests they want. However, nobody gets paid "by OBS" for anything.


----------



## xForcer (Dec 19, 2016)

dodgepong said:


> Just to be clear, OBS is an open source project and all contributors are volunteers. Incalex, like anyone else, is free to submit any pull requests they want. However, nobody gets paid "by OBS" for anything.



I knew that. It was more like: "OBS Team, give him a forum badge" but I haven't used any emoticon to make it funny :)
Anyway, you should implement his fix in your release versions. That should remove the headache people are having when using Quick Sync on Windows 7.


----------



## Jim (Dec 29, 2016)

I merged this in 17.0 by the way.


----------



## xForcer (Dec 31, 2016)

Thank you very much Jim!


----------



## Incalex (Jan 4, 2017)

xForcer said:


> I knew that. It was more like: "OBS Team, give him a forum badge" but I haven't used any emoticon to make it funny :)


You're doing too much, I'm happy I could be of any help but my contribution to OBS is by far nothing compared to the work of everyone else. I did one patch and that is all ^^

I also partially feel bad that a such ugly patch was merged (maybe I'll take the time to reformat that in something that looks like decent code :>), but hey, if it works perfectly, then it's fine ;)
At least I'm glad I could contribute! I guess that's a fair payback considering how much I've been using OBS since it was created.


----------

