[Resolved] Playback fails on EAC3 audio files when Bluetooth Headphones are connected

Server Version#: 4.69.1
Player Version#: 8.31.0.31.311

On Google Chromecast with Android TV, playback fails for videos with EAC3 audio when Bluetooth headphones are connected. (Sony WF-1000XM3) The same files play fine when Bluetooth is disconnected, and as far as I have been able to test other audio formats (AAC, TrueHD) all play fine when the headphones are connected.

Server Version#: 4.69.1
Player Version#: 8.31.2.31546

On Google Chromecast with Android TV, playback fails for videos with EAC3 audio when Bluetooth headphones are connected. (Sony WF-1000XM3) The same files play fine when Bluetooth is disconnected, and as far as I have been able to test other audio formats (AAC, TrueHD) all play fine when the headphones are connected.

Per advice on the forums, I’ve set Passthrough to Optical to improve playback options. For reference, here’s the results of tests with several formats I could quickly find in my library.

Passthrough: Disabled
AAC 7.1: Playback Fails
Stereo AAC: Video and Sound OK!
EAC3 5.1: Playback Fails
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Playback Fails
DTS-HD 5.1: Playback Fails

Passthrough: HDMI
AAC 7.1: Playback Fails
Stereo AAC: Video and Sound OK!
EAC3 5.1: Video Only
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Playback Fails
DTS-HD 5.1: Playback Fails

Passthrough: Optical
AAC 7.1: Video Only
Stereo AAC: Video and Sound OK!
EAC3 5.1: Video Only
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Video Only
DTS-HD 5.1: Video Only

Server Version#: 4.69.1
Player Version#: 9.0.1.31729

On Google Chromecast with Android TV, playback fails for videos with some audio formats when Bluetooth headphones are connected. (Sony WF-1000XM3) The same files play fine when Bluetooth is disconnected.

Per advice on the forums, I’ve set Passthrough to Optical to improve playback options. For reference, here’s the results of tests with several formats I could quickly find in my library.

Passthrough: Disabled
AAC 7.1: Playback Fails
Stereo AAC: Video and Sound OK!
EAC3 5.1: Playback Fails
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Playback Fails
DTS-HD 5.1: Playback Fails

Passthrough: HDMI
AAC 7.1: Playback Fails
Stereo AAC: Video and Sound OK!
EAC3 5.1: Video Only
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Playback Fails
DTS-HD 5.1: Playback Fails

Passthrough: Optical
AAC 7.1: Video Only
AAC 5.1: Video Only
AC3 5.1: Video Only
AC3 Stereo: Video Only
Stereo AAC: Video and Sound OK!
EAC3 5.1: Video Only
TRUEHD 7.1: Video and Sound OK!
DTS-HD 7.1: Video Only
DTS-HD 5.1: Video Only

I’ve done some digging, and this appears to be an upstream issue with ExoPlayer: AudioTrack init failed when Bluetooth is connected · Issue #9712 · google/ExoPlayer · GitHub

Server Version#: 4.76.1
Player Version#: 9.0.5.31871

Still broken.

Server Version#: 4.76.1
Player Version#: 9.06.31998

Still broken.

Here’s what I think is the relevant section of the log file

04-21 07:34:53.561  i: [FFmpeg] [INFO] [hls @ 0xb42f1400] Opening 'https://192-168-1-34.91039e1f9ebe40ed851bfb93ab971b53.plex.direct:32400/video/:/transcode/universal/session/27cf9f1a4f9197d3-com-plexapp-android/base/00159.ts' for reading

04-21 07:34:53.600  i: [MediaCodecVideoSyncRenderer] Decoder initialised, after 0 attempts.
04-21 07:34:53.600  i: [ExoPlayer][EventLogger] videoDecoderInitialized [eventTime=1.97, mediaPos=1599.51, window=0, period=0, OMX.amlogic.avc.decoder.awesome2]
04-21 07:34:53.601  i: [ExoPlayer][EventLogger] videoInputFormat [eventTime=1.98, mediaPos=1599.51, window=0, period=0, id=0, mimeType=video/avc, bitrate=8607000, codecs=h264, res=1920x1080, fps=23.976025]
04-21 07:34:53.608  i: [ExoPlayer][EventLogger] audioInputFormat [eventTime=1.98, mediaPos=1599.51, window=0, period=0, id=1, mimeType=audio/ac3, bitrate=8607000, codecs=ac3, channels=6, sample_rate=48000, language=english, selectionFlags=[default,forced]]
04-21 07:34:53.608  i: [TranscodeSession] Updating session status
04-21 07:34:53.610  i: Fetching [method:GET] https://192.168.1.34:32400/transcode/sessions/27cf9f1a4f9197d3-com-plexapp-android?X-Plex-Token=...qtD3&X-Plex-Language=en-us
04-21 07:34:53.625  i: [TranscodeSession] Resolution: -1x-1, Video: Remux, Audio: Transcode, Speed: 34.500000, Throttled: false
04-21 07:34:54.129  i: [ThemeMusic] Fade out complete. Stopping media player.
04-21 07:34:54.572  i: [FFmpeg] [INFO] [hls @ 0xb42f1400] Opening 'https://192-168-1-34.91039e1f9ebe40ed851bfb93ab971b53.plex.direct:32400/video/:/transcode/universal/session/27cf9f1a4f9197d3-com-plexapp-android/base/00160.ts' for reading

04-21 07:34:55.726  i: [FFmpeg] [INFO] [https @ 0xadc1f800] Opening 'https://192-168-1-34.91039e1f9ebe40ed851bfb93ab971b53.plex.direct:32400/video/:/transcode/universal/session/27cf9f1a4f9197d3-com-plexapp-android/base/00161.ts' for reading

04-21 07:34:55.955  i: [ExoPlayer][EventLogger] videoDisabled [eventTime=4.33, mediaPos=1599.51, window=0, period=0]
04-21 07:34:55.956  i: [ExoPlayer][EventLogger] audioDisabled [eventTime=4.34, mediaPos=1599.51, window=0, period=0]
04-21 07:34:56.007  i: [FF][MediaPeriod] Releasing.
04-21 07:34:56.007  i: [FF] Loading canceled (released: true)
04-21 07:34:56.008  i: [FFmpeg] [INFO] Demuxer has been successfully interupted.
04-21 07:34:56.010  i: [FF] Releasing demuxer.
04-21 07:34:56.011  i: [FFmpeg] [INFO] Demuxer closing.
04-21 07:34:56.017  e: [ExoPlayer][EventLogger] playerFailed [eventTime=4.39, mediaPos=1599.51, window=0, period=0, errorCode=ERROR_CODE_AUDIO_TRACK_INIT_FAILED
  com.google.android.exoplayer2.o: MediaCodecAudioRenderer error, index=3, format=Format(1, null, null, audio/ac3, ac3, 8607000, english, [-1, -1, -1.0], [6, 48000]), format_supported=YES
      at com.google.android.exoplayer2.r1.handleMessage(SourceFile:43)
      at android.os.Handler.dispatchMessage(Handler.java:103)
      at android.os.Looper.loop(Looper.java:214)
      at android.os.HandlerThread.run(HandlerThread.java:67)
  Caused by: com.google.android.exoplayer2.audio.t$b: AudioTrack init failed 0 Config(48000, 252, 39998)
      at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:7)
      at com.google.android.exoplayer2.audio.b0.F(SourceFile:1)
      at com.google.android.exoplayer2.audio.b0.G(SourceFile:1)
      at com.google.android.exoplayer2.audio.b0.V(SourceFile:2)
      at com.google.android.exoplayer2.audio.b0.f(SourceFile:16)
      at com.google.android.exoplayer2.audio.g0.Y(SourceFile:7)
      at r2.o.b(SourceFile:8)
      at r2.o.render(SourceFile:11)
      at com.google.android.exoplayer2.r1.q(SourceFile:14)
      at com.google.android.exoplayer2.r1.handleMessage(SourceFile:25)
      ... 3 more
      Suppressed: com.google.android.exoplayer2.audio.t$b: AudioTrack init failed 0 Config(48000, 252, 39998)
          ... 13 more
      Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
          at android.media.AudioTrack$Builder.build(AudioTrack.java:1018)
          at com.google.android.exoplayer2.audio.b0$f.g(SourceFile:11)
          at com.google.android.exoplayer2.audio.b0$f.e(SourceFile:2)
          at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:1)
          ... 12 more
  Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
      at android.media.AudioTrack$Builder.build(AudioTrack.java:1018)
      at com.google.android.exoplayer2.audio.b0$f.g(SourceFile:11)
      at com.google.android.exoplayer2.audio.b0$f.e(SourceFile:2)
      at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:1)
      ... 12 more
]
04-21 07:34:56.018  e: [Player][ExoPlayer] Playback error detected
04-21 07:34:56.021  i: [FFmpeg] [INFO] Demuxer has been interupted...
04-21 07:34:56.022  i: [FFmpeg] [INFO] Demuxer has been closed, interrupting FFmpeg...
04-21 07:34:56.022  e: An exception occurred: com.google.android.exoplayer2.o: MediaCodecAudioRenderer error, index=3, format=Format(1, null, null, audio/ac3, ac3, 8607000, english, [-1, -1, -1.0], [6, 48000]), format_supported=YES
04-21 07:34:56.023  i: [Player][Timeline] Handling player error
04-21 07:34:56.023  i: [Player][Timeline] Playback stopped (error: true)
04-21 07:34:56.024  e: Stacktrace: com.google.android.exoplayer2.o: MediaCodecAudioRenderer error, index=3, format=Format(1, null, null, audio/ac3, ac3, 8607000, english, [-1, -1, -1.0], [6, 48000]), format_supported=YES
	at com.google.android.exoplayer2.r1.handleMessage(SourceFile:43)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.audio.t$b: AudioTrack init failed 0 Config(48000, 252, 39998)
	at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:7)
	at com.google.android.exoplayer2.audio.b0.F(SourceFile:1)
	at com.google.android.exoplayer2.audio.b0.G(SourceFile:1)
	at com.google.android.exoplayer2.audio.b0.V(SourceFile:2)
	at com.google.android.exoplayer2.audio.b0.f(SourceFile:16)
	at com.google.android.exoplayer2.audio.g0.Y(SourceFile:7)
	at r2.o.b(SourceFile:8)
	at r2.o.render(SourceFile:11)
	at com.google.android.exoplayer2.r1.q(SourceFile:14)
	at com.google.android.exoplayer2.r1.handleMessage(SourceFile:25)
	... 3 more
	Suppressed: com.google.android.exoplayer2.audio.t$b: AudioTrack init failed 0 Config(48000, 252, 39998)
		... 13 more
	Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
		at android.media.AudioTrack$Builder.build(AudioTrack.java:1018)
		at com.google.android.exoplayer2.audio.b0$f.g(SourceFile:11)
		at com.google.android.exoplayer2.audio.b0$f.e(SourceFile:2)
		at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:1)
		... 12 more
Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
	at android.media.AudioTrack$Builder.build(AudioTrack.java:1018)
	at com.google.android.exoplayer2.audio.b0$f.g(SourceFile:11)
	at com.google.android.exoplayer2.audio.b0$f.e(SourceFile:2)
	at com.google.android.exoplayer2.audio.b0$f.b(SourceFile:1)
	... 12 more

04-21 07:34:56.025  i: [Player][Timeline] Player error not known by server, reporting original player error (or a playback interrupted one)
04-21 07:34:56.025  i: [Player] Error reported: UnknownError (null)
04-21 07:34:56.026  i: [Player][Timeline] Playback stopped (error: false)
04-21 07:34:56.031  i: [FFmpeg] [INFO] Demuxer has been interupted...
04-21 07:34:56.032  i: [FFmpeg] [INFO] Demuxer has been closed, interrupting FFmpeg...
04-21 07:34:56.043  i: [TranscodeSession] Stopping...
04-21 07:34:56.045  i: [FFmpeg] [INFO] Demuxer has been interupted...
04-21 07:34:56.045  i: [Player][Error] Displaying player error...
04-21 07:34:56.046  i: [DialogBehaviour] Showing dialog.
04-21 07:34:56.048  i: [FFmpeg] [INFO] Demuxer has been closed, interrupting FFmpeg...
04-21 07:34:56.048  i: [ExoPlayer][EventLogger] state [eventTime=4.43, mediaPos=1599.51, window=0, period=0, IDLE]
04-21 07:34:56.055  i: [BufferHelper] Assumed Bitrate: 400000, Segment Count: 46875
04-21 07:34:56.056  i: [BufferHelper] Detected memory pressure, reducing segment count to fit available memory: 384
04-21 07:34:56.057  i: [BufferHelper] Segment count: 2457
04-21 07:34:56.061  i: [TranscodeSession] Notifying server that we've stopped
04-21 07:34:56.062  i: Fetching [method:GET] https://192.168.1.34:32400/video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=157248&path=%2Flibrary%2Fmetadata%2F113560&session=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Identifier=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Platform=Android&X-Plex-Device=Chromecast&X-Plex-Platform=Android&X-Plex-Platform-Version=10&X-Plex-Product=Plex%20for%20Android%20(TV)&X-Plex-Version=9.0.6.31998&X-Plex-Token=...qtD3&X-Plex-Language=en-us
04-21 07:34:56.063  i: [FFmpeg] [INFO] [Cache] Close requested, terminating.
04-21 07:34:56.064  i: [FFmpeg] [INFO] [Cache] Cache has been closed, interrupting AVIO ...
04-21 07:34:56.075  i: [FFmpeg] [INFO] [Cache] Close requested, terminating.
04-21 07:34:56.076  i: [FFmpeg] [INFO] Demuxer pipeline terminated.
04-21 07:34:56.077  i: [FFmpeg] [INFO] Demuxer has been successfully closed.
04-21 07:34:58.641  i: [EngineEventManager] onPlaybackStopped: Closed
04-21 07:34:58.642  i: [Player][Timeline] Playback stopped (error: false)
04-21 07:34:58.642  i: [VideoAwakeBehaviour] Keep screen awake has been requested disabled for VideoAwakeBehaviour.
04-21 07:34:58.643  i: [PlaybackTimeBehaviour] Time: 0 IsStarted: false
04-21 07:34:58.643  i: [TranscodeSession] Stopping...
04-21 07:34:58.644  i: [PlayQueueProgressBehaviour] Updating PlayQueueManager state, isPlaying: false
04-21 07:34:58.645  i: [SleepTimerBehaviour] Sleep timer behaviour changed.
04-21 07:34:58.646  i: [WiFiLockBehaviour] Releasing WiFi lock since playback was stopped.
04-21 07:34:58.646  i: [DisplayBehaviour] Cancelling stop playback runnable to prevent unexpected stop.
04-21 07:34:58.650  i: [MediaSessionBehaviour] Updating state to STOPPED
04-21 07:34:58.654  i: [BufferHelper] Assumed Bitrate: 400000, Segment Count: 46875
04-21 07:34:58.655  i: [BufferHelper] Detected memory pressure, reducing segment count to fit available memory: 384
04-21 07:34:58.656  i: [BufferHelper] Segment count: 2457
04-21 07:34:58.657  i: [MemoryOptimisationBehaviour] Expanding memory cache.
04-21 07:34:58.658  i: [TranscodeSession] Notifying server that we've stopped
04-21 07:34:58.659  i: [VideoAwakeBehaviour] Keep screen awake has been requested disabled for VideoAwakeBehaviour.
04-21 07:34:58.661  i: [AudioFocusBehaviour] Behaviour being destroyed, giving up audio focus
04-21 07:34:58.662  i: Fetching [method:GET] https://192.168.1.34:32400/video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=157248&path=%2Flibrary%2Fmetadata%2F113560&session=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Identifier=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Platform=Android&X-Plex-Device=Chromecast&X-Plex-Platform=Android&X-Plex-Platform-Version=10&X-Plex-Product=Plex%20for%20Android%20(TV)&X-Plex-Version=9.0.6.31998&X-Plex-Token=...qtD3&X-Plex-Language=en-us
04-21 07:34:58.672  i: [HomeHubs] Item content source server://ea56c5c54c05c89d04eb4390de6df9f2b50915bb/com.plexapp.plugins.library has volatile hubs: marking as stale.
04-21 07:34:58.676  i: [DisplayBehaviour] Cancelling stop playback runnable to prevent unexpected stop.
04-21 07:34:58.677  i: [UpdateChannelsBehaviour] app in foreground, scheduling a pending update Item was updated or removed
04-21 07:34:58.678  i: [PreplayViewModel] Refreshing metadata for Season 1
04-21 07:34:58.681  i: [HomeHubsManager] Discovering. Force: false. Partial: false. Reason: volatile hub updated
04-21 07:34:58.687  e: Error fetching https://192.168.1.34:32400/video/:/transcode/universal/stop?autoAdjustQuality=1&hasMDE=1&location=lan&mediaBufferSize=157248&path=%2Flibrary%2Fmetadata%2F113560&session=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Identifier=27cf9f1a4f9197d3-com-plexapp-android&X-Plex-Client-Platform=Android&X-Plex-Device=Chromecast&X-Plex-Platform=Android&X-Plex-Platform-Version=10&X-Plex-Product=Plex%20for%20Android%20(TV)&X-Plex-Version=9.0.6.31998&X-Plex-Token=...tml>
04-21 07:34:58.688  i: [MergingHubManager] Notifying listeners with status: SUCCESS
04-21 07:34:58.700  i: [MediaSessionBehaviour] Releasing MediaSessionHelper
04-21 07:34:58.704  i: [MediaSessionHelper] Releasing media session with tag: video
04-21 07:34:58.706  i: [DisplayBehaviour] Reverting back to the original display mode.
04-21 07:34:58.710  i: [DisplayBehaviour] Mode is already set to our best mode of 1920x1080 @ 59.9401Hz (1).
04-21 07:34:58.712  i: [DynamicHome] Reusing results from previous discovery.
04-21 07:34:58.718  i: [DynamicHome] Starting new discovery task because there are stale content sources.
04-21 07:34:58.736  i: Fetching [method:GET] https://192.168.1.34:32400/hubs/continueWatching?contentDirectoryID=1%2C3%2C2&includeDetails=1&includeExternalMetadata=1&includeLibraryPlaylists=1&includeMeta=1&includeRecentChannels=1&includeStations=1&includeTypeFirst=1&libraryHubsOnly=1&X-Plex-Token=...qtD3&X-Plex-Language=en-us
04-21 07:34:58.745  i: [MediaSessionBehaviour] Releasing MediaSessionHelper
04-21 07:34:58.774  i: [ThemeMusic] Playing new theme music.
04-21 07:34:58.796  i: Resuming HomeActivity.

