GPU Selection Guide
2) Next you will need ffmpeg to support the amf encoder. There might a chance the current ffmpeg installed from your distro’s repository might already support it. This was the case for Manjaro. You can check by typing in the terminal: “ffmpeg -encoders | grep amf”. If the output shows you”V. D h264_amf AMD AMF H.264 Encoder (codec h264)” and”V. D hevc_amf AMD AMF HEVC encoder (codec hevc)”you’re good to go.
Obs-də amd vga val-ı necə kodlaya bilərəm
It goes without saying AMD’s hardware encoders / decoders aren’t the best around with Nvidia basically dominating. Even in native Linux OBS, NVENC is already supported OTB!
For AMD (and Intel) cards however there is the free and open VA-API interface to encode and decode videos. In OBS this is used to enable hardware accelerated video encoding, to reduce stress on your CPU and preserve those mighty FPS during recording.
Out of curiosity (and having had a little headache with VAAPI before) I wanted to see if I can get the proprietary AMF encoders showing up on OBS. Keep in mind that with AMF you might not necessarily get a better experience, this should not be seen as a go to guide!
With VAAPI you already get a very solid experience. If things already work for you, you might want to just stick with things as they are, as getting AMF running might just not be worth the effort. This guide is for those who want to just try things out of curiosity. I cannot tell you what encoder works better, as I don’t have the tools and knowledge to conduct and meaningful scientific comparisons.
Let’s start with the prerequisites. For this to work out you will need to make AMF show up in OBS’ Encoder list:1- amdgpu-pro with the amf-amdgpu-pro driver2- ffmpeg compiled amf support3- StreamFX
- If you’re on Arch based distro, you’ll only need to install the package amf-amdgpu-pro from the AUR: https://aur.archlinux.org/packages/amf-amdgpu-pro
On Debian/Ubuntu based distros it seems to require some extra hoops. Please check the official wiki on how to get that installed: https://amdgpu-install.readthedocs.io/en/latest/install-script.html
From what I understand, you can run the free RADV and the closed AMDGPU-PRO side by side. Per application you can specify which driver you want to use. Since you probably want to default to the free RADV driver, you will need to add a new environment variable to your /etc/environment file. Check here: https://www.reddit.com/r/linux_gaming/comments/h8b7zv/amd_gpu_vulkan_driver_how_to_easily_switch/
For OBS to work with the AMF encoder from the AMDGPU-PRO stack it needs the nonfree PRO driver. On KDE I can search OBS from the application launcher, right click it and edit this application. Under the Tab “Program” under command you can add the following line right before obs: “env VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/amd_pro_icd64.json”.
EDIT: Similarly to how it’s done in this PKGBUILD: https://github.com/durcor/amdgpu-pro-amf-only
You can move the that amd_pro_icd64.json away from the icd.d’s folder, so your system won’t be able to load that driver automatically and RADV will stay the default driver to load. This way you won’t have to mess around with your global environments, but only for OBS to explicitly load amdgpu-pro. After you’ve installed amdgpu-pro vulkan driver and amf you can do the following:
> sudo mkdir /opt/amdgpu-pro
> sudo mv /usr/share/vulkan/icd.d/amd_pro_icd64.json /opt/amdgpu-pro/amd_pro_icd64.json
And at this point you only need to edit the OBS Desktop Icon to launch:
> env VK_ICD_FILENAMES=/opt/amdgpu-pro/amd_pro_icd64.json obs
The advantage of this approach is that you clear out this global environment, which might bring some breakages and regressions along the way as seen here: https://github.com/flathub/org.yuzu_emu.yuzu/issues/6#issuecomment-860220851
2) Next you will need ffmpeg to support the amf encoder. There might a chance the current ffmpeg installed from your distro’s repository might already support it. This was the case for Manjaro. You can check by typing in the terminal: “ffmpeg -encoders | grep amf”. If the output shows you”V. D h264_amf AMD AMF H.264 Encoder (codec h264)” and”V. D hevc_amf AMD AMF HEVC encoder (codec hevc)”you’re good to go.
If you don’t see them, you will need to recompile ffmpeg with AMF support. On Arch you can find this package: https://aur.archlinux.org/packages/ffmpeg-amd-full/(Though mind you, at the time of writing there was dependency issues with that package. I was able to work that around with first installing https://aur.archlinux.org/packages/ffmpeg-amd-full-git/ then back the normal ffmpeg-amd-full)
For Ubuntu and derivatives you’ll sadly need to fully recompile ffmpeg. Check this guide: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu. Make absolutely sure you enable amf support when configuring!
Once set up and installed you can try if AMF works by testing one encode, similarly to how it’s described in these examples: https://trac.ffmpeg.org/wiki/HWAccelIntro
ffmpeg -i input.mp4 -c:v h264_amf -profile high444p -pixel_format yuv444p -preset default output.mp4
GPU Selection Guide
When using OBS Studio on a laptop or multi-GPU system, you may run into performance issues or issues using a specific capture type (i.e. Game or Window capture). The reason this happens is because most modern laptops will come with two GPUs:
- An integrated GPU (iGPU) for 2D applications/your desktop, and
- A discrete/external GPU (either NVIDIA or AMD) for 3D apps and games.
OBS Studio can only run on one of these GPUs but your open applications and games could be running on either. For example, if OBS Studio is running on the integrated GPU, you will not be able to use Game Capture for your games running on the discrete (NVIDIA or AMD) GPU.
Additionally, if OBS is not running on the discrete GPU, you might run into performance issues. In rare cases, trying to capture a game running on a different GPU than OBS can cause the game to crash. This is not really an issue with OBS Studio but rather a design choice by laptop manufacturers in order to save power.
Use the following guide to specify the GPU on which OBS Studio runs. You can also use this guide to specify the GPU on which your games will run — for example, for Minecraft: Java Edition.
To check your version of Windows 10:
- Either click here
- or
- Open the Windows Settings App (Start button → Cogwheel icon)
- Go to System → About and scroll down to “Windows specification”.
Windows 10 (1809 and up) & Windows 11
1. Open Windows Settings
- Close OBS Studio before you start
- Either click here
- or
- Open the Windows Settings App (Start button → Cogwheel icon)
- Navigate to System → Display → Graphics Settings (near the bottom)
2. Add OBS Studio to the List
- Choose “Classic App”/”Desktop App”, then click Browse. Navigate to the following executable:
- C:\Program Files\obs-studio\bin\64bit\obs64.exe
3. Choose a Mode
For Game Capture & Window Capture For Display Capture Setting: High Performance Setting: Power Saving Windows 7, 8, & 10 (prior to 1809)
If you run Windows 7 or 8, or Windows 10 up to (and including) version 1809, use our separate guides:
obsproject/obs-amd-encoder
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch branches/tags
Branches Tags
Could not load branches
Nothing to show
Could not load tags
Nothing to showName already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Cancel Create
- Local
- Codespaces
HTTPS GitHub CLI
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
bffe014 Mar 29, 2023
The generated version header file relies on project version variables which CMake only generates when an actual `project` exists (which was removed in the update as only the main project `obs-studio` exists).
Git stats
Files
Failed to load latest commit information.
Latest commit message
Commit timeREADME.md
AMD Encoder for OBS Studio
‘obs-amd-encoder’ is a plugin for Open Broadcaster Software Studio which adds support for native AMD Hardware encoding through the use of AMDs Advanced Media Framework. It offers a user-friendly UI integration for the complex settings that AMD AMF offers.
This plugin is integrated in OBS Studio since Version 0.16.2. It replaced the older MFT (Media Foundation Transforms) based approach and performs much better compared to it. Many users have since then switched from software to hardware encoding on AMD machines as it is actually working at a decent performance now.
Jenkins AppVeyor The plugin ships with an Installer which will try to find the installation directory of OBS Studio and replaces the integrated version. You will also need the following:
- Windows 7, Windows 8, Windows 10 or newer
- A supported AMD GPU or APU
- Microsoft Visual C++ 2017 Redistributables (32-bit and 64-bit)
- Latest AMD Graphics Driver
- Latest Open Broadcaster Software Studio
More Information and Troubleshooting
Up to date information can always be found on the Wiki, including a Troubleshooting Guide that you should always follow if you have any issues!
Special Thanks go to all the people that have enabled me to actually write this plugin:
- /u/PeteRaw for the suggestion to create this.
- /r/AMD and the OBS Project Community for the continued help and support.
- All the Patreon Subscribers: Anaz Haidhar, AJ, Benhamin Hoffmeister, Bo, Bryan Furia, DaOrgest, Dominik roth, Jeremy “razorlikes” Nieth, Kristian Kirkesæther, Kuo Sith, Kytos, Nicholas Kreimeyer, Nico Thate, NoxiousPluK, nwgat.ninj, Oldgam3r, Omega Drik Mage, prefixs, Rene “vDex” Dirks, shiny, Simon Vacker, SneakyJoe, Spikeypop, Vinicius Guilherme.
- All the Translators (before CrowdIn): max20091, Marcos Vidal Martinez, Viacheslav, nwgat, wazer, Horváth Dániel, M4RK22.
- All the Translators on CrowdIn.
- All contributors to the project.
- Richard Stanway for various fixes and improvements.
- Advanced Micro Devices (TM) for releasing Advanced Media Framework SDK and keeping hardware encoding supported on their platform.
- Mikhail Mironov (AMD Employee) for continued development support and test hardware.
- jackun for the VCE Fork of Open Broadcaster Software Classic.
- jp9000/Jim for Open Broadcaster Software Studio and continued development help.
About
AMD Advanced Media Framework Encoder Plugin for Open Broadcaster Studio
Comments are closed, but trackbacks and pingbacks are open.