- Mac Apps Hardware Acceleration Not Working Remotely
- Mac Apps Hardware Acceleration Not Working Problems
- Should I Disable Hardware Acceleration
- Hardware Acceleration On Or Off
Jellyfin supports hardware acceleration (HWA) of video encoding/decoding using FFMpeg. FFMpeg and Jellyfin can support multiple hardware acceleration implementations such as Intel Quicksync (QSV), AMD AMF, nVidia NVENC/NVDEC, OpenMax OMX and MediaCodec through Video Acceleration API's.
VAAPI is a Video Acceleration API that uses libva to interface with local drivers to provide HWA. QSV uses a modified (forked) version of VAAPI and interfaces it with libmfx and their proprietary drivers (list of supported processors for QSV).
OS | Recommended HW Acceleration |
---|---|
Linux | QSV, NVENC, AMF, VAAPI |
Windows | QSV, NVENC, AMF |
MacOS | VideoToolbox |
Android | MediaCodec, OMX |
RPi | OMX, VAAPI |
I created a new Fusion VM to run Mac OSX Sierra 10.12. However when looking at the Display Settings, I've enabled 3D acceleration but there's a warning '3D Acceleration is not supported for the current guest operating system' As I'm running the VM as a development environment with 3D software I'm at a loss as to how to proceed. The hardware acceleration function of the operating system relies on up-to-date and compatible display drivers. Note Hardware acceleration that uses the video card is always disabled when Office is running in a Remote Desktop session, and also when the application is started in safe mode.
NVIDIA NVENC
NVIDIA using ffmpeg official list. Not every card has been tested. These drivers are recommended for Linux and Windows. Here is the official list of NVIDIA Graphics Cards for supported codecs. Example of Ubuntu working with NVENC. H264 10-bit is not supported by NVIDIA acceleration. The minimum required driver version is: Linux: 418.30, Windows: 450.51.
VAAPI
List of supported codecs for VAAPI. Both Intel iGPU and AMD GPU can use VAAPI. Audio control app mac.
Note
AMD GPU requires open source driver Mesa 20.1 or higher to support hardware decoding HEVC.
AMD AMF
AMF is now available on Windows and Linux, but since AMD has not implemented the HW decoder and scaler in ffmpeg, the decoding speed may not be as expected. The closed source driver
amdgpu-pro
is required when using AMF on Linux.Note
Zen is CPU only. No hardware acceleration for any form of video decoding/encoding. You will need an APU or dGPU for hardware acceleration.
![Mac Apps Hardware Acceleration Not Working Mac Apps Hardware Acceleration Not Working](/uploads/1/3/4/2/134250446/459777250.png)
Intel QuickSync
Intel QSV Benchmarks on Linux.
On Windows, you can use the DXVA2/D3D11VA libraries for decoding and the libmfx library for encoding.
Note
To use QSV on Windows, please do not install Jellyfin as a system service.
Issues: FFmpeg Windows version with QSV hwaccel fails over TERMINAL and Intel QSV: 'Failed to create Direct3D device' on Core i7-7700K (Skylake) on Windows 10
CentOS may require additional drivers for QSV.
Here's additional information to learn more.
If your Jellyfin server does not support hardware acceleration, but you have another machine that does, you can leverage rffmpeg to delegate the transcoding to another machine. Currently Linux-only and requires SSH between the machines, as well as shared storage both for media and for the Jellyfin data directory.
Enabling Hardware Acceleration
Hardware acceleration options can be found in the Admin Dashboard under the Transcoding section of the Playback tab. Select a valid hardware acceleration option from the drop-down menu, indicate a device if applicable, and check
enable hardware encoding
to enable encoding as well as decoding, if your hardware supports this.The hardware acceleration is available immediately for media playback. No server restart is required.
Setup
Each hardware acceleration type, as well as each Jellyfin installation type, requires different setup options before it can be used. It is always best to consult the FFMpeg documentation on the acceleration type you choose for the latest information.
Acceleration on Docker
In order to use hardware acceleration in Docker, the devices must be passed to the container. To see what video devices are available, you can run
sudo lshw -c video
or vainfo
on your machine.Note
NVIDIA GPUs aren't currently supported in docker-compose.
You can use
docker run
to start the server with a command like the one below.Alternatively, you can use docker-compose with a configuration file so you don't need to run a long command every time you restart your server.
Debian Docker Nvidia
In order to achieve hardware acceleration using docker, several steps are required.
Prerequisites:
- GNU/Linux x86_64 with kernel version > 3.10
- Docker >= 1.12
- NVIDIA GPU with Architecture > Fermi (2.1)
- NVIDIA drivers >= 418.30
Confirm that your GPU shows up with this command.
Update your host so there is no chance of outdated software causing issues.
Install curl which will be used to download the required files.
Edit
sources.list
in /etc/apt/sources.list
and add non-free contrib
to each source as required.The line above should be modified to match the following line as an example.
Download and add the sources for the Nvidia docker container.
Update your package list again to download the latest software available from the new repository.
Install linux-headers with the following command.
Alternatively, Install linux-headers using backports.
Install Nvidia docker2 from the repository.
When prompted to choose to keep or install the maintainer package file type
y
to install the maintainer version.Mac Apps Hardware Acceleration Not Working Remotely
After the install you may want to add nvidia as default runtime: editing
/etc/docker/daemon.json
like this:Restart any docker services currently running.
Install nvidia drivers and dependencies.
Reboot your host to apply all changes.
Validate that your driver and docker are correctly set up with this driver test.
Validate access to needed ressources from host and docker.
Start your container adding those environement parameters.
A complete run command would look like this.
Smime mail app mac. There are some special steps when running with the following option.
You may need to add this user to the video group.
Once the container is started you can again validate access to the host resources.
If you get driver information, everything is fine but if you get an error like
couldn't find libnvidia-ml.so library in your system
you need to run the following command. Mac show recent apps.After that, you should ensure the Nvidia driver loads correctly.
Now go to the Jellyfin playback settings, enable Nvidia NVENC and select your target codecs depending on what your GPU supports. Try to play any file needing a transcode by changing the bitrate.
Check the transcode logs to make sure everything is working properly.
Configuring VAAPI acceleration on Debian/Ubuntu from .deb
packages
Configuring VAAPI on Debian/Ubuntu requires some additional configuration to ensure permissions are correct.
To check information about VAAPI on your system install and run
vainfo
from the command line.- Configure VAAPI for your system by following the relevant documentation. Verify that a
render
device is now present in/dev/dri
, and note the permissions and group available to write to it, in this caserender
:Note
On some releases, the group may bevideo
instead ofrender
. - Add the Jellyfin service user to the above group to allow Jellyfin's FFMpeg process access to the device, and restart Jellyfin.
- Configure VAAPI acceleration in the 'Transcoding' page of the Admin Dashboard. Enter the
/dev/dri/renderD128
device above as theVA API Device
value. - Watch a movie, and verify that transcoding is occurring by watching the
ffmpeg-transcode-*.txt
logs under/var/log/jellyfin
and usingradeontop
or similar tools.
Configuring Intel QuickSync(QSV) on Debian/Ubuntu
- QSV is based on VAAPI device on Linux, so please confirm whether you have completed the VAAPI configuration first.
- Make sure that
jellyfin-ffmpeg 4.3.1-1
or higher is installed. - Install the non-free iHD driver.
Note
intel-media-va-driver-non-free is avaliable from apt since Debian buster and Ubuntu 19.04. Otherwise you have to build from source. - Verify iHD driver using
vainfo
. You will findiHD
from the result if it goes well. - If you want to uninstall iHD driver and fallback to i965 driver.
- QSV in docker. Due to incompatible licenses, we will not integrate non-free drivers in the docker image. You need to perform the above operations manually in docker and add
--privileged
to the docker configuration.
Mac Apps Hardware Acceleration Not Working Problems
LXC or LXD Container
This has been tested with LXC 3.0 and may or may not work with older versions.
Follow the steps above to add the jellyfin user to the
video
or render
group, depending on your circumstances.- Add your GPU to the container.
- Make sure you have the card within the container:
- Configure Jellyfin to use video acceleration and point it at the right device if the default option is wrong.
- Try and play a video that requires transcoding and run the following, you should get a hit.
- You can also try playing a video that requires transcoding, and if it plays you're good.
Useful Resources:
Configuring AMD AMF encoding on Ubuntu 18.04 or 20.04 LTS
- Install
amdgpu-pro
closed source graphics driver by following the installation instructions. - Then install
amf-amdgpu-pro
: - Make sure your
jellyfin-ffmpeg
orffmpeg
containsh264_amf
encoder:Note
If not contain, update yourjellyfin-ffmpeg
to the latest version and try again.For compiling ffmpeg with AMF library, refer to this page. - Choose AMD AMF video acceleration in Jellyfin and check the
Enable hardware encoding
option. - Watch a movie, then verify that
h264_amf
encoder is working by watching theffmpeg-transcode-*.txt
transcoding logs under/var/log/jellyfin
and usingradeontop
or similar tools.
Configuring AMD AMF encoding on Arch Linux
AMD does not provide official
amdgpu-pro
driver support for Arch Linux, but fortunately, a third-party packaged amdgpu-pro-installer
is provided in the archlinux user repository.- Clone this repository using
git
: - Enter that folder and make the installation package and install it:
- Go to step 3 of on Ubuntu 18.04 or 20.04 LTS above.
Configuring OMX on Raspberry Pi 3 and 4 running Raspberry Pi OS
- Add the Jellyfin service user to the video group to allow Jellyfin's FFMpeg process access to the encoder, and restart Jellyfin.
Note
If you are using a Raspberry Pi 4, you might need to runsudo rpi-update
for kernel and firmware updates. - Choose
OpenMAX OMX
as the Hardware acceleration on the Transcoding tab of the Server Dashboard. - Change the amount of memory allocated to the GPU. The GPU can't handle accelerated decoding and encoding simultaneously.For RPi4, add the line
gpu_mem=320
See more HereFor RPi3, add the linegpu_mem=256
You can set any value, but 320 is recommended amount for 4K HEVC.Verify the split between CPU and GPU memory:Monitor the temperature and clock speed of the CPU:
Note
RPi4 currently doesn't support HWA HEVC decoding, only encode and decode H.264. Active cooling is required, passive cooling is insufficient for transcoding. https://exlzkwp.weebly.com/blog/best-free-mac-productivity-apps. Only Raspbian OS works so far. For docker, only the linuxserver image works. For more tips see here.
Note
For RPi3 in testing, transcoding was not working fast enough to run in real time because the video was being resized.
Configuring VAAPI on Raspberry Pi 3 and 4 running Ubuntu server
- Enable the
render
device on your Pi.- If you are using Raspberry Pi 3 add this to the
/boot/firmware/usercfg.txt
file. - Or if you are a Raspberry Pi 4 user add this to the
/boot/firmware/usercfg.txt
file.Then save the file and do a reboot. Verify that arender
device is now present in/dev/dri
.
- Add Jellyfin service user to the
render
group to allow Jellyfin's FFMpeg process access to the device, and restart Jellyfin. - Configure VAAPI acceleration in the Transcoding page of the Admin Dashboard. Enter the
/dev/dri/renderD128
device above as theVA API
Device value. - Watch a movie, and verify that transcoding is working by watching
ffmpeg-transcode-*.txt
logs under/var/log/jellyfin
.
Verifying Transcodes
To verify that you are using the proper libraries, run this command against your transcoding log. This can be found at Admin Dashboard > Logs, and /var/log/jellyfin if instead via the repository.
This returned the following results.
Stream #0:0
used software (VAAPI Decode can also say native) to decode HEVC and used HWA to encode.Should I Disable Hardware Acceleration
Stream #0:0
used HWA for both. h264_mmal to decode and h264_omx to encode.Hardware Acceleration On Or Off
Any advice would be appreciated!
Cheers,
John
(and if this should be in hardware just tell me and I will take it down)