fix(android): stop tunneling 24p video on the Fire TV Stick 4K

Tunneled playback on an AFTMM judders continuously through 23.976p direct play.
The #1802 reporter isolated it: turning off Tunneled Playback with every other
setting unchanged makes it smooth, and their log shows tunneling active for the
whole session with E-AC3 bitstreamed and the decoded-PCM guard never firing.

Audio Passthrough looked like the trigger only because it is the one user-facing
switch that decides it. Passthrough off, or Downmix to Stereo on, both force the
Dolby track to decode to PCM, which trips the #1458 guard and takes tunneling
down with it. Passthrough on with downmix off is the only combination that keeps
a bitstreamed track, so it is the only one that stays tunneled.

Withdraw tunneling on that model for content at or below 30fps. The cut-off
keeps 4K50/60 tunneled, which is the workload Amazon documents the feature for.
The mechanism stays unconfirmed: tunneling fires no VideoFrameMetadataListener
and stops media3 counting frames in the codec, so nothing app-side can measure
the cadence. Only the trigger is established, and the quirk is scoped to it.

That needs a frame rate the app did not have. Neither MatroskaExtractor nor
Mp4Extractor populates Format.frameRate, and a tunneled session renders no
frames back for the native detector, so the server's rate now rides on the open
call. It is sent only for direct play, matching _primeDisplayCriteria: a
transcode's metadata describes the source, not what the server is about to send.

Also move Audio Passthrough out of the in-player settings sheet. It configures
the audio output route rather than the current playback, and applying it
mid-stream bounces the audio renderer and re-decides tunneling. Settings > Video
Playback already owns it, next to Tunneled Playback, which is applied the same
way. That description now mentions stutter, not only black HDR video, so the
workaround is findable on hardware this quirk does not cover.

The mpv backend failing to start the same 4K file is a separate defect and is
not addressed here; its uploaded log is no longer retrievable.
This commit is contained in:
edde746
2026-08-06 03:45:09 +02:00
parent 1b6a811c07
commit f93952ba6f
56 changed files with 263 additions and 88 deletions
+4 -8
View File
@@ -924,8 +924,8 @@ class Translations$settings$en {
/// en: 'Tunneled Playback'
String get tunneledPlayback => 'Tunneled Playback';
/// en: 'Use video tunneling. Disable if HDR playback shows black video.'
String get tunneledPlaybackDescription => 'Use video tunneling. Disable if HDR playback shows black video.';
/// en: 'Use video tunneling. Disable if HDR playback shows black video or motion stutters.'
String get tunneledPlaybackDescription => 'Use video tunneling. Disable if HDR playback shows black video or motion stutters.';
/// en: 'Audio Passthrough'
String get audioPassthrough => 'Audio Passthrough';
@@ -4133,9 +4133,6 @@ class Translations$videoSettings$en {
/// en: 'Performance Overlay'
String get performanceOverlay => 'Performance Overlay';
/// en: 'Audio Passthrough'
String get audioPassthrough => 'Audio Passthrough';
/// en: 'Dolby Atmos'
String get audioOutputDolbyAtmos => 'Dolby Atmos';
@@ -6373,7 +6370,7 @@ extension on Translations {
'settings.matchDynamicRangeDescription' => 'Switch HDR on for HDR content, then back to SDR',
'settings.displaySwitchDelay' => 'Display Switch Delay',
'settings.tunneledPlayback' => 'Tunneled Playback',
'settings.tunneledPlaybackDescription' => 'Use video tunneling. Disable if HDR playback shows black video.',
'settings.tunneledPlaybackDescription' => 'Use video tunneling. Disable if HDR playback shows black video or motion stutters.',
'settings.audioPassthrough' => 'Audio Passthrough',
'settings.audioPassthroughDescription' => 'Send Dolby/DTS audio to your receiver or TV without re-encoding, preserving surround sound. Turn off if you have no sound.',
'settings.audioPassthroughDescriptionAppleTv' => 'Use Apple\'s native Dolby decoder for Dolby Digital Plus, including Atmos. DTS and TrueHD still play as multichannel PCM. Turn off if you have no sound.',
@@ -7605,7 +7602,6 @@ extension on Translations {
'videoSettings.hdr' => 'HDR',
'videoSettings.audioOutput' => 'Audio Output',
'videoSettings.performanceOverlay' => 'Performance Overlay',
'videoSettings.audioPassthrough' => 'Audio Passthrough',
'videoSettings.audioOutputDolbyAtmos' => 'Dolby Atmos',
'videoSettings.audioOutputDolbyAudio' => 'Dolby Audio',
'videoSettings.audioOutputSurround' => 'Surround',
@@ -7643,9 +7639,9 @@ extension on Translations {
'performanceOverlay.maxCll' => 'MaxCLL',
'performanceOverlay.maxFall' => 'MaxFALL',
'performanceOverlay.cacheUsed' => 'Cache Used',
'performanceOverlay.cacheLimit' => 'Cache Limit',
_ => null,
} ?? switch (path) {
'performanceOverlay.cacheLimit' => 'Cache Limit',
'performanceOverlay.speed' => 'Speed',
'performanceOverlay.player' => 'Player',
'performanceOverlay.memory' => 'Memory',