[BUG] Transcoding broken on Plex 1.29.1 (Unraid / docker)- I had to roll back to 1.29.0.6244

I’m on Unraid 6.11.1 with LinuxServer.io’s docker container - all been working fine for almost a year.

Randomly today transcoding is broken. All clients just break and report transcoder crashed. I’ve since edited the docker template to use 1.29.0.6244 (version variable) and transcoding is back.

I have an i7 3770 with quicksync on. The few errors i see in the logs include:

Oct 24, 2022 20:52:57.543 [0x147757d68b38] ERROR - [Req#3f8/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b8] [AVHWDeviceContext @ 0x145afb275780] Failed to initialise VAAPI connection: -1 (unknown libva error).
Oct 24, 2022 20:52:57.543 [0x147751edeb38] ERROR - [Req#3f9/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b8] Device creation failed: -5.
Oct 24, 2022 20:52:57.543 [0x147756252b38] ERROR - [Req#3fa/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b8] Failed to set value 'vaapi=vaapi:/dev/dri/renderD129' for option 'init_hw_device': I/O error
Oct 24, 2022 20:52:57.543 [0x1477576d7b38] ERROR - [Req#3fb/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b8] Error parsing global options: I/O error

@swimboi

A 3770 cannot decode HEVC or 10-bit/HDR video.
It will error when probing those.

Again rollback has worked. This issue is even for standard x264 files.
And unless I’m very mistaken even if this was HEVC it shouldn’t cause a crash, it should switch to software transcode.

Based on the snippet you provided

Are the error I speak of.

Do you have the full DEBUG logs (not just ERROR excerpt) which capture the failure that I can inspect?

I responded based on what you provided; nothing more.

Given there were some errors with certain CPUs in 1.29.1, until proven otherwise, it’s possible 1.29.1 hard-fails with a 3770 during HW detection.

hardware profile + plex log.txt (256.8 KB)

You have several errors:

Oct 24, 2022 20:48:46.356 [0x147752f95b38] ERROR - [Req#349/Transcode] [FFMPEG] - libva: /usr/lib/plexmediaserver/lib/dri/iHD_drv_video.so init failed
  1. 3770 CPU does not like, nor has it ever liked, Intel Media Driver (iHD).
    Solution there is VaapiDriver="i965".

  2. What is this device? vaapi=vaapi:/dev/dri/renderD129
    It keeps trying to use it because Hardware transcoding is still enabled.
    The QSV in a 3770 is on the default renderD128 node.

Oct 24, 2022 20:48:57.506 [0x14775298cb38] DEBUG - [Req#3f4/Transcode] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Oct 24, 2022 20:48:57.511 [0x14775298cb38] DEBUG - [Req#3f4/Transcode/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/c4efa15-4387-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Transcoder" -codec:0 h264 -hwaccel:0 vaapi -hwaccel_fallback_threshold:0 10 -hwaccel_output_format:0 vaapi -hwaccel_device:0 vaapi -codec:1 aac -analyzeduration 20000000 -probesize 20000000 -i "myfile.mkv" -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=480:h=270:format=nv12[1];[1]hwupload[2]" -map "[2]" -codec:0 h264_vaapi -b:0 414k -maxrate:0 553k -bufsize:0 1106k -r:0 25 -force_key_frames:0 "expr:gte(t,n_forced*8)" -filter_complex "[0:1] aresample=async=1:ocl='stereo':rematrix_maxval=0.000000dB:osr=48000[3]" -map "[3]" -metadata:s:1 language=eng -codec:1 aac -b:1 125k -f dash -seg_duration 8 -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/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5/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:/dev/dri/renderD129 -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5/progress
Oct 24, 2022 20:48:57.512 [0x14775298cb38] DEBUG - [Req#3f4/Transcode/JobRunner] Jobs: Starting child process with pid 495
Oct 24, 2022 20:48:57.517 [0x147752b8fb38] DEBUG - Request: [127.0.0.1:46188 (Loopback)] PUT /video/:/transcode/session/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5/progress?status=startup (10 live) #3d9 Signed-in Token (user) (range: bytes=0-) 
Oct 24, 2022 20:48:57.518 [0x14775a4f8b38] DEBUG - Completed: [127.0.0.1:46188] 204 PUT /video/:/transcode/session/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5/progress?status=startup (10 live) 0ms 203 bytes (pipelined: 1) (range: bytes=0-) 
Oct 24, 2022 20:48:57.543 [0x147757d68b38] ERROR - [Req#3f8/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5] [AVHWDeviceContext @ 0x145afb275780] Failed to initialise VAAPI connection: -1 (unknown libva error).
Oct 24, 2022 20:48:57.543 [0x147751edeb38] ERROR - [Req#3f9/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5] Device creation failed: -5.
Oct 24, 2022 20:48:57.543 [0x147756252b38] ERROR - [Req#3fa/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5] Failed to set value 'vaapi=vaapi:/dev/dri/renderD129' for option 'init_hw_device': I/O error
Oct 24, 2022 20:48:57.543 [0x1477576d7b38] ERROR - [Req#3fb/Transcode/4gfp1x9ahodb86bcb4ogtbv4/55c3b60e-f6c3-4d74-a336-3e39505395b5] Error parsing global options: I/O error
Oct 24, 2022 20:48:57.545 [0x14775a93db38] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Transcoder' exit code for process 495 is 1 (failure)
Oct 24, 2022 20:49:01.351 [0x14775a6fbb38] DEBUG - Auth: authenticated user n as user2
  1. How do I set VaapiDriver=“i965”?
  2. Is it maybe a 1650? But its not passed to unraid so it shouldn’t be trying to use it.
root@$:/# ls -la /dev/dri
total 0
drwxrwxrwx  3 root root       140 Oct 25 20:00 ./
drwxr-xr-x 16 root root      3660 Oct 25 20:02 ../
drwxrwxrwx  2 root root       120 Oct 25 20:00 by-path/
crwxrwxrwx  1 root video 226,   0 Oct 25 20:00 card0
crwxrwxrwx  1 root video 226,   1 Oct 25 20:00 card1
crwxrwxrwx  1 root video 226, 128 Oct 25 20:00 renderD128
crwxrwxrwx  1 root video 226, 129 Oct 25 20:00 renderD129
  1. In Preferences.xml, before the closing /> add VaapiDriver="i965"
    It will look like SomePref="Value" VaapiDriver="i965" />

  2. It looks like you have two devices coming through. Logically, renderD128 = QSV and renderD129 is either Nvidia or AMD (as far as the kernel is concerned).

  3. If it is an Nvidia coming through, it will look like this (with different slot number)

[chuck@glockner ~.2003]$ ls -la /sys/module/nvidia/drivers/pci:nvidia/
total 0
drwxr-xr-x  2 root root    0 Oct 23 23:23 ./
drwxr-xr-x 34 root root    0 Oct 23 23:23 ../
lrwxrwxrwx  1 root root    0 Oct 23 23:23 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:07:00.0/
--w-------  1 root root 4096 Oct 24 21:14 bind
lrwxrwxrwx  1 root root    0 Oct 24 21:14 module -> ../../../../module/nvidia/
--w-------  1 root root 4096 Oct 24 21:14 new_id
--w-------  1 root root 4096 Oct 24 21:14 remove_id
--w-------  1 root root 4096 Oct 23 23:23 uevent
--w-------  1 root root 4096 Oct 24 21:14 unbind
[chuck@glockner ~.2004]$ 

At that point, confirm the nvidia encode and decode drivers are installed.

I just helped another user with this last night.

Want ended up working for me was adding
HardwareDevicePath=“/dev/dri/renderD129” to the preferences.xml – not sure what changed but I guess Nvidia AND iQS started coming though to Docker in unraid.

Other people have reported this issue:

That would imply Unraid added kernel driver support for it.

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