HW Transcoding Quality

Server Version#: 1.25.8.5663
Player Version#: Tested on latest Plex Web

My server uses Intel Quicksync for HW Transcoding. When transcoding HEVC to h264, there is usually a fudge factor multiplier for the bitrate to maintain the quality of the original video.

Currently, this factor is not being used according to my logs, and it is being set to an average of 20 Mbps. This should actually be fine, but my dashboard is reporting around 10Mbps, which means noticably reduced quality.

I saw a changelog entry a couple server versions ago about transcoding quality. Is that causing this issue?

It seems to be incorrectly choosing a “maximum” bitrate. It chooses the same bitrate as the source. If I manually change it to 1080p 20Mbps, then the quality looks fine.

This also happens with h264 videos, not just HEVC.

Note: This is all local playback

This still happens on version 1.25.9.5721

It’s definitely an issue with “Maximum” quality, as it’s just setting the transcode bitrate to the original video bitrate.

It should at least be defaulting to 1080p 20Mbps if the fudge factors aren’t being used anymore.

This is still an issue on version 1.26.0

I’ve also noticed that SW Transcoding is using the same “maximum” bitrate as HW Transcoding, and it always seems to be around 10 Mbps regardless of the source bitrate.

This is still and issue on 1.26.1.5798. I get higher quality playback selecting “Automatically Convert” than “Maximum”. I’m attaching logs where it starts at Maximum then I change it to Automatic. I noticed Maximum is only setting an average bitrate, no min/max or buffer, where Automatic does set maxrate and bufsize.

The Dashboard reports it as local and secure (with the weird 10Gbps max bitrate). I did also notice that changes to a more sensible value, like 16Mbps, when selecting 1080p 20Mbps.

I think maxrate and bufsize need to be defined for better quality.
2022-05-16 - Plex Media Server.log (1.4 MB)

From the log file:
transcode bitrate=2147483647 encoder=h264_qsv width=1920 height=800

This can indicate Plex has not performed a deep analysis of the file, to determine the bandwidth at various points.

Look at the XML info for the file.

You should see an entry with deepAnalysisVersion="6". Also a requiredBandwidths entry for the overall file and each video/audio/subtitle track. Ex: requiredBandwidths="39082,38821,38529,38195,37863,37534,36106,36100"

In Settings → Scheduled Tasks, check that both Upgrade media analysis during maintenance and Perform extensive media analysis during maintenance are selected. This will tell Plex to perform deep analysis during the maintenance window. You may need to extend the window for maintenance tasks as well.

The deep analysis helps Plex determine the bandwidth needed for transcoding.

It might help with the transcode quality issues you are experiencing.

Also, look at some of the movies/shows that have been in your libraries for a long time. Plex might have analyzed those. You could test with one of those files until Plex analyzes Watchmen.



Example XML Info with deepAnalysis and requiredBandwidths

<Media id="1837" duration="5262091" bitrate="40648" width="1920" height="1080" aspectRatio="1.78" audioChannels="6" audioCodec="dca-ma" videoCodec="h264" videoResolution="1080" container="mkv" videoFrameRate="24p" audioProfile="ma" videoProfile="high">
<Part accessible="1" exists="1" id="1837" key="/library/parts/1837/1651125657/file.mkv" duration="5262091" file="/media/movies-hd/Airplane! (1980)/Airplane! (1980).mkv" size="26736476943" audioProfile="ma" container="mkv" deepAnalysisVersion="6" indexes="sd" requiredBandwidths="42673,42286,41525,40899,40838,40838,40838,40838" videoProfile="high">
<Stream id="5040" streamType="1" default="1" codec="h264" index="0" bitrate="39112" bitDepth="8" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="1088" codedWidth="1920" frameRate="23.976" hasScalingMatrix="0" height="1080" level="41" profile="high" refFrames="4" requiredBandwidths="37979,37675,37112,36895,36890,36890,36890,36890" scanType="progressive" width="1920" displayTitle="1080p (H.264)" extendedDisplayTitle="1080p (H.264)"> </Stream>
<Stream id="5041" streamType="2" selected="1" default="1" codec="dca" index="1" channels="6" bitrate="1536" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" profile="ma" requiredBandwidths="4803,4640,4194,3921,3921,3921,3921,3921" samplingRate="48000" title="dts-HD MA 5.1" displayTitle="English (DTS-HD MA 5.1)" extendedDisplayTitle="dts-HD MA 5.1 (English)"> </Stream>
<Stream id="79633" streamType="3" default="1" codec="pgs" index="2" bitrate="46" language="English" languageTag="en" languageCode="eng" requiredBandwidths="58,58,58,58,58,58,58,58" title="English SDH" displayTitle="English (PGS)" extendedDisplayTitle="English SDH (PGS)"> </Stream>
<Stream id="5043" streamType="3" codec="pgs" index="3" bitrate="29" language="English" languageTag="en" languageCode="eng" requiredBandwidths="294,294,294,294,294,294,294,294" title="Trivia" displayTitle="English (PGS)" extendedDisplayTitle="Trivia (English PGS)"> </Stream>

