Hardware transcoding issue

@ChuckPa
Quick test with one problem movie 1.30.2.6563 fails works with 1.31.1.6617

edit: Tested a few more “Video: hevc (Main 10), yuv420p(tv” and they now transcode fine

The transcoder settings are the same as in the previous releases; makes me think there’s actually a fix/changes in ffmpeg done?
They are still using the depreciated hq preset, see the difference and why px -tune hq was introduced preset values the default p4 -tune hq is more effective then the old hq


tried to group the settings 
-codec:0 hevc -hwaccel:0 nvdec -threads:0 1 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda 
-codec:1 ac3 
-ss 310 -analyzeduration 20000000 -probesize 20000000 -i IN.mkv 
-ss 310 -analyzeduration 20000000 -probesize 20000000 -i /ssdplextrans/Transcode/Sessions/plex-transcode-9B29C0B6-000F-4E23-A7F7-E467DF002A4E-d973b1c7-787a-4440-a6c3-eb332525246f/temp-0.srt 

-filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] 
-codec:0 h264_nvenc -b:0 14012k -maxrate:0 18683k -bufsize:0 37366k -preset:0 hq 
-forced-idr:0 1 -r:0 23.975999999999999 -force_key_frames:0 expr:gte(t,n_forced*1) 

-filter_complex [0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[2] -map [2] 
-metadata:s:1 language=eng -codec:1 libopus -b:1 233k -map 1:s:0 -metadata:s:2 language=nld -codec:2 copy -strict_ts:2 0 -map 0:t? -codec:t copy

@ChuckPa Thanks for this build!

Seems to be working fine! Tested a few files/transcode I had issues with before which seems to be working now.

Ubuntu 20.04.1

Version 1.31.2.6715

NVIDIA-SMI 510.108.03
Quadro P2000

1080p (H264) → 1080p/720p/480p

Can’t wait for this to get pushed out!

Looks OK so far with my initial testing, this 1.31.2.6715 release seems to be as-good or better as the previous version I was able to get working, 1.31.1.6617. I haven’t seen any files fail to play so far (HEVC and MPEG4 both appear fine).

OS: Ubuntu 20.04
GPU: GTX 1660
Driver Version: 525.78.01

Is it possible to get an rpm of this version?

@kd838383

@plex_famverhaegen.be

This engineering build - 1.31.2.6715 - contains internal CODE CHANGES / Patches

This is by no means ‘stock ffmpeg’

Hi Chuck,

Is there a way for your team to push the build to a develop channel within Docker Hub? I would like to test as well and confirm.

Thank you,
Shehwaz

@Shehwaz1

Did you forget that you can:

  1. make the DEB file visible inside the container
    (Copy it to where /config is mapped)

  2. Get into the container command line

  3. dpkg -i filename.deb

I added this capability when rewriting the packaging. We needed to be able to update containers on the fly.

Thank you for the RPM.

Centos 8 stream 5.19.3-1.el8.elrepo.x86_64
Quadro P2000
515.86.01
Supermicro MB X9DR3-F BIOS 3.4

Hardware transcoding on files that failed are now working (mostly looking at 1080 to 1080).

@ChuckPa
Was able to install and test 1.31.2.6715 8bit hevc hw transcoding seems to be working properly. Seeing VAAPI errors, but hw transcoding works.

~]$ ps aux |grep "jelly" | grep -v grep; nvidia-smi; tail -10 /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Logs/Plex\ Media\ Server.log
plex     1580950 27.0  1.2 5340384 396048 ?      Sl   13:52   0:00 /usr/lib/plexmediaserver/Plex Transcoder -codec:0 hevc -hwaccel:0 nvdec -hwaccel_fallback_threshold:0 10 -threads:0 1 -hwaccel_output_format:0 cuda -hwaccel_device:0 cuda -analyzeduration 20000000 -probesize 20000000 -i /srv/ftp/movies/test/jellyfish-30-mbps-hd-hevc.mkv -filter_complex [0:0]hwupload[0];[0]scale_cuda=w=1920:h=1080:format=nv12[1] -map [1] -codec:0 h264_nvenc -b:0 8514k -maxrate:0 11352k -bufsize:0 22704k -preset:0 hq -forced-idr:0 1 -r:0 29.969999999999999 -force_key_frames:0 expr:gte(t,n_forced*1) -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/l32hgutrx5d6amo58pajpsij/0606c051-857e-4b54-8e8c-3fe5fe5cbc92/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 cuda=cuda: -filter_hw_device cuda -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/l32hgutrx5d6amo58pajpsij/0606c051-857e-4b54-8e8c-3fe5fe5cbc92/progress
Fri Feb 17 13:52:15 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.89.02    Driver Version: 525.89.02    CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0 Off |                  N/A |
|  0%   48C    P0    45W / 130W |    332MiB /  6144MiB |      2%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A   1580950      C   ...diaserver/Plex Transcoder      328MiB |
+-----------------------------------------------------------------------------+
Feb 17, 2023 13:51:25.620 [0x7fa8da127b38] WARN - [Req#382] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.
Feb 17, 2023 13:51:43.076 [0x7fa8da127b38] ERROR - [Req#390/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:51:43.237 [0x7fa8da127b38] ERROR - [Req#390/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:51:45.870 [0x7fa8dadc4b38] WARN - [Req#3bb/Transcode] Got a transcode session ping without a valid session ID.
Feb 17, 2023 13:52:11.863 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:52:12.027 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:52:12.193 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:52:12.351 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:52:12.512 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).
Feb 17, 2023 13:52:12.693 [0x7fa8dadc4b38] ERROR - [Req#445/Transcode] [FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

Hi @ChuckPa! Assuming this indeed is the fix whats the best way to know what publicly available version has it so I know when to update? Should I look for something specific in the release notes? Thanks for all the hard work and I hope you feel better!

@ChuckPa Off course as you don’t use “stock ffmpeg” [as for instance jellyfinn is doing] but ffmpeg libraries.

Just want to peek into this thread as I also have this problem.

System: Ubuntu 22.04
Driver: 515.86.01
GPU: Quadro RTX4000

I tried version 1.31.1.6617 and nearly all of my hw transcoding issues went away, the only situation I could break it - was with a 4K HDR hevc file and Chrome. It firstly would direct play (which is crazy but nice) and then I changed the playback quality to 1080p@12mbit. It loads for a second but nothing else happens. The same thing in Edge is different, Edge does not support HEVC (didn´t install the hevc windows extension) and the file would start directly as a transcoded stream just fine.

I will try the new 1.31.2.6715 version, maybe it fixes the chrome behavior.


I just got one question while reading through the thread. It’s regarding server hardware. I´m somewhat confused. Does Plex scan if the hardware is enterprise-grade? And if it is, it refuses to utilize it? Would be interesting, as I´m using an “old” Dell R730XD server and didn´t experience any “forced” slowdowns and also never ever read something in this regard. Sorry if this is off-topic…

There is no Publicly Available version which has this YET

This is the Engineer’s Build

If you all confirm this works, I’ll let her know and, from there, she’ll take the next steps to getting it out to you all.

1 Like

No… Plex doesn’t scan for hardware ‘grade’. Either the hardware is capable or it isn’t.
If you use old CPUs – expect to suffer the CPU performance.

This has been a tough problem to identify and I don’t know if Engineering really understands it either because there is no single “smoking gun” which everyone agrees on.

We might finally be over this one :crossed_fingers:

3 Likes

UPDATE:

I just chatted with the engineer.

The changes being seen here in Test Build 1.31.2.6715 have been approved and part of master source and should be in PMS 1.32.2

FYI. PMS 1.31.2 (master release) is currently being built and will be internal Alpha test next

5 Likes

@Mitzsch are you also able to change quality in Chrome during playback with PMS running on enterprise equipment using Nvidia, and does playback keep going after it switches quality ?

Changing the quality in Chrome does not work for me with any version of PMS running on any enterprise hardware with Nvidia GPU, I have tested so far. While it works just fine when PMS is running on a standard consumer level hardware with the same GPU. I have no idea why, or what could cause such a weird behaviour. It’s incredibly weird. But I know of several other people having the same kind of issue.

@ChuckPa I have the same issue with Chrome on the new engineering build as well.

Assume we can keep on running 1.31.2.6715 and upgrade to this “master release”

I will keep these links as long as google allows / until 1.31.2 (officially) comes out next week ( :crossed_fingers: )

Yes, you will be able to upgrade to the formal (master release) when it’s passed internal and QA. (appears in PlexPass)

1 Like

Look for anything in the release notes which says Transcoding or Nvidia

1 Like