Transcoding DolbyVision with HDR Fallback with Hardware-accelerated video encoding enabled

Server Version#: Version 1.41.0.8994
Player Version#: Version 4.136.1
Unraid 6.12.13
GPU1: Raptor Lake-S GT1 [UHD Graphics 770]
GPU2: Geforce GTX 1070

I am having trouble supporting devices that cannot play Dolby Vision files, I was assuming my Plex Media Server would be able to transcode it to be able to support it correctly.

When I have ‘Use Hardware-accelerated video encoding’ enabled my movies look like this when it needs to transcode.

Although when i use my GTX 1070 it does work fine but the colours are washed out, but my tautulli doesn’t say [HW] and i feel as though that is because the 1070 is aged and does not naturally support the required codecs, when it is using the gtx 1070 i can see my cpu in my unraid server is used a lot and this leads me to believe that it is using software encoding on the cpu? (i5-13600k)

When i disable ‘Use Hardware-accelerated video encoding’ it does work fine but it takes a good chunk of performance from my cpu as it is encoding 4k DoVI/HDR which means less people get to enjoy it at the same time.

I am not sure what the issue is with this, in the end I would like to use my i5-13600k’s gpu with Hardware-Accelerated Video Encoding enabled and not the 1070 as that is in the server for my local ai

Here is the metadata for one of the movies that is having the issue:

<Video ratingKey="1105722" key="/library/metadata/1105722" guid="plex://movie/62287ddfcf2de0737380365e" slug="alien-romulus" studio="20th Century Studios" type="movie" title="Alien: Romulus" librarySectionTitle="Cinema Central" librarySectionID="1" librarySectionKey="/library/sections/1" contentRating="au/MA 15+" summary="While scavenging the deep ends of a derelict space station, a group of young space colonists come face to face with the most terrifying life form in the universe." rating="8.0" audienceRating="8.5" viewOffset="308000" skipCount="2" lastViewedAt="1729203377" year="2024" tagline="Everyone will hear you scream." thumb="/library/metadata/1105722/thumb/1729121294" art="/library/metadata/1105722/art/1729121294" duration="7133792" originallyAvailableAt="2024-08-14" addedAt="1728980590" updatedAt="1729121294" audienceRatingImage="rottentomatoes://image.rating.upright" chapterSource="media" primaryExtraKey="/library/metadata/1105723" ratingImage="rottentomatoes://image.rating.ripe">
<Media id="930564" duration="7133792" bitrate="25314" width="3840" height="1606" aspectRatio="2.35" audioChannels="6" audioCodec="eac3" videoCodec="hevc" videoResolution="4k" container="mkv" videoFrameRate="24p" videoProfile="main 10" hasVoiceActivity="1">
<Part accessible="1" exists="1" id="988628" key="/library/parts/988628/1728915392/file.mkv" duration="7133792" file="/Umovies/Alien Romulus (2024)/Alien Romulus (2024) WEBDL-2160p.mkv" size="22572934361" container="mkv" deepAnalysisVersion="6" requiredBandwidths="46666,34285,27847,27198,26552,26048,25807,25807" videoProfile="main 10">
<Stream id="2086406" streamType="1" default="1" codec="hevc" index="0" bitrate="25314" language="English" languageTag="en" languageCode="eng" DOVIBLCompatID="1" DOVIBLPresent="1" DOVIELPresent="0" DOVILevel="6" DOVIPresent="1" DOVIProfile="8" DOVIRPUPresent="1" DOVIVersion="1.0" bitDepth="10" chromaLocation="topleft" chromaSubsampling="4:2:0" codedHeight="1608" codedWidth="3840" colorPrimaries="bt2020" colorRange="tv" colorSpace="bt2020nc" colorTrc="smpte2084" frameRate="24.000" height="1606" level="150" original="1" profile="main 10" refFrames="1" requiredBandwidths="45896,33517,27078,26430,25783,25280,25040,25040" width="3840" displayTitle="4K DoVi/HDR10 (HEVC Main 10)" extendedDisplayTitle=" (4K DoVi/HDR10 HEVC Main 10)"> </Stream>
<Stream id="2086407" streamType="2" selected="1" default="1" codec="eac3" index="1" channels="6" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" original="1" requiredBandwidths="768,768,768,768,768,768,768,768" samplingRate="48000" displayTitle="English (EAC3 5.1)" extendedDisplayTitle=" (English EAC3 5.1)"> </Stream>
<Stream id="2086408" streamType="3" canAutoSync="0" codec="srt" index="2" language="English" languageTag="en" languageCode="eng" original="1" requiredBandwidths="1,1,1,1,1,1,1,1" displayTitle="English (SRT)" extendedDisplayTitle=" (English SRT)"> </Stream>
<Stream id="2086409" streamType="3" canAutoSync="0" codec="srt" index="3" language="English" languageTag="en" languageCode="eng" hearingImpaired="1" original="1" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="English SDH (SRT)" extendedDisplayTitle="SDH (English SRT)"> </Stream>
<Stream id="2086410" streamType="3" canAutoSync="0" codec="srt" index="4" language="English" languageTag="en" languageCode="eng" hearingImpaired="1" original="1" requiredBandwidths="1,1,1,1,1,1,1,1" title="SDH" displayTitle="English SDH (SRT)" extendedDisplayTitle="SDH (English SRT)"> </Stream>
<Stream id="2086411" streamType="3" canAutoSync="0" codec="srt" index="5" language="Spanish" languageTag="es" languageCode="spa" dub="1" requiredBandwidths="1,1,1,1,1,1,1,1" title="Latin American" displayTitle="Spanish (SRT)" extendedDisplayTitle="Latin American (Spanish SRT)"> </Stream>
<Stream id="2086412" streamType="3" canAutoSync="0" codec="srt" index="6" language="French" languageTag="fr" languageCode="fra" dub="1" requiredBandwidths="1,1,1,1,1,1,1,1" title="Canadian" displayTitle="French (SRT)" extendedDisplayTitle="Canadian (French SRT)"> </Stream>

