fix(playback): preserve video for Android EAC3 fallback - #790
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAdds an Android mobile Bluetooth E-AC-3 quirk. The correction applies when passthrough codecs are unavailable and audio has at least six channels. Tests verify AAC fallback behavior and excluded device outputs. ChangesAndroid Bluetooth E-AC-3 fallback
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This localized playback change preserves video while converting only E-AC-3 audio for the targeted Android Bluetooth fallback, with existing direct-play behavior retained. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Related loop-hardening work: #789 and Silo-Server/silo-android#250. Those prevent false route churn; this PR preserves copied video when Android reports a real multichannel E-AC-3 Bluetooth decoder failure. |
What I changed
I added an Android-mobile fallback for multichannel E-AC-3 on Bluetooth outputs that advertise no E-AC-3 passthrough. Direct play remains the first choice. If Android rejects that route, the next HLS plan copies the original video bitstream and converts only E-AC-3 audio to AAC. Full video transcoding remains available only if the direct-stream route also fails.
Why
I reproduced this with the exact same media file on Android and iPhone. The iPhone direct-played H.264 High Level 4.0 with E-AC-3/Atmos and reached first frame. The Android phone advertised ample H.264 hardware support, but returned
ERROR_CODE_DECODING_FAILEDfor both original HTTP and a codec-copy HLS remux. The old final fallback then re-encoded H.264 to H.264 as well as converting the audio.That video encode did not address the observed failure and added unnecessary quality loss and compute. The deployed correction now reaches first frame as
server_remux_hlswith one transformation,audio_to_aac; the H.264 video is copied byte-for-byte. In media-server terms this is Direct Stream/Remux, not video transcoding.The rule is capability-scoped rather than model-scoped: Android platform, mobile form factor, Bluetooth sink, empty passthrough set, E-AC-3, and at least six channels. It therefore covers Android mobile models reporting the same route facts. The live validation device was one Pixel 7; the test fixture uses a non-Pixel Android model to verify that planning does not depend on manufacturer or model.
Validation
Passed against current upstream
main:The production fork passed its complete Go, Web, and docs GitHub Actions gates. After deployment, the live plan selected
server_remux_hls, copied H.264, converted only audio to AAC, reached first frame, and stopped cycling.Scope and risk
A working direct route is never displaced. Android TV, speaker output, stereo E-AC-3, Apple clients, passthrough-capable routes, and other codecs keep existing planning. No API, schema, migration, configuration, or Jellyfin compatibility changes are included.
Source implementation and production validation: blurbery/silo-server#51.
Related issue: N/A — narrow fix reproduced on a live deployment.
AI Disclosure
Summary by CodeRabbit