Hardware Transcoding Issue - Alder Lake N97

Server Version#: 1.40.5.8921
Player Version#: 4.137.1 (web)

I am currently migrating my plex setup from an Odroid H3+ (Jasper Lake N6005) to H4+ (Alder Lake N97). I have gone through the process of backing up, reinstalling Linux, restoring, etc. To be clear, Plex says it is doing hardware transcoding but I am using way more CPU than I am used to (unless I am mistaken). I feel like the H3+ did hardware transcoding around 12% of CPU and the H4+ uses closer to 40%.

Back / Restore Steps

a. backup existing plexmediaserver

sudo service plexmediaserver stop
cd /var/lib
sudo rsync -aPhi --delete /var/lib/plexmediaserver /backup

b. install fresh Debian 12.7 amd
c. install plexmediaserver

https://www.linuxcapable.com/how-to-install-plex-media-server-on-debian-11-bullseye/

d. restore backup

sudo service plexmediaserver stop
sudo  rm -fr /var/lib/plexmediaserver
sudo rsync -aPhi --delete /backup/plexmediaserver /var/lib
sudo chown -R plex:plex /var/lib/plexmediaserver
sudo service plexmediaserver start

Firmware

Everything seems correct from a firmware perspective. I see that my i915 driver is installed and dmesg doesn’t have errors like ‘Your graphics device *** is not properly supported by the driver’, this happened on H3. But maybe I should be using a different driver setup?

Transcoding

Plex says it is hardware transcoding and here is a screenshot of that.


I also see errors like this in Plex Media Server.log:

Sep 02, 2024 21:18:38.188 [140632896756536] ERROR - [Req#314c/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415/50dec20f-9cfe-46b1-be55-87b196708a13] [h264 @ 0x7f21cb93e0c0] SEI type 5 size 5536 truncated at 5523

I have attached the server logs as well. Thank you.

Plex Media Server Logs_2024-09-02_21-46-56.zip (1.9 MB)

  1. Yes, your logs are showing HW transcoding
Sep 02, 2024 21:18:41.049 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] [FFMPEG] - Created surface 0.
Sep 02, 2024 21:18:41.049 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] [FFMPEG] - Direct mapping possible.
Sep 02, 2024 21:18:41.051 [140632902884152] INFO - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] Preparing driver imd for GPU Alder Lake-N [UHD Graphics]
Sep 02, 2024 21:18:41.051 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415/DriverDL/imd] Skipping download; already exists
Sep 02, 2024 21:18:41.051 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi
Sep 02, 2024 21:18:41.052 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415/JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Codecs/27d3929-731e70e17b964ba367f4016a-linux-x86_64/' LIBVA_DRIVERS_PATH="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/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 -ss 3920 -analyzeduration 20000000 -probesize 20000000 -i "/media/plex/movies/Shutter Island (2010).mkv" -filter_complex "[0:0]hwupload[0];[0]scale_vaapi=w=320:h=136:format=nv12[1];[1]hwupload[2]" -map "[2]" -metadata:s:0 language=eng -codec:0 h264_vaapi -b:0 134k -maxrate:0 179k -bufsize:0 358k -r:0 23.975999999999999 -force_key_frames:0 "expr:gte(t,n_forced*8)" -map 0:1 -codec:1 copy -copypriorss:1 0 -segment_format matroska -f ssegment -individual_header_trailer 0 -flags +global_header -segment_header_filename header -segment_time 8 -segment_start_number 490 -segment_copyts 1 -segment_time_delta 0.0625 -segment_list "http://127.0.0.1:32400/video/:/transcode/session/82985ABD-FB5C-46D8-9DBB-73107DAA6415/737180f2-2533-4949-95e3-527472ae47e4/manifest?X-Plex-Http-Pipeline=infinite" -segment_list_type csv -segment_list_size 5 -segment_list_separate_stream_times 1 -segment_list_unfinished 1 -segment_format_options output_ts_offset=10 -max_delay 5000000 -avoid_negative_ts disabled -map_metadata:g -1 -map_metadata:c -1 -map_chapters -1 "media-%05d.ts" -start_at_zero -copyts -init_hw_device vaapi=vaapi:/dev/dri/renderD128,driver=iHD -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/82985ABD-FB5C-46D8-9DBB-73107DAA6415/737180f2-2533-4949-95e3-527472ae47e4/progress
Sep 02, 2024 21:18:41.052 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415/JobRunner] In directory: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/Transcode/Sessions/plex-transcode-82985ABD-FB5C-46D8-9DBB-73107DAA6415-737180f2-2533-4949-95e3-527472ae47e4"
Sep 02, 2024 21:18:41.052 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415/JobRunner] Jobs: Starting child process with pid 1578
Sep 02, 2024 21:18:41.052 [140632902884152] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] Started session successfully: 82985ABD-FB5C-46D8-9DBB-73107DAA6415
Sep 02, 2024 21:18:41.053 [140632838921016] DEBUG - [Req#318a/Transcode/82985ABD-FB5C-46D8-9DBB-73107DAA6415] Streaming Resource: Resetting play progress due to seek
  1. This is HW transcoding, with tonemapping, and audio conversion on an N100 (AlderLake-N) as seen on my N100.

CPU load will settle down once the output buffer fills and it goes into ‘sloth’ mode (visible in the logs)


    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                                                                       
 904459 999       20   0  477444 229836  82688 R  50.8   1.4   0:21.98 Plex Transcoder                                                                                                                                               
 895164 999       20   0    2624   1260   1152 S  12.2   0.0   0:27.69 EasyAudioEncode                                                                                                                                               
  36810 999       20   0  339704 111008  35584 S   6.9   0.7  19:25.88 Plex Media Serv                                                                                                                                               
 886125 root      20   0       0      0      0 I   1.0   0.0   0:01.24 kworker/u8:1-xprtiod                                                                                                                                          
 895214 root      20   0       0      0      0 I   0.9   0.0   0:01.02 kworker/u8:4-xprtiod                                                                                                                                          
 899730 root      20   0       0      0      0 I   0.7   0.0   0:00.38 kworker/u8:0-xprtiod                                                                                                                                          
 903607 root      20   0       0      0      0 I   0.5   0.0   0:00.23 kworker/3:1-i915-unordered                                                                                                                                    
    922 root      20   0  160832 106916   9096 S   0.4   0.7  10:46.69 pvestatd                                                                                                                                                      
     17 root      20   0       0      0      0 I   0.3   0.0   1:20.15 rcu_preempt                            

The SEI Type 5 are usually associated with timestamps from either poorly encoded or damaged files. A Remux (mkvtoolnix / mkvmerge) will fix the timestamps.

Typical log of these type errors.

  Stream #0:0 -> #0:0 (copy)

Press [q] to stop, [?] for help

[matroska @ 0x2901800] Non-monotonous DTS in output stream 0:0; previous: 0, current: -167; changing to 0. This may result in incorrect timestamps in the output file.

[matroska @ 0x2901800] Non-monotonous DTS in output stream 0:0; previous: 0, current: -134; changing to 0. This may result in incorrect timestamps in the output file.

[matroska @ 0x2901800] Non-monotonous DTS in output stream 0:0; previous: 0, current: -100; changing to 0. This may result in incorrect timestamps in the output file.

[matroska @ 0x2901800] Non-monotonous DTS in output stream 0:0; previous: 0, current: -67; changing to 0. This may result in incorrect timestamps in the output file.

[matroska @ 0x2901800] Non-monotonous DTS in output stream 0:0; previous: 0, current: -34; changing to 0. This may result in incorrect timestamps in the output file.

[NULL @ 0x28f1ac0] SEI type 5 size 1360 truncated at 680

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