OBS branch with AMD VCE support.

Benman2785

Member
@jackun no i use the latest driver + AMF and not OVE (because with latest driver it wouldnt work anymore)

iPicPeriod has impact on how steady video quality is - i can show you some vids of Dying Light with ipp at 6 or at 0 -> you will clearly see that if it's set to 6 (forced I-Frames every 6 frame) it's much more stable in quality for the same scene as if its set to 0 -> it wont jump that much between minQP and maxQP -> and that could only mean it has an i-frame to refer to and that "I Pic Period" still works in AMF

ps it would be great if you would join OBS Studio Devs to impliment a working AMD VCE ;)
 

Benman2785

Member
@Kuss YES it works with that version - BUT you have to choose right version (i386 or x64) & install all depending software (.dot net + MS Visual c++ 2013)
 

chummy

Member
I was using OBS-Studio + AMF VCE in Win8.1 and worked pretty fine recording 1080@60fps videos there with my GCN 1.1. Then decided move on to Windows 10 and just discovered now same AMF VCE cant do 1080@60fps anymore, i'm limited at 1080@30fps now.

Why same game with same OBS-Studio codec version can do 1080@60fps at Windows 8.1 but cannot at Windows 10?

The strange thing is than video playback has a steady 60fps, but the screen scene is running worse than slideshow with lots of frame skipping. With OBS1 Jackun VCE in Win10 at 60fps its running much better with steady 60fps too but scene screen has some small frame skipping. But Jackun VCE is almost there like AMF VCE in Win8.1
 

Benman2785

Member
@chummy

OBS VCE (jackun) is different to OBS Studio AMD VCE Encoder

if using 1080p60 with jackun's OBS VCE you should set it to Balanced or Speed // you can also add some nice custom settings to improve video quality and smoothness

