Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.17.1 player crashes on DTS 7.1 direct playback #3868

Closed
borkedporcupine opened this issue Aug 9, 2024 · 14 comments
Closed

0.17.1 player crashes on DTS 7.1 direct playback #3868

borkedporcupine opened this issue Aug 9, 2024 · 14 comments
Labels
bug Something isn't working

Comments

@borkedporcupine
Copy link

Describe the bug

  1. Select media with DTS 7.1 audio
  2. Hit play
  3. Observe a few retries then player failure warning.
  4. Crashes back to library

Changing audio from direct to downmix to stereo allows successful playback. Media with other audio formats work without error.

Prior to the latest release I could also select LibVLC for playback when Exoplayer failed to play media. However that option seems to have been stripped out in the latest build.

Logs

No response

Application version

0.17.1

Where did you install the app from?

Google Play

Device information

Chromcast 4k

Android version

12

Jellyfin server version

10.9.9

@borkedporcupine borkedporcupine added the bug Something isn't working label Aug 9, 2024
@nielsvanvelzen
Copy link
Member

Please share the app crash logs.

@borkedporcupine
Copy link
Author

Please share the app crash logs.

Not really sure how to get them since it's on the chromecast. The server side logs don't show the crash they just show the disconnect from the media when it crashes.

@nielsvanvelzen
Copy link
Member

When the app crashes it always reports those logs to the server, available in the dashboard. Without logs I can't do much.

@borkedporcupine
Copy link
Author

When the app crashes it always reports those logs to the server, available in the dashboard. Without logs I can't do much.

Hmm, to be clear the entire app isn't crashing just the player. "encountered too many errors" is the toast. Does the player crash report to the server? Can you point me to where that is? I'd be glad to provide it if it's something I have.

@borkedporcupine
Copy link
Author

My logs look like below, to me seems like all the server knows is playback stopped.

[2024-08-09 18:14:58.164 +00:00] [INF] User policy for "redacted". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-09 18:14:59.103 +00:00] [INF] Playback stopped reported by app "Android TV" "0.17.1" playing "Encounter at Farpoint (1) / Encounter at Farpoint (2)". Stopped at "0" ms [2024-08-09 18:14:59.110 +00:00] [INF] User policy for "redacted". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-09 18:14:59.739 +00:00] [INF] User policy for "redacted". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-09 18:14:59.753 +00:00] [INF] Playback stopped reported by app "Android TV" "0.17.1" playing "Encounter at Farpoint (1) / Encounter at Farpoint (2)". Stopped at "0" ms [2024-08-09 18:15:00.357 +00:00] [INF] Playback stopped reported by app "Android TV" "0.17.1" playing "Encounter at Farpoint (1) / Encounter at Farpoint (2)". Stopped at "0" ms

@borkedporcupine
Copy link
Author

borkedporcupine commented Aug 9, 2024

I also just noticed that DTS bitstream option is now missing. I still see a DD bitstream option though. Could this be the root of the issue?

@nielsvanvelzen
Copy link
Member

Hmm, to be clear the entire app isn't crashing just the player. "encountered too many errors" is the toast. Does the player crash report to the server? Can you point me to where that is? I'd be glad to provide it if it's something I have.

Then it is not a crash, just a playback failure. In which case you used the wrong template and didn't provide any media info.

I also just noticed that DTS bitstream option is now missing. I still see a DD bitstream option though. Could this be the root of the issue?

This option did nothing and was therefor removed. The app claims DTS support when the audio behavior is set to direct stream.

@borkedporcupine
Copy link
Author

borkedporcupine commented Aug 9, 2024

Then it is not a crash, just a playback failure. In which case you used the wrong template and didn't provide any media info.

Sorry... wasn't intentional. How would you like me to proceed? Should I provide more info in this thread or would you like to delete/close this and I'll try again with the proper template?

@rickysixx
Copy link
Contributor

rickysixx commented Aug 12, 2024

I am facing the same issue on 0.17.3 and server version 10.9.8. Here are my logs.

Exception which causes playback error in ExoPlayer:

[OMX.MS.HEVC.Decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
createTrack returned error -38
createTrack_l(1148657408): AudioFlinger could not create track, status: -38 output 0
Error -38 initializing AudioTrack
Error code -20 when initializing AudioTrack.
Audio sink error
androidx.media3.exoplayer.audio.AudioSink$InitializationException: AudioTrack init failed 0 Config(48000, 6396, 48000) Format(2, Surround 7.1, null, audio/vnd.dts, null, -1, en, [-1, -1, -1.0, null], [8, 48000])
    at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.buildAudioTrack(DefaultAudioSink.java:2229)
    at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioTrack(DefaultAudioSink.java:1070)
    at androidx.media3.exoplayer.audio.DefaultAudioSink.buildAudioTrackWithRetry(DefaultAudioSink.java:1049)
    at androidx.media3.exoplayer.audio.DefaultAudioSink.initializeAudioTrack(DefaultAudioSink.java:828)
    at androidx.media3.exoplayer.audio.DefaultAudioSink.handleBuffer(DefaultAudioSink.java:927)
    at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.processOutputBuffer(MediaCodecAudioRenderer.java:773)
    at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.bypassRender(MediaCodecRenderer.java:2358)
    at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:868)
    at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
    at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:223)
    at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.UnsupportedOperationException: Cannot create AudioTrack
    at android.media.AudioTrack$Builder.build(AudioTrack.java:1277)
    at androidx.media3.exoplayer.drm.FrameworkMediaDrm$$ExternalSyntheticApiModelOutline0.m(D8$$SyntheticClass:0)
    at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrackV29(DefaultAudioSink.java:2276)
    at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.createAudioTrack(DefaultAudioSink.java:2255)
    at androidx.media3.exoplayer.audio.DefaultAudioSink$Configuration.buildAudioTrack(DefaultAudioSink.java:2221)

