LXC Intel Nuc 10 GPU Transcoding not working

@ChuckPa That’s my anticipation as well, but nevertheless what’s happening is absurd. Attached the log files. First played without PGS subs (not hw transcode, buffering…), then with PGS subs (hw transcode being indicated but even far worse with buffering)
Plex Media Server Logs_2022-02-22_19-44-50.zip (1.0 MB)

The host syslog throws in a couple of suspicious lines at the same time:

Feb 22 19:42:34 snuc2 kernel: Plex Transcoder[806209]: segfault at 0 ip 00007f001dddf99b sp 00007ffd54571b40 error 4 in libstdc++.so.6.0.29[7f001ddcb000+103000]
Feb 22 19:42:34 snuc2 kernel: Code: 10 00 00 00 5d e9 35 35 ff ff 0f 1f 44 00 00 f3 0f 1e fa 0f b6 07 84 c0 75 4d 55 53 48 89 fb 48 83 ec 08 48 8b 05 25 49 16 00 <80> 38 00 75 20 31 c0 ba 00 01 00 00 f0 0f b1 17 75 2e 48 83 c4 08

@ChuckPa Hardware transcoding seems to be working only when I disable HDR tone mapping. Were you able to check the logs?

Transcoder engaging in HW, with HW tone mapping. No references to subtitles here.