And here are the logs to my server, I played the movie for about 30 seconds before capturing the logs to hopefully get everything that someone needs to be able to support me and point me in the right direction:

Plex Media Server Logs_2024-10-18_09-20-43.zip (4.8 MB)

I hope this is enough information for someone to be able to assist me!

If you’ve not already done so, specifically choose the Intel graphics in Settings → Transcoder + Show Advanced → Hardware Transcoding Device.

Plex is using the Intel graphics for transcoding and tone mapping.

However, you are transcoding a 25 Mbps 3840x1606 HDR stream to 0.576 Mbps, 478x200. That is a 97.7% reduction in bandwidth and a 98.5% reduction in pixels per frame.

What happens if you choose a different target, something like 1080p at 8 Mbps or 720p at 4 Mbps?


Plex is using Intel graphics:
Oct 18, 2024 09:20:04.181 [22581253012280] DEBUG - [Req#e03d53/Transcode/yln0kxxmrt8ym9l9znv4h9ys] TPU: hardware transcoding: final decoder: vaapi, final encoder: vaapi

Plex is tonemapping (tonemap_opencl=tonemap=hable):
Oct 18, 2024 09:20:04.181 [22581253012280] DEBUG - [Req#e03d53/Transcode/yln0kxxmrt8ym9l9znv4h9ys/JobRunner] Job running: EAE_ROOT=/tmp/pms-3269df46-d068-4c14-bcac-7fedcbc69960/EasyAudioEncoder EnableAIL=0 FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/7592546-570471557d92948f58893deb-linux-x86_64/' LIBVA_DRIVERS_PATH="/config/Library/Application Support/Plex Media Server/Cache/va-dri-linux-x86_64" NEOReadDebugKeys=1 OCL_ICD_VENDORS="/config/Library/Application Support/Plex Media Server/Cache/cl-icds-linux-x86_64" X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx cl_cache_dir="/config/Library/Application Support/Plex Media Server/Cache/Shaders/icr-e8d3b00e629bec95ae9f2c9a-linux-x86_64/" "/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 eac3_eae -eae_prefix:1 yln0kxxmrt8ym9l9znv4h9ys_ -ss 11.946665666666668 -analyzeduration 20000000 -probesize 20000000 -i "/Umovies/Alien Romulus (2024)/Alien Romulus (2024) WEBDL-2160p.mkv" -filter_complex '[0:0]hwupload[0];[0]scale_vaapi=w=478:h=200:format=p010[1];[1]hwmap=derive_device=opencl[2];[2]tonemap_opencl=tonemap=hable:format=nv12:m=bt709:p=bt709:r=tv[3];[3]hwmap=derive_device=vaapi:reverse=1[4];[4]select=gte(t\,11.958332)[5];[5]hwupload[6]' -map "[6]" -metadata:s:0 language=eng -codec:0 h264_vaapi -b:0 394k -maxrate:0 526k -bufsize:0 1052k -r:0 24 -force_key_frames:0 "expr:gte(t,n_forced*3)" -filter_complex "[0:1] aresample=async=1:ochl='stereo':rematrix_maxval=0.000000dB:osr=48000[7]" -map "[7]" -metadata:s:1 language=eng -codec:1 aac -b:1 153k -bsf:1 framedrop=count=2 -f dash -seg_duration 3 -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 5 -time_delta 0.0625 -manifest_name "http://127.0.0.1:32400/video/:/transcode/session/yln0kxxmrt8ym9l9znv4h9ys/9ff9d89c-78f7-45ed-bc93-c0f56bd168f0/manifest?X-Plex-Http-Pipeline=infinite" -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 dash -start_at_zero -copyts -init_hw_device vaapi=vaapi:/dev/dri/renderD136,driver=iHD -filter_hw_device vaapi -y -nostats -loglevel quiet -loglevel_plex error -progressurl http://127.0.0.1:32400/video/:/transcode/session/yln0kxxmrt8ym9l9znv4h9ys/9ff9d89c-78f7-45ed-bc93-c0f56bd168f0/progress


Plex is transcoding to 478x200 at 526kbps (decision=transcode bitrate=526 encoder=h264_vaapi width=478 height=200):

Oct 18, 2024 09:20:04.176 [22581253012280] DEBUG - [Req#e03d53/Transcode/yln0kxxmrt8ym9l9znv4h9ys] Streaming Resource: Session 0x1489d0e93168:10ak9w8suklirznmur1zitk4 changed from using 24724kbps to 720kbps of WAN bandwidth.  Used bandwidth is now 720kbps
Oct 18, 2024 09:20:04.177 [22581253012280] DEBUG - [Req#e03d53/Transcode/yln0kxxmrt8ym9l9znv4h9ys] Streaming Resource: Reached Decision id=1105722 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=930564 part=(id=988628 decision=transcode container=mp4 protocol=dash streams=(Video=(id=2086406 decision=transcode bitrate=526 encoder=h264_vaapi width=478 height=200) Audio=(id=2086407 decision=transcode bitrate=153 encoder=aac channels=2 rate=48000))))

Hey FordGuy,

I was able to resolve this issue by trying your first suggestion, I posted all of the details on this response with ChuckPA - https://forums.plex.tv/t/re-transcoding-dolbyvision-with-hdr-fallback-with-hardware-accelerated-video-encoding-enabled/892619

Thank you very much for the straight forward suggestions!

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