Media info:

General
Format                                   : Matroska
Format version                           : Version 4
File size                                : 69.6 GiB
Duration                                 : 2 h 49 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 58.7 Mb/s
Frame rate                               : 23.976 FPS
Encoded date                             : 2024-07-10 15:43:07 UTC
Writing application                      : Lavf59.27.100
Writing library                          : Lavf59.27.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
ID in the original source medium         : 4113 (0x1011)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main [email protected]@High
HDR format                               : SMPTE ST 2086, HDR10 compatible
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 49 min
Bit rate                                 : 52.3 Mb/s
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.263
Stream size                              : 62.1 GiB (89%)
Writing library                          : ATEME Titan File 3.8.16 (4.8.16.0)
Language                                 : English
Default                                  : No
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0050 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 155 cd/m2
Original source medium                   : Blu-ray

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS XLL X
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD MA + DTS:X
Codec ID                                 : A_DTS
Duration                                 : 2 h 49 min
Bit rate mode                            : Variable
Bit rate                                 : 5 793 kb/s
Channel(s)                               : 8 channels
Channel layout                           : C L R LFE Lb Rb Lss Rss Objects
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 6.87 GiB (10%)
Title                                    : Surround 7.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray

Audio #2
ID                                       : 3
ID in the original source medium         : 4355 (0x1103)
Format                                   : DTS
Format/Info                              : Digital Theater Systems
Codec ID                                 : A_DTS
Duration                                 : 2 h 49 min
Bit rate mode                            : Constant
Bit rate                                 : 447 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 543 MiB (1%)
Title                                    : Stereo
Language                                 : Italian
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

This movie contains also a stereo track in Italian, but I'm not able to select it because the player refreshes completely after an error.

No playback error occurs when preferring extension renderers (see 186ab31; don't know if this fixes OP problem too). This also avoids audio transcoding on the server.

This error line in the above log

[OMX.MS.HEVC.Decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010

seems to be irrelevant, becuae it's there also when the movie plays correctly.

@anthonymag
Copy link
Contributor

anthonymag commented Aug 13, 2024

Similar issue with playback on the Android TV app since updating. Other clients work fine. This is happening on two different "Chromecast with Google TV" devices.
I'm getting the "Player error encountered" failure when I try playing an episode.
adb logcat:

... [Moved to linked issue]

Jellyfin server 10.9.9
Jellyfin for Android TV 0.17.3

other content plays fine though I know that these particular episodes have a subtitle codec that my device doesn't support (special fonts? I guess? It's ASS subtitles) so they are always burned in, when it works.

It also seems that if I start the episode on another device, then resume from the ATV, it works.

EDIT it's not exactly the same but I think there's an overarching issue in 0.17 where media that was previously transcoded is now unsuccessfully trying to DirectPlay. Opened #3898 (thanks rickysixx)

@rickysixx
Copy link
Contributor

rickysixx commented Aug 14, 2024

I think your issue is off topic here @anthonymag. I do not see any error in your logs and I highly doubt that anime use DTS as audio codec.

I guess it's better if you create a new issue (maybe there might be some already regarding ASS subtitles though).

@rickysixx
Copy link
Contributor

rickysixx commented Aug 17, 2024

Prior to the latest release I could also select LibVLC for playback when Exoplayer failed to play media. However that option seems to have been stripped out in the latest build.

Are you able to direct play DTS audio on 0.16.11 using ExoPlayer (not LibVLC)?
(you can check for direct play by going in your server's dashboard when you are playing the media on your TV)

@borkedporcupine
Copy link
Author

Prior to the latest release I could also select LibVLC for playback when Exoplayer failed to play media. However that option seems to have been stripped out in the latest build.

Are you able to direct play DTS audio on 0.16.11 using ExoPlayer (not LibVLC)? (you can check for direct play by going in your server's dashboard when you are playing the media on your TV)

Both ExoPlayer and LibVLC worked without crashing in 0.16, earlier builds in ExoPlayer crashed with DTS very similarly to this, but I don't recall what build as it wasn't big deal with LibVLC as a fallback.

@nielsvanvelzen
Copy link
Member

Closing as duplicate of #3896, as they appear to be the same issue.

@nielsvanvelzen nielsvanvelzen closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants