Hardware support

Hello EveryOne,

I’m trying to make my docker cointainer working with hardware decoding/transcoding.

I have two card : 1 Intel and 1 nvidia.
EDIT 1 : intel i7
EDIT 2 : nvidia GT540m

Intel configuration :

Docker run :

docker run --name=plex --env="TZ=Europe/Paris" --env="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --env="TERM=xterm" --env="LANG=C.UTF-8" --env="LC_ALL=C.UTF-8" --env="CHANGE_CONFIG_DIR_OWNERSHIP=true" --env="HOME=/config" --volume="/home/docker/plex/config/:/config" --volume="/home/docker/plex/transcode/:/transcode" --volume="/media/data/:/media/data" --volume="/config" --volume="/transcode" --device=/dev/dri/card1:/dev/dri/card0 --device=/dev/dri/renderD129:/dev/dri/renderD128 -p 1900:1900/udp -p 32410:32410/udp -p 32469:32469 -p 32413:32413/udp -p 32412:32412/udp -p 32414:32414/udp -p 3005:3005 -p 32400:32400 -p 8324:8324 --restart=always --detach=true plexinc/pms-docker:plexpass

Logs :

Jul 29, 2018 16:30:47.027 [0x7f5b0dfff700] DEBUG - TPU: hardware transcoding: using hardware decode acce
lerator vaapi
Jul 29, 2018 16:30:47.027 [0x7f5b0dfff700] DEBUG - [Universal] Using local file path instead of URL: FILE.mkv
Jul 29, 2018 16:30:47.027 [0x7f5b0dfff700] DEBUG - TPU: hardware transcoding: zero-copy support present
Jul 29, 2018 16:30:47.027 [0x7f5b0dfff700] DEBUG - TPU: hardware transcoding: using zero-copy transcodin
g
Jul 29, 2018 16:30:47.028 [0x7f5b0dfff700] DEBUG - TPU: hardware transcoding: final decoder: vaapi, fina
l encoder: vaapi

Results :

The hardware transcoding is used but the quality is extremely bad …

picture will be added.

Nvidia configuration :

Docker run :

docker run --name=plex --env="TZ=Europe/Paris" --env="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" --env="TERM=xterm" --env="LANG=C.UTF-8" --env="LC_ALL=C.UTF-8" --env="CHANGE_CONFIG_DIR_OWNERSHIP=true" --env="HOME=/config" --volume="/home/docker/plex/config/:/config" --volume="/home/docker/plex/transcode/:/transcode" --volume="/media/data/:/media/data" --volume="/config" --volume="/transcode" --device=/dev/dri/card0:/dev/dri/card0 --device=/dev/dri/renderD128:/dev/dri/renderD128 -p 1900:1900/udp -p 32410:32410/udp -p 32469:32469 -p 32413:32413/udp -p 32412:32412/udp -p 32414:32414/udp -p 3005:3005 -p 32400:32400 -p 8324:8324 --restart=always --detach=true plexinc/pms-docker:plexpass

Logs :


 Jul 29, 2018 16:57:22.535 [0x7f0ff63fc700] DEBUG - Starting a transcode session 07xi0ux0k2dr07xcwhlmg1x4
 at offset -1.0 (state=3)
Jul 29, 2018 16:57:22.536 [0x7f0ff63fc700] DEBUG - TPU: hardware transcoding: enabled, but no hardware d
ecode accelerator found
Jul 29, 2018 16:57:22.536 [0x7f0ff63fc700] DEBUG - [Universal] Using local file path instead of URL: FILE.mkv
Jul 29, 2018 16:57:22.536 [0x7f0ff63fc700] DEBUG - TPU: hardware transcoding: zero-copy support not pres
ent
Jul 29, 2018 16:57:22.536 [0x7f0ff63fc700] DEBUG - TPU: hardware transcoding: final decoder: , final enc
oder:

Jul 29, 2018 17:25:48.073 [0x7faf173fe700] DEBUG - Codecs: testing h264_nvenc (encoder)
Jul 29, 2018 17:25:48.073 [0x7faf173fe700] ERROR - [FFMPEG] - Cannot load libcuda.so.1
Jul 29, 2018 17:25:48.073 [0x7faf173fe700] VERBOSE - [FFMPEG] - Nvenc unloaded
Jul 29, 2018 17:25:48.073 [0x7faf173fe700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_n
venc'
Jul 29, 2018 17:25:48.073 [0x7faf173fe700] DEBUG - MDE: Cannot direct stream video stream due to profile
 or setting limitations
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] DEBUG - Codecs: hardware transcoding: testing API vaapi
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] VERBOSE - [FFMPEG] - Opened VA display via DRM device /dev/dr
i/renderD128.
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] VERBOSE - [FFMPEG] - libva: VA-API version 1.1.0
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] VERBOSE - [FFMPEG] - libva: va_getDriverName() returns -1
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] ERROR - [FFMPEG] - libva: va_getDriverName() failed with unkn
own libva error,driver_name=(null)
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] ERROR - [FFMPEG] - Failed to initialise VAAPI connection: -1 
(unknown libva error).
Jul 29, 2018 17:25:48.074 [0x7faf173fe700] DEBUG - Codecs: hardware transcoding: opening hw device faile
d - probably not supported by this system, error: Input/output error


EDIT 3 :

After installing cuda libs :


ul 29, 2018 18:04:05.288 [0x7f1f00ffe700] DEBUG - Codecs: hardware transcoding: opening hw device failed - probably not supported by this system, error: Input/output error
Jul 29, 2018 18:04:05.288 [0x7f1f00ffe700] DEBUG - Codecs: testing h264_nvenc (encoder)
Jul 29, 2018 18:04:05.290 [0x7f1f00ffe700] VERBOSE - [FFMPEG] - Loaded Nvenc version 8.1
Jul 29, 2018 18:04:05.290 [0x7f1f00ffe700] VERBOSE - [FFMPEG] - Nvenc initialized successfully
Jul 29, 2018 18:04:05.297 [0x7f1f00ffe700] ERROR - [FFMPEG] - Cannot init CUDA
Jul 29, 2018 18:04:05.297 [0x7f1f00ffe700] VERBOSE - [FFMPEG] - Nvenc unloaded
Jul 29, 2018 18:04:05.297 [0x7f1f00ffe700] WARN - avcodec_open2 returned -1313558101 for encoder 'h264_nvenc'

Results :
The hardware decoding is not working…

There is a way to get nvidia decoding working or better quality with intel QSV ?

Thnaks.
Maxime

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.