Server Version#: 4.76.1
Player Version#: 9.1.0.32117

Read that the beta version was fixing similar issues for others so I installed it to test. Still broken.

Server Version#: 4.76.1
Player Version#: 9.1.0.32183

Still broken.

Server Version#: 4.76.1
Player Version# 9.1.0.32210

Still broken.

Server Version#: 4.76.1
Player Version# 9.1.0.32281

Still broken.

Server Version#: 4.76.1
Player Version# 9.2.0.32419

Still broken.

Turns out this issue was unrelated, and already fixed in 2.7.1 (the version that’s included in Plex as of now)

Server Version#: 4.76.1
Player Version# 9.2.0.32520

Still broken.

Server Version#: 4.76.1
Player Version# 9.3.0.32695

Still broken.

Despite my inability to play locally stored media, the “improved ad experience” in 9.2 is a monumental improvement to my experience. /s

Server Version#: 4.76.1
Player Version# 9.3.0.32842

Still broken.

Server Version#: 4.76.1
Player Version# 9.3.0.32892

Still broken.

Server Version#: 4.76.1
Player Version# 9.3.0.32977

Still broken.

Server Version#: 4.76.1
Player Version# 9.4.033105

Still broken.

Server Version#: 4.76.1
Player Version# 9.5.0.33501

Issue appears to be fixed! I wonder if this may be thanks to the 2.18.0 release of exoplayer being incorporated, but since Plex maintains a policy of radio silence it’s hard to tell.

We haven’t updated ExoPlayer to v2.18 in v9.5, we did however make various changes to track selection to improve reliability - I expect this is why your issue has been resolved, apologises for the silence.