Yes, it has the Deep Analysis performed:

<Media id="16620" duration="12923127" bitrate="9265" width="1920" height="800" aspectRatio="2.35" audioChannels="6" audioCodec="flac" videoCodec="hevc" videoResolution="1080" container="mkv" videoFrameRate="24p" videoProfile="main 10">
<Part accessible="1" exists="1" id="21722" key="/library/parts/21722/1650094091/file.mkv" duration="12923127" file="F:\Movies\UHD\Watchmen\Watchmen (2009)\Watchmen (2009) - Ultimate Cut - 1080p.mkv" size="14916094563" container="mkv" deepAnalysisVersion="6" hasThumbnail="1" requiredBandwidths="26732,21168,14186,12736,11630,11286,10003,9542" videoProfile="main 10">
<Stream id="60402" streamType="1" default="1" codec="hevc" index="0" bitrate="5129" language="English" languageTag="en" languageCode="eng" bitDepth="10" chromaLocation="left" chromaSubsampling="4:2:0" codedHeight="800" codedWidth="1920" colorPrimaries="bt709" colorRange="tv" colorSpace="bt709" colorTrc="bt709" frameRate="23.976" height="800" level="120" profile="main 10" refFrames="1" requiredBandwidths="21190,15642,9835,7844,7421,7167,5784,5388" width="1920" displayTitle="1080p (HEVC Main 10)" extendedDisplayTitle="1080p (HEVC Main 10)"> </Stream>
<Stream id="60403" streamType="2" selected="1" default="1" codec="flac" index="1" channels="6" bitrate="3435" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" bitDepth="24" requiredBandwidths="4798,4477,3830,3621,3621,3621,3621,3621" samplingRate="48000" title="FLAC-HD Surround 5.1" displayTitle="English (FLAC 5.1)" extendedDisplayTitle="FLAC-HD Surround 5.1 (English)"> </Stream>
<Stream id="60404" streamType="2" codec="ac3" index="2" channels="6" bitrate="640" language="English" languageTag="en" languageCode="eng" audioChannelLayout="5.1(side)" requiredBandwidths="640,640,640,640,640,640,640,640" samplingRate="48000" title="DD-EX Surround 5.1" displayTitle="English (AC3 5.1)" extendedDisplayTitle="DD-EX Surround 5.1 (English AC3)"> </Stream>
<Stream id="60405" streamType="3" codec="pgs" index="3" bitrate="31" language="English" languageTag="en" languageCode="eng" headerCompression="1" requiredBandwidths="70,70,70,70,70,70,70,70" title="CC [SDH] (2.40:1)" displayTitle="English (PGS)" extendedDisplayTitle="CC [SDH] (2.40:1) (English PGS)"> </Stream>
<Stream id="60406" streamType="3" codec="pgs" index="4" bitrate="31" language="English" languageTag="en" languageCode="eng" headerCompression="1" requiredBandwidths="70,70,70,70,70,70,70,70" title="CC [SDH] (16:9)" displayTitle="English (PGS)" extendedDisplayTitle="CC [SDH] (16:9) (English PGS)"> </Stream>

I’ve always had those maintenance settings enabled. This is not a new file in my library.

This is still an issue, but it might only pertain to the web player, not all players. I’ve added a tag for plex-web.

I found an HEVC video that needed transcoding on my Android device and it was using the fudge-factor multiplier as expected, with no noticable artifacts or degradation.

This seems to have been a Plex Web only problem, and a recent update looks to have fixed it. It was finally automatically transcoding at ~20Mbps like it claimed to be, and the quality was much better.

Not sure if it was a Plex Web / Server / iGPU driver update that fixed it, or a combo, but something did.

This issue is back again. Despite the logs indicating the transcode bitrate is at 20Mbps, it’s back to ~5Mbps according to the Dashboard graph. It initially spikes toward 20Mbps then immediately drops below 10Mbps.

I’m on server version 1.28.1.6104, but this version was working correctly previously. This is starting to look like a bandwidth calculation error in Plex Web.

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