Skip to main content

Docker Hardware Acceleration - VAAPI

Overview

Unmanic supports hardware acceleration (HWA) of video decoding using FFmpeg. FFmpeg and Unmanic can support multiple hardware acceleration implementations such as nVidia NVENC and MediaCodec through Video Acceleration API's.

VAAPI is a Video Acceleration API that uses libva to interface with local drivers to provide HWA.

You can find a list of supported codecs for VAAPI here. Both Intel iGPU and AMD GPU can use VAAPI.

NOTE: AMD GPU requires open source driver Mesa 20.1 or higher to support hardware decoding HEVC.

Running Unmanic with support for VAAPI

To enable VAAPI, you will need to run Unmanic on a device that supports it.

If you intend to use Unmanic inside a Docker container, you will also need to pass through the required devices to the container.

An example of this is shown below:

  PUID=$(id -u)
PGID=$(id -g)

# CONFIG_DIR - Where you settings are saved
CONFIG_DIR=/config

# LIBRARY_DIR - The location/locations of your library
LIBRARY_DIR=/library

# CACHE_DIR - A tmpfs or and folder for temporary conversion files
CACHE_DIR=/tmp/unmanic

docker run -ti --rm \
-e PUID=${PUID} \
-e PGID=${PGID} \
--device=/dev/dri \
-p 8888:8888 \
-v ${CONFIG_DIR}:/config \
-v ${LIBRARY_DIR}:/library \
-v ${CACHE_DIR}:/tmp/unmanic \
josh5/unmanic:latest