From 5c08b2975625cdc4201ac162d27afce9490db34b Mon Sep 17 00:00:00 2001 From: Tolu Adegbehingbe <71156414+toluLikesToCode@users.noreply.github.com> Date: Sun, 9 Aug 2026 23:05:23 -0600 Subject: [PATCH] fix(plex): keep compatible audio on capped transcodes (#1845) `maxVideoBitrate` budgets the whole stream, so a capped transcode forced even profile-compatible audio down to low-rate AAC (measured on Plex 1.43: EAC3 5.1 640k became 360k AAC). The client profile already carries the video cap through `add-limitation(video.bitrate)`, so drop the redundant `maxVideoBitrate` param and send `directStreamAudio=1`: the video stays capped per preset while audio in the codecs the profile declares (aac/ac3/eac3/mp3) is copied through untouched. Audio the HLS target cannot carry still transcodes as before. --- lib/services/plex_client.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/services/plex_client.dart b/lib/services/plex_client.dart index 55f0d977..5ed2a32f 100644 --- a/lib/services/plex_client.dart +++ b/lib/services/plex_client.dart @@ -3001,10 +3001,9 @@ class PlexClient 'subtitleSize': '100', 'audioBoost': '100', 'location': 'lan', - if (!isOriginal && preset.videoBitrateKbps != null) 'maxVideoBitrate': preset.videoBitrateKbps.toString(), 'addDebugOverlay': '0', 'autoAdjustQuality': '0', - 'directStreamAudio': '0', + 'directStreamAudio': '1', 'mediaBufferSize': '102400', 'session': transcodeSessionId, if (offset != null && offset > Duration.zero) 'offset': (offset.inMilliseconds / 1000).toStringAsFixed(6),