Feb 22, 2022 19:42:34.034 [0x7f43eda71b38] DEBUG - [Transcode] [FFMPEG] - Format 0x30313050 → p010le.
Feb 22, 2022 19:42:34.034 [0x7f43eda71b38] VERBOSE - [Transcode] [FFMPEG] - VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 21.3.5 (a51add3).
Feb 22, 2022 19:42:34.034 [0x7f43eda71b38] VERBOSE - [Transcode] [FFMPEG] - Driver not found in known nonstandard list, using standard behaviour.
Feb 22, 2022 19:42:34.034 [0x7f43eda71b38] DEBUG - [Transcode] [FFMPEG] - Created surface 0.
Feb 22, 2022 19:42:34.034 [0x7f43eda71b38] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Feb 22, 2022 19:42:34.035 [0x7f43eda71b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Feb 22, 2022 19:42:34.035 [0x7f43eda71b38] VERBOSE - [Transcode] Sufficient disk space: 357.55kB source file, 7.78GB capacity, 5.17GB available on “/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions”
Feb 22, 2022 19:42:34.035 [0x7f43eda71b38] DEBUG - [Transcode/JobRunner] Job running: EAE_ROOT=‘/tmp/pms-78d8a3a3-a5eb-473f-b0df-89125651c8a5/EasyAudioEncoder’ EnableExtendedVaFormats=‘1’ FFMPEG_EXTERNAL_LIBS=‘/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/62cc2bc-4226-linux-x86_64/’ LIBVA_DRIVERS_PATH=‘/usr/lib/plexmediaserver/lib/dri’ NEOReadDebugKeys=‘1’ X_PLEX_TOKEN=‘xxxxxxxxxxxxxxxxxxxx’ ‘/usr/lib/plexmediaserver/Plex Transcoder’ ‘-codec:0’ ‘hevc’ ‘-hwaccel:0’ ‘vaapi’ ‘-hwaccel_fallback_threshold:0’ ‘10’ ‘-hwaccel_output_format:0’ ‘vaapi’ ‘-hwaccel_device:0’ ‘vaapi’ ‘-codec:1’ ‘truehd_eae’ ‘-eae_prefix:1’ ‘nsxq0kubxni906w4ae6db32h_’ ‘-analyzeduration’ ‘20000000’ ‘-probesize’ ‘20000000’ ‘-i’ ‘/mnt/Data/Movies/English/2160p/Men in Black (1997)/Men in Black (1997).mkv’ ‘-filter_complex’ ‘[0:0]hwupload[0];[0]scale_vaapi=w=2276:h=1280:format=p010[1];[1]hwmap=derive_device=opencl[2];[2]tonemap_opencl=tonemap=mobius:format=nv12:m=bt709:p=bt709:r=tv[3];[3]hwmap=derive_device=vaapi:reverse=1[4];[4]hwupload[5]’ ‘-map’ ‘[5]’ ‘-codec:0’ ‘h264_vaapi’ ‘-b:0’ ‘20000k’ ‘-r:0’ ‘23.975999999999999’ ‘-force_key_frames:0’ ‘expr:gte(t,n_forced*1)’ ‘-filter_complex’ ‘[0:1] aresample=async=1:ocl=’'‘stereo’'‘:rematrix_maxval=0.000000dB:osr=48000[6]’ ‘-map’ ‘[6]’ ‘-metadata:s:1’ ‘language=eng’ ‘-codec:1’ ‘aac’ ‘-b:1’ ‘256k’ ‘-f’ ‘dash’ ‘-seg_duration’ ‘1’ ‘-dash_segment_type’ ‘mp4’ ‘-init_seg_name’ ‘init-stream$RepresentationID$.m4s’ ‘-media_seg_name’ ‘chunk-stream$RepresentationID$-$Number%05d$.m4s’ ‘-window_size’ ‘5’ ‘-delete_removed’ ‘false’ ‘-skip_to_segment’ ‘1’ ‘-time_delta’ ‘0.0625’ ‘-manifest_name’ ‘http://127.0.0.1:32400/video/:/transcode/session/nsxq0kubxni906w4ae6db32h/875ff14e-5869-4d6d-a457-1cd6ce44bd8c/manifest?X-Plex-Http-Pipeline=infinite’ ‘-avoid_negative_ts’ ‘disabled’ ‘-map_metadata’ ‘-1’ ‘-map_chapters’ ‘-1’ ‘dash’ ‘-start_at_zero’ ‘-copyts’ ‘-vsync’ ‘cfr’ ‘-init_hw_device’ ‘vaapi=vaapi:’ ‘-filter_hw_device’ ‘vaapi’ ‘-y’ ‘-nostats’ ‘-loglevel’ ‘quiet’ ‘-loglevel_plex’ ‘error’ ‘-progressurl’ ‘http://127.0.0.1:32400/video/:/transcode/session/nsxq0kubxni906w4ae6db32h/875ff14e-5869-4d6d-a457-1cd6ce44bd8c/progress
Feb 22, 2022 19:42:34.035 [0x7f43eda71b38] DEBUG - [Transcode/JobRunner] Jobs: Starting child process with pid 2051

Also see this:

Feb 22, 2022 11:49:01.431 [0x7f45aa689b38] DEBUG - [Transcode] [FFMPEG] - Direct mapping possible.
Feb 22, 2022 11:49:01.431 [0x7f45aa689b38] DEBUG - [Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Feb 22, 2022 11:49:01.431 [0x7f45aa689b38] DEBUG - [Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS=‘/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/62cc2bc-4226-linux-x86_64/’ LIBVA_DRIVERS_PATH=‘/usr/lib/plexmediaserver/lib/dri’ X_PLEX_TOKEN=‘xxxxxxxxxxxxxxxxxxxx’ ‘/usr/lib/plexmediaserver/Plex Transcoder’ ‘-codec:0’ ‘hevc’ ‘-hwaccel:0’ ‘vaapi’ ‘-hwaccel_fallback_threshold:0’ ‘10’ ‘-hwaccel_device:0’ ‘vaapi’ ‘-codec:2’ ‘dca’ ‘-analyzeduration’ ‘20000000’ ‘-probesize’ ‘20000000’ ‘-i’ ‘/mnt/Data/Movies/English/2160p/Gladiator (2000)/Gladiator (2000).mkv’ ‘-filter_complex’ ‘[0:10]scale=3840:2160[0];[0:0][0]overlay[1];[1]scale=w=2276:h=1280:force_divisible_by=4[2];[2]format=p010,tonemap=mobius[3];[3]format=pix_fmts=nv12[4];[4]hwupload[5]’ ‘-map’ ‘[5]’ ‘-codec:0’ ‘h264_vaapi’ ‘-b:0’ ‘20000k’ ‘-r:0’ ‘23.975999999999999’ ‘-force_key_frames:0’ ‘expr:gte(t,n_forced*1)’ ‘-filter_complex’ ‘[0:2] aresample=async=1:ocl=’'‘stereo’'‘:rematrix_maxval=0.000000dB:osr=48000[6]’ ‘-map’ ‘[6]’ ‘-metadata:s:1’ ‘language=eng’ ‘-codec:1’ ‘aac’ ‘-b:1’ ‘256k’ ‘-f’ ‘dash’ ‘-seg_duration’ ‘1’ ‘-dash_segment_type’ ‘mp4’ ‘-init_seg_name’ ‘init-stream$RepresentationID$.m4s’ ‘-media_seg_name’ ‘chunk-stream$RepresentationID$-$Number%05d$.m4s’ ‘-window_size’ ‘5’ ‘-delete_removed’ ‘false’ ‘-skip_to_segment’ ‘1’ ‘-time_delta’ ‘0.0625’ ‘-manifest_name’ ‘http://127.0.0.1:32400/video/:/transcode/session/45ljie0y0akr684vupuwldwa/cac58424-79e7-42f4-9050-d6817aeaedfb/manifest?X-Plex-Http-Pipeline=infinite’ ‘-avoid_negative_ts’ ‘disabled’ ‘-map_metadata’ ‘-1’ ‘-map_chapters’ ‘-1’ ‘dash’ ‘-start_at_zero’ ‘-copyts’ ‘-vsync’ ‘cfr’ ‘-init_hw_device’ ‘vaapi=vaapi:’ ‘-filter_hw_device’ ‘vaapi’ ‘-y’ ‘-nostats’ ‘-loglevel’ ‘quiet’ ‘-loglevel_plex’ ‘error’ ‘-progressurl’ ‘http://127.0.0.1:32400/video/:/transcode/session/45ljie0y0akr684vupuwldwa/cac58424-79e7-42f4-9050-d6817aeaedfb/progress

Which is your test please?
Which one stutters?

@ChuckPa apologies for the late reply.
Hardware Transcoding is working only when HDR tone mapping is switched off. Which drivers do I need to enable it?

What Linux Distro and version did you deploy as a LXC?

root@plex:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish

Testing of 11th Gen HW Transcoding & Tonemapping for 4K HEVC HDR10 → 1080p AVC SDR

Functional HW/OS/Software Configuration
  • Intel 11th Gen Tiger Lake i9-11900KB
  • Ubuntu Desktop 20.04.4 LTS
  • Intel Compute Runtime v21.49.21786
  • Plex Media Server v1.25.6.5577
Non-Functional HW/OS/Software Configuration: Scenario 01
  • Intel 11th Gen Tiger Lake i9-11900KB
  • Ubuntu Desktop 20.04.4 LTS
  • Intel Compute Runtime newer than v21.49.21786
  • Plex Media Server v1.25.6.5577
Non-Functional HW/OS/Software Configuration: Scenario 02
  • Intel 11th Gen Tiger Lake i9-11900KB
  • Daily Build Image of Ubuntu Desktop 22.04 LTS
  • Intel Compute Runtime v21.49.21786 and newer
  • Plex Media Server v1.25.6.5577

It won’t work with 21.10

Thanks very much @Achilles!! I can confirm that everything’s working now as expected by recreating the container with Ubuntu 20.04 and ICR 21.49 (I didn’t try the later ICR versions yet)

Perhaps useful for other users trying to do this on Proxmox, I used this script to get PMS setup. Only tweak being changing the OS from:

OSVERSION=${OSTYPE}-21.10

to

OSVERSION=${OSTYPE}-20.04

on line 112.

1 Like

@plexmoxx
CC @ChuckPa

Glad it worked for you. Thanks for the Proxmox VE script tip.

2 Likes

Script has been set to use Ubuntu 20.04
https://tteck.github.io/Proxmox/

3 Likes

Hi guys .

Im thinking about trying Proxmox with Plex and hw transcoding on an Ubuntu 20.04 server ( is LXC better ? )

Is there any guide how to get this up and running? I recall that I read somewhere that I need to blacklist something in a file somewhere?

When starting up a new vm , do I need to specify xx harddrive space or is the space expanding as needed ?

Have an Intel Nuc 11 Pro - do I need to install the Intel compute drivers on the lxc container if I dont use tonemapping enabled on the plex server ? I only need hw transcoding :slight_smile:

Thanks

Morphy

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