ps you CANT stream with OBS Studio VCE -> HIGH peaks result in dropped frames (https://obsproject.com/forum/threads/obs-studio-amd-vce-bitrate-problem.45454/)
pps you CAN stream with OBS VCE (jackun) -> with good settings you get a really good quality with no dropped frames (720p60 is possible on twitch)
 

chummy

Member
Benman2785

I know about the difference in Studio vs OBS1 VCE branches. If you read my post you see i separate the experience i got with both versions. I dont stream, only record local and always use performance presets since i use higher bitrate to keep quality.

OBS1 Jackun VCE output laggish/frameskipping 1080p@60fps both in Win8.1 or Win10.

OBS-Studio VCE is capable to output very nice 1080p@60fps in Win8.1, but in Win10 it just become worse than Jackun version.

Tht's just not understable why Studio downgrade performance with Win10, and yet why Jackun branch is not capable to reach Studio VCE branch performance from Win8.1.
 

Benman2785

Member
@chummy -> first ever use @ before username so i get a mail

and you didnt followed my link - it says that OBS Studio is under development
AND you didnt understand to use SPEED or BALANCED as custom settings in AMD VCE Encoder tab of OBS VCE jackun ->
chummydummy.jpg


AND then change IDR Period to 120

so you JUST CLICK on Speed (works best in 1080p60 for up to GCN 1.1) OR Balanced (also works in 1080p60) AND change IDR Period to 120 - if you rec with 60fps

maybe use I Pic Period of 6 or 10 or 15 (or 0) and DONT CHANGE SETTINGS below (under) DEVICE TOPOLOGY ID after you pressed Speed or Balanced

USE a GOP of 30 -> if you take 60 your GPU has to much load // and if you play your game on Ultra please reduce some detail = high looks usually also pretty nice and will allow your gpu more resources for doing its magic :)


//

they use different ways to do their magic // on the very last page before its also written WHY

ps jackuns way is MUCH better (yet) - but you have to know what you are doing -> what you clearly dont :p

pps WHY CANT YOU READ THE VERY FIRST POST AND FOCUS THE FIRST BOLD WRITTEN TEXT?

ppps -> its ok - thats why i made a picture for you :p
 
Last edited:

chummy

Member
@Benman2785

Of course i know what you mean, when i say performance(Speed) preset. I already unchecked every box there to try it but yet dont achieve the smooth from StudioVCE@Win8.1.

Jackun VCE output is becoming with frameskipping/choppy playback, but already has better results than before.

Game quality not justify to not achieve 1080p@60fps with fastest Preset. StudioVCE@Win8.1 runs smooth and with heaviest games at max settings like GTA 5, BF4, Witcher 3 and so on.

But Studio VCE thing is strange, for me looks them using some Speed Preset in Win8.1 while in Win10 it's using something like Quality preset.
 

Benman2785

Member
@chummy

main problem is the way MS Framework 4.5 works in Win8.1 and Win10 -> different way of using CPU, GPU and RAM -> there is where your different GPU-loads come from -> and that is why Studio perfoms diffferent on both OS

i will set up some settings (jackun's OBS VCE) for you and you try them ok? -> what is your card as there r many GCN 1.1 on the market -> may differ in best possible settings

and as i said the handlers work different on both OS -> so you need to reduce Quality in Game a little with Win10 if your GPU has a special kind of load -> because that is what blocks VCE full-magic

i post picture of settings in 5min
 

Benman2785

Member
@chummy

set it EXACTLY to this:
chummy_settings_1.jpg


that should work fine

you can also try:

chummy_settings_2_bframes.jpg

can may be choppy or have high peaks

if that is choppy set I Pic Period to 0 and Num of B-Frames to 3 -> should also help with peaks

// and if you disabled ALL Options below 'Device Topology id' you also disable some that would have saved some GPU load -> this can also make it choppy -> so dont do that unless you know what u r doing


// ps i choosed GOP of 15 to reduce GPU load - but you can also use a GOP of 30 (as youtube recommend)
 

Benman2785

Member
@chummy
studio vce in win 10 is frameworks problem

OBS VCE - try my settings -> looks like a problems of how i/p/b frames are set - use gop 30 / idr p 120 / num of b frames 3 / ipicp 6 / on speed preset // it should work, if not try to reduce detail-level and check again ;)
 

true gameplay

New Member
Github repo for the branch.

I've implemented some support for AMD VCE, you may read about it Here at AMD's blog.

There is currently 3 implementations: with the older OpenVideo encode API (OVE) and with AMD Media SDK (Windows' Media Foundation transform aka MFT).
As of now, with Drivers 15.7 and above, OVE is no longer possible since it has been phased out to be replaced by AMD's AMF(Framework) entirely.

If you have a qualifying:
GCN 1.0-1.1 card, up to 1080@30 or 720@60 can be utilized with the "Quality" preset. Anything above that (1080@60) will need either "Balanced" or "Speed" presets which can all be found in the AMD VCE Settings tab of OBS.
GCN 1.2 card, up to 4K/30fps (untested, only with AMF) but should do 1080@60 easily with Quality preset. After testing, this still doesn't work, might be the SDK.

Please check your GPU below for support level:

Current formula for fixed quantizer parameter values is 40 - (quality * 5) / 2.

GPU heavy games can cause frame freezing. You can try disabling D3D10 interop (and with AMF, select "Host" engine type) so that encoder preparation work is done on CPU instead. But then there is the issue of copying stuff into GPU VRAM so it might not give any performance boost.

OVE version can use OpenCL for colorspace conversion (YUV444 to NV12), but it is currently done before passing the frame to be encoded. It adds to encode time and can make OBS drop frames so it is better suited for 30..50 fps recording and low performance CPUs, for now.

For clarification:
  • AMF: OpenCL interop assumes that the video adapter OBS uses also has VCE support. There's a secret AdapterID setting that may or may not work for selecting another adapter.
  • D3D & OpenCL interop doesn't have anything to do with games, only with OBS as it uses D3D10 to do its magic. Ticking it makes OBS use CPU for NV12 conversion instead and on Win8+ DX11 engine will use NV12 textures. Dx9 and Win7 resort to using host memory for NV12 buffers.
  • Device TopoID is the 'physical' location on motherboard, not device vendor ID etc. as you can have more than 1 device with same ID. Check log (window). It only affects OVE because if I'm not missing something, you can't specify device for AMF (yet). But it could be using the device that AMF context got init'ed with. If that's the case then it uses the selected device from Video > Video Adapter.
Installation and Prerequisites:
1. You will need to install MS VC++ 2013 runtimes. For Simplicity, It is recommended to install both x86 and x64 for 64based systems but if you only use x64, then just install the one.

2. (7-zip or WinRAR) or equivalent extractor will be used unpack and run it.

3. Latest Binaries: This is the latest build of OBS VCE, please extract it in a folder where you can track versioning, i.e. in a desktop folder with the date of the build:

2015-12-12: [32bit] [64bit] : Update to v0.657b+ JC3 fix mostly.
Or generated HTML with most packages.

Running and configuring:

1. After extracting, run the OBS.exe from that location and open up the Encoding Tab in settings. check VCE instead of x264, then below, have OpenCL to NV12 unchecked
2. In the video tab, Once a downscale and fps is decided (see at the top for maximum resolutions), ensure that the proper GPU is selected from the dropdown.
3. Next, go to the AMD VCE settings tab and check "use Custom settings", Check the preset selector (speed,Balanced,quality) at the upper-right.
4. there are two more options to be changed:
IDR and GOP. IDR will usually be set to 2 times fps (30fps=60IDR) for streaming. you can also set it to 0 which will calculate this for you. -1 disables IDR completely (not common)
GOP will be something to play with but needs to be a multiple of the FPS, this will aid with lagging recording at lower settings. Below is an example based on 30fps recording:
GOP 15, 30, or 60 (the higher, the better compression/quality but more use on the GPU)

Streaming:
With hardware decoders such as VCE, NVENC and QuickSync, an additional 200-500 kbitrate will need to be added to look closer to x264 at the same resolution. This means that 720@30 instead of 2500 bitrate max, VCE will need 3000 bitrate to look the same as x264.

Local Recording Maximum bitrate chart:
// - 10000 bitrate for 720p and frame rate less than or equal to 30 FPS
// - 20000 bitrate for 720p and frame rate less than or equal to 60 FPS
// - 20000 bitrate for 1080p and frame rate less than or equal to 30 FPS
// - 50000 bitrate for 1080p and frame rate less than or equal to 60 FPS


Troubleshooting:

Since OVE no longer works with 15.7 AMD drivers, make sure that "Use AMD AMF instead of OVE" is checked from the encoder tab of OBS. Unchecking can cause "Failed to Initialize" error.

If Multiple GPUs, select the proper AMD GPU in the video tab. Note that switchable graphics (Intel+AMD) does not work with OBS, this is something with the design of switchable graphics that is flawed.

Archived binaries:
2015-10-03: [32bit] [64bit] : Update to v0.656b
2015-07-25: [32bit] [64bit] : Update to v0.653b
2015-06-18: [32bit] [64bit] Update to git head and merge Kobata's h264 profile level and no resolution checking patch (Support for GCN1.2 hardware to choose greater than 1080p).
2015-03-17 [32bit] [64bit]: Update to v0.65+.
2015-02-08 [32bit] [64bit]: Update to release Media SDK 1.1. AMF: rework getting initial SPS/PPS nals.
2015-02-17: device selection see here.

Some posts with random info
[1] [2] [3 older tests by Fawkes]

hey thanks for making this stuff. got a fx8320 and hd7950 and it appears streaming is even worse with this amd branch now than the default obs. i followed your instructions. whats wrong there? seems like there is too much cpu usage, but im using the same quality settings for default obs - so i cant imagine they would work not as good. its really sad that amd is not officialy supporting and developing this. it would help a lot of people and make them happy.
 
Last edited:

true gameplay

New Member
@chummy -> first ever use @ before username so i get a mail

and you didnt followed my link - it says that OBS Studio is under development
AND you didnt understand to use SPEED or BALANCED as custom settings in AMD VCE Encoder tab of OBS VCE jackun ->
chummydummy.jpg


AND then change IDR Period to 120

so you JUST CLICK on Speed (works best in 1080p60 for up to GCN 1.1) OR Balanced (also works in 1080p60) AND change IDR Period to 120 - if you rec with 60fps

maybe use I Pic Period of 6 or 10 or 15 (or 0) and DONT CHANGE SETTINGS below (under) DEVICE TOPOLOGY ID after you pressed Speed or Balanced

USE a GOP of 30 -> if you take 60 your GPU has to much load // and if you play your game on Ultra please reduce some detail = high looks usually also pretty nice and will allow your gpu more resources for doing its magic :)


//

they use different ways to do their magic // on the very last page before its also written WHY

ps jackuns way is MUCH better (yet) - but you have to know what you are doing -> what you clearly dont :p

pps WHY CANT YOU READ THE VERY FIRST POST AND FOCUS THE FIRST BOLD WRITTEN TEXT?

ppps -> its ok - thats why i made a picture for you :p

i saw you posted a lot of settings and explanations. could you or someone else summarize the essentials or the whole of it and sticky it? i think its desperately neeeded.
 

Benman2785

Member
@true gameplay

https://github.com/jackun/OBS/blob/obsvce/ObsVCE/inc/OVEncodeTypes.h -> says all you need to know about settings BUT you need some knowledge about how h264 or videoencoding works in general -> there r some sites you can google where to find about it

ps - maybe, if i have some time, i will make a tut on how to find your best settings ;)

pps - what is you upload-speed? or do you just record local?

OBS_VCE_codec_settings_2500kbps.jpg

just CHANGE AudioBitrate to 96-128 for streaming
OBS_VCE_encoder_settings_IPP6.jpg

these settings should work well for 720p30 on all cards and for most games and most "modern" internetspeeds

ppps - when you said you have high CPU-load then you definitely do something wrong -> i just have ~3-5% CPU when i capture the game and use a 720p Webcam and some pictures // if you use a CLR-Browser Overlay it cost more CPU-load (but that would also be with 'normal' OBS)
 
Last edited:

Benman2785

Member
hello guys, looking for support

https://obsproject.com/forum/thread...mid-stream-while-playing-counterstrike.47839/

I posted in this forum section, not knowing that support for the obs branch with AMD VCE is only in this thread.

@novak @jackun

i think it has something to do with how VCE and Gamecapture work together - but that is a problem only jackun can solve ;)

i can tell you that, if i stream csgo or diablo 3, i sometimes also get crashes -> but it usually takes hours that one accure
 

true gameplay

New Member
@true gameplay

https://github.com/jackun/OBS/blob/obsvce/ObsVCE/inc/OVEncodeTypes.h -> says all you need to know about settings BUT you need some knowledge about how h264 or videoencoding works in general -> there r some sites you can google where to find about it

ps - maybe, if i have some time, i will make a tut on how to find your best settings ;)

pps - what is you upload-speed? or do you just record local?

OBS_VCE_codec_settings_2500kbps.jpg

just CHANGE AudioBitrate to 96-128 for streaming
OBS_VCE_encoder_settings_IPP6.jpg

these settings should work well for 720p30 on all cards and for most games and most "modern" internetspeeds

ppps - when you said you have high CPU-load then you definitely do something wrong -> i just have ~3-5% CPU when i capture the game and use a 720p Webcam and some pictures // if you use a CLR-Browser Overlay it cost more CPU-load (but that would also be with 'normal' OBS)

thanks. you know i stream with 2.000-2.300kbit upload in 1080p downscaled to 720p but at 60 fps. ive tried your settings before and will try these again, but i feel the default obs codec is way more performant now.
 

true gameplay

New Member
@true gameplay

https://github.com/jackun/OBS/blob/obsvce/ObsVCE/inc/OVEncodeTypes.h -> says all you need to know about settings BUT you need some knowledge about how h264 or videoencoding works in general -> there r some sites you can google where to find about it

ps - maybe, if i have some time, i will make a tut on how to find your best settings ;)

pps - what is you upload-speed? or do you just record local?

OBS_VCE_codec_settings_2500kbps.jpg

just CHANGE AudioBitrate to 96-128 for streaming
OBS_VCE_encoder_settings_IPP6.jpg

these settings should work well for 720p30 on all cards and for most games and most "modern" internetspeeds

ppps - when you said you have high CPU-load then you definitely do something wrong -> i just have ~3-5% CPU when i capture the game and use a 720p Webcam and some pictures // if you use a CLR-Browser Overlay it cost more CPU-load (but that would also be with 'normal' OBS)

alright, i have tried it, it works, but gives me high cpu usage and works not as good and performant as the default obs release.

i should add that with one special game there are issues with streaming and that is rainbow six siege. ive tried playing around with the obs and r6 process priority and core affinity which helped to some extend. but where the default obs branch works now perfectly by "default" the amd branch seems to put more load on the cpu.

im using these parameters for x264 encondig in obs default:
8x8dct=1 aq-mode=2 bframes=1 chroma-qp-offset=1 colormatrix=smpte170m deblock=0:0 direct=auto ipratio=1.41 keyint=240 level=3.1 me=hex merange=16 min-keyint=auto mixed-refs=1 no-mbtree=0 partitions=i4x4,p8x8,b8x8 profile=main psy-rd=0.5:0.0 qcomp=0.6 qpmax=51 qpmin=10 qpstep=4 ratetol=10 rc-lookahead=30 ref=1 scenecut=40 subme=5 threads=0 trellis=2 weightb=1 weightp=2

obtained from here:
https://obsproject.com/forum/threads/5-good-custom-x264-encoder-settings.4448/

i think these may not work with the amd branch but are the best solution to make the default obs work properly with r6 siege and all cores on the fx8320 without getting high cpu load.

so probably there are custom encoder variables for amd vce too?
 
Last edited:
Top