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]