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

Player stuck in buffering state #3830

Open
rickysixx opened this issue Aug 5, 2024 · 15 comments
Open

Player stuck in buffering state #3830

rickysixx opened this issue Aug 5, 2024 · 15 comments
Labels
bug Something isn't working playback Issue related to media playback

Comments

@rickysixx
Copy link
Contributor

rickysixx commented Aug 5, 2024

Describe the bug

Player hangs in buffering state when I play a specific movie (media info below).

Playback works if I set the maximum streaming bitrate to 40 Mbit/s. I guess the reason is that using this limit the server will transcode the audio from DTS to AAC instead of direct playing the movie.

DTS -> AAC transcoding is correct in my case (my TV does not support DTS at the bitrate used by the movie), but this should happen regardless of the maximum streaming bitrate setting.

Logs

No error/warning in logcat

FFmpeg logs

There are no FFmpeg logs when I set the maximum bitrate limit to 200 Mbit/s because of direct play.

Media info of the file

General
Unique ID                                : 199122159409646423033536188264336157706 (0x95CD886EBE48F3A5602A6922D0C16C0A)
Complete name                            : movie.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 25.1 GiB
Duration                                 : 1 h 35 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 37.7 Mb/s
Frame rate                               : 23.976 FPS
Movie name                               : movie
Encoded date                             : 2024-07-26 12:20:10 UTC
Writing application                      : Lavf61.1.100
Writing library                          : Lavf61.1.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
ID in the original source medium         : 4113 (0x1011)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : [email protected]
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 1 h 35 min
Bit rate mode                            : Variable
Bit rate                                 : 30.7 Mb/s
Maximum bit rate                         : 32.0 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 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
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.617
Stream size                              : 20.4 GiB (81%)
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : DTS XLL
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD Master Audio
Codec ID                                 : A_DTS
Duration                                 : 1 h 35 min
Bit rate mode                            : Variable
Bit rate                                 : 4 560 kb/s
Channel(s)                               : 8 channels
Channel layout                           : C L R LFE Lb Rb Lss Rss
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 3.04 GiB (12%)
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 XXCH
Format/Info                              : Digital Theater Systems
Commercial name                          : DTS-HD High Resolution Audio
Codec ID                                 : A_DTS
Duration                                 : 1 h 35 min
Bit rate mode                            : Constant
Bit rate                                 : 2 046 kb/s
Channel(s)                               : 8 channels
Channel layout                           : C L R LFE Lb Rb Lss Rss
Sampling rate                            : 48.0 kHz
Frame rate                               : 93.750 FPS (512 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossy
Stream size                              : 1.36 GiB (5%)
Title                                    : Surround 7.1
Language                                 : Italian
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Audio #3
ID                                       : 4
ID in the original source medium         : 4358 (0x1106)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 35 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Stream size                              : 131 MiB (1%)
Title                                    : Stereo
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Application version

0.17.0

Device information

Panasonic MZ800

Android version

Android 11

Jellyfin server version

10.9.8

@rickysixx rickysixx added bug Something isn't working playback Issue related to media playback labels Aug 5, 2024
@errror
Copy link

errror commented Aug 7, 2024

I have a similar situation:

It is not limited to only one specific media file but to all files of the same category: TV recordings from VDR, converted with ffmpeg to Matroska container with x265 encoded video and pass-through audio (AC3, MP2). If I select a bandwidth, that requires transcoding on the server (in my case 3MBit), the media is played, otherwise the player gets stuck before displaying any media picture (black screen with player controls).

I suspect, that is is not an audio issue. My FireTV does bitstream pass-through to my Denon AV-Receiver and even with 3MBit, the receiver gets and decodes the AC3 audio stream from the media file.

Before the (automatic) Update to 0.17.0, all these media files worked fine.

Let me know, if I can provide any further input, e.g. debug logs or media samples (s.b.). In case of debug logs, I can easily provide the server logs but I have no idea how to get on debug output from the FireTV app!

Media info of the file

General
Unique ID                                : 63740289444964021534205602978560740127 (0x2FF3EEE6E3C09FABFC04CA8B27980B1F)
Complete name                            : /movie.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 2.01 GiB
Duration                                 : 1 h 29 min
Overall bit rate                         : 3 234 kb/s
Frame rate                               : 50.000 FPS
Writing application                      : Lavf60.3.100
Writing library                          : Lavf60.3.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main@L4@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 29 min
Bit rate                                 : 2 081 kb/s
Width                                    : 1 280 pixels
Height                                   : 536 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 50.000 FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 0)
Bit depth                                : 8 bits
Bits/(Pixel*Frame)                       : 0.061
Stream size                              : 1.30 GiB (64%)
Writing library                          : x265 3.5:[Linux][GCC 10.2.1][64 bit] 8bit+10bit+12bit
Encoding settings                        : cpuid=1111039 / frame-threads=2 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1280x536 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=0 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=20.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=1 / chromaloc-top=0 / chromaloc-bottom=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
Language                                 : German
Default                                  : No
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 1 h 29 min
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Delay relative to video                  : 8 ms
Stream size                              : 286 MiB (14%)
Language                                 : German
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : A_MPEG/L2
Codec ID/Hint                            : MP2
Duration                                 : 1 h 29 min
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : 90 ms
Stream size                              : 163 MiB (8%)
Language                                 : German
Default                                  : No
Forced                                   : No

Audio #3
ID                                       : 4
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : A_MPEG/L2
Codec ID/Hint                            : MP2
Duration                                 : 1 h 29 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : 82 ms
Stream size                              : 122 MiB (6%)
Language                                 : German
Default                                  : No
Forced                                   : No

Audio #4
ID                                       : 5
Format                                   : MPEG Audio
Format version                           : Version 1
Format profile                           : Layer 2
Codec ID                                 : A_MPEG/L2
Codec ID/Hint                            : MP2
Duration                                 : 1 h 29 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Compression mode                         : Lossy
Delay relative to video                  : 50 ms
Stream size                              : 122 MiB (6%)
Language                                 : German
Default                                  : No
Forced                                   : No

Text
ID                                       : 6
Format                                   : VobSub
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Writing library                          : Lavc60.3.100 dvdsub
Language                                 : German
Default                                  : No
Forced                                   : No

This is a recording from German public TV, if necessary I can provide a short snipped for testing. Just tell me, where to upload it.

Application version

0.17.1

Device information

Amazon AFTKA

Android version

FireOS 7.6.7.3 (PS7673/4183)
latest version for FireFV Stick 4K Max

Jellyfin server version

10.9.9+deb12

@zkhcohen
Copy link
Contributor

zkhcohen commented Aug 7, 2024

May be related: #3859

@rickysixx
Copy link
Contributor Author

rickysixx commented Aug 8, 2024

Yes, they are very similar.

I think this is an ExoPlayer problem, because I have the same issue with the same movie in the Android mobile app too when I use that player. External players (e.g. mpv) work fine instead.

I will do some other tests later this morning to try to grab some logs and I will try also to downgrade the app to 0.16.11.

@rickysixx
Copy link
Contributor Author

Here are the results of my tests.

First of all, downgrading to 0.16.11 does NOT solve my problem. Setting "audio output" to "downmix to stereo" instead does fix it, even on 0.17.1.

Unfortunately I was not able to get meaningful logs from Jellyfin. The app does log nothing when the video is stuck, except for "Playback of Movie started" at the beginning.

Using the debugger I have found the problem is ExoPlayer being unable to select a track. If I put a breakpoint in this line of the VideoManager class:

Tracks exoTracks = mExoPlayer.getCurrentTracks();

and I open the menu to select a different audio track (which triggers the VideoManager#getExoPlayerTrack() method), I can see mExoPlayer.getCurrentTracks() returns an empty track list for this movie.

This happens only on this specific movie and only when there is no audio transcoding. If I play a different movie/TV show or if I limit the bitrate to 40 Mbit/s, mExoPlayer.getCurrentTracks() returns a non-empty list.

I have also tried to enable ExoPlayer debug logs as explained here, but still there are no meaningful logs I think.

These are ExoPlayer logs when the movie is stuck in buffering state:

07-06 08:12:35.133  6806  6806 I ExoPlayerImpl: Init 2689808 [AndroidXMedia3/1.4.0] [kowloon, Panasonic Google TV, My, 30]
07-06 08:12:35.328  6806  6806 D EventLogger: loading [eventTime=0.02, mediaPos=0.00, window=0, period=0, true]
07-06 08:12:35.331  6806  6806 D EventLogger: timeline [eventTime=0.02, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
07-06 08:12:35.331  6806  6806 D EventLogger:   period [?]
07-06 08:12:35.331  6806  6806 D EventLogger:   window [?, seekable=false, dynamic=false]
07-06 08:12:35.331  6806  6806 D EventLogger: ]
07-06 08:12:36.063  6806  6806 D EventLogger: playWhenReady [eventTime=0.75, mediaPos=0.00, window=0, period=0, true, USER_REQUEST]
07-06 08:12:51.156  6806  6806 D EventLogger: state [eventTime=15.85, mediaPos=0.00, window=0, period=0, IDLE]
07-06 08:12:51.159  6806  6806 D EventLogger: surfaceSize [eventTime=15.85, mediaPos=0.00, window=0, period=0, 0, 0]
07-06 08:12:51.160  6806  6806 I ExoPlayerImpl: Release 2689808 [AndroidXMedia3/1.4.0] [kowloon, Panasonic Google TV, My, 30] [media3.common, media3.exoplayer, media3.decoder, media3.session, media3.ui, media3.datasource, media3.extractor, media3.exoplayer.hls, media3.decoder.ffmpeg]

and these are the logs when movie is playing correctly (i.e. when the server is transcoding the audio):

07-06 08:11:08.811  6806  6806 I ExoPlayerImpl: Init 86ff000 [AndroidXMedia3/1.4.0] [kowloon, Panasonic Google TV, My, 30]
07-06 08:11:09.046  6806  6806 D EventLogger: loading [eventTime=0.01, mediaPos=0.00, window=0, period=0, true]
07-06 08:11:09.751  6806  6806 D EventLogger: timeline [eventTime=0.72, mediaPos=0.00, window=0, period=0, periodCount=1, windowCount=1, reason=SOURCE_UPDATE
07-06 08:11:09.751  6806  6806 D EventLogger:   period [5729.66]
07-06 08:11:09.751  6806  6806 D EventLogger:   window [5729.66, seekable=true, dynamic=false]
07-06 08:11:09.751  6806  6806 D EventLogger: ]
07-06 08:11:09.764  6806  6806 D EventLogger: videoEnabled [eventTime=0.73, mediaPos=0.00, window=0, period=0]
07-06 08:11:09.765  6806  6806 D EventLogger: audioEnabled [eventTime=0.73, mediaPos=0.00, window=0, period=0]
07-06 08:11:09.768  6806  6806 D EventLogger: tracks [eventTime=0.74, mediaPos=0.00, window=0, period=0
07-06 08:11:09.768  6806  6806 D EventLogger:   group [
07-06 08:11:09.769  6806  6806 D EventLogger:     [X] Track:0, id=0, mimeType=video/avc, container=application/x-mpegURL, bitrate=36079950, codecs=avc1.640029, res=1920x1080, fps=23.976, supported=YES
07-06 08:11:09.769  6806  6806 D EventLogger:   ]
07-06 08:11:09.769  6806  6806 D EventLogger:   group [
07-06 08:11:09.769  6806  6806 D EventLogger:     [X] Track:0, id=0, mimeType=audio/mp4a-latm, container=application/x-mpegURL, codecs=mp4a.40.2, supported=YES
07-06 08:11:09.769  6806  6806 D EventLogger:   ]
07-06 08:11:09.769  6806  6806 D EventLogger:   group [
07-06 08:11:09.769  6806  6806 D EventLogger:     [X] Track:0, id=ID3, mimeType=application/id3, supported=YES
07-06 08:11:09.769  6806  6806 D EventLogger:   ]
07-06 08:11:09.769  6806  6806 D EventLogger:   Metadata [
07-06 08:11:09.769  6806  6806 D EventLogger:     HlsTrackMetadataEntry
07-06 08:11:09.769  6806  6806 D EventLogger:   ]
07-06 08:11:09.770  6806  6806 D EventLogger: ]
07-06 08:11:09.784  6806  6806 D EventLogger: playWhenReady [eventTime=0.75, mediaPos=0.00, window=0, period=0, true, USER_REQUEST]
07-06 08:11:13.176  6806  6806 D EventLogger: downstreamFormat [eventTime=4.14, mediaPos=0.00, window=0, period=0, id=0, mimeType=null, container=application/x-mpegURL, bitrate=36079950, codecs=avc1.640029,mp4a.40.2, res=1920x1080, fps=23.976]
07-06 08:11:13.333  6806  6806 D EventLogger: videoDecoderInitialized [eventTime=4.30, mediaPos=0.00, window=0, period=0, OMX.MS.AVC.Decoder]
07-06 08:11:13.334  6806  6806 D EventLogger: videoInputFormat [eventTime=4.30, mediaPos=0.00, window=0, period=0, id=0, mimeType=video/avc, bitrate=36079950, codecs=avc1.640029, res=1920x1080, color=NA/NA/NA/8/8, fps=23.976]
07-06 08:11:13.385  6806  6806 D EventLogger: audioDecoderInitialized [eventTime=4.35, mediaPos=0.00, window=0, period=0, c2.android.aac.decoder]
07-06 08:11:13.386  6806  6806 D EventLogger: audioInputFormat [eventTime=4.35, mediaPos=0.00, window=0, period=0, id=1/15, mimeType=audio/mp4a-latm, codecs=mp4a.40.2, channels=6, sample_rate=48000]
07-06 08:11:13.429  6806  6806 D EventLogger: audioTrackInit [eventTime=4.40, mediaPos=0.00, window=0, period=0, 2,252,48000,false,false,332352]
07-06 08:11:13.489  6806  6806 D EventLogger: videoSize [eventTime=4.46, mediaPos=0.00, window=0, period=0, 1920, 1080]
07-06 08:11:13.493  6806  6806 D EventLogger: renderedFirstFrame [eventTime=4.46, mediaPos=0.00, window=0, period=0, Surface(name=null)/@0x587a8f1]
07-06 08:11:13.558  6806  6806 D EventLogger: state [eventTime=4.53, mediaPos=0.00, window=0, period=0, READY]
07-06 08:11:13.559  6806  6806 D EventLogger: isPlaying [eventTime=4.53, mediaPos=0.00, window=0, period=0, true]
07-06 08:11:24.753  6806  6806 D EventLogger: state [eventTime=15.72, mediaPos=11.10, window=0, period=0, IDLE]
07-06 08:11:24.755  6806  6806 D EventLogger: isPlaying [eventTime=15.72, mediaPos=11.10, window=0, period=0, false]
07-06 08:11:24.926  6806  6806 D EventLogger: surfaceSize [eventTime=15.89, mediaPos=11.10, window=0, period=0, 0, 0]
07-06 08:11:24.930  6806  6806 I ExoPlayerImpl: Release 86ff000 [AndroidXMedia3/1.4.0] [kowloon, Panasonic Google TV, My, 30] [media3.common, media3.exoplayer, media3.decoder, media3.session, media3.ui, media3.datasource, media3.extractor, media3.exoplayer.hls, media3.decoder.ffmpeg]
07-06 08:11:25.006  6806  6806 D EventLogger: videoDisabled [eventTime=15.97, mediaPos=11.10, window=0, period=0]
07-06 08:11:25.006  6806  6806 D EventLogger: audioDisabled [eventTime=15.97, mediaPos=11.10, window=0, period=0]
07-06 08:11:25.007  6806  6806 D EventLogger: videoDecoderReleased [eventTime=15.97, mediaPos=11.10, window=0, period=0, OMX.MS.AVC.Decoder]
07-06 08:11:25.007  6806  6806 D EventLogger: audioDecoderReleased [eventTime=15.98, mediaPos=11.10, window=0, period=0, c2.android.aac.decoder]
07-06 08:11:25.008  6806  6806 D EventLogger: audioTrackReleased [eventTime=15.98, mediaPos=11.10, window=0, period=0, 2,252,48000,false,false,332352]

After these tests, I am even more inclined to say that this is an ExoPlayer problem.

However, I also think that Jellyfin should circumvent this problem by forcing transcoding immediately and not only when the bitrate limit is lowered. My TV for example does not support DTS XLL with 8 channels, therefore Jellyfin should transcode the audio regardless of the bitrate limit.

@zkhcohen
Copy link
Contributor

zkhcohen commented Aug 8, 2024

After a bunch of additional testing last night, including downgrading multiple components of my Jellyfin setup, I concur. I think this is appears to be an Exoplayer issue.

Over the years there have been numerous requests to support error-driven automatic transcoding, but for a variety of reasons, there has been a refusal to implement this. With the recent removal of LibVLC as a built-in alternative, and the untimely Exoplayer issues, hopefully this can be reconsidered.

Unfortunately, there seems to be an insistence that this library is the best option, when time and time again, Jellyfin for Android TV is the only application which suffers from these compatibility issues without any error handling, to the extent that most of us still run Plex or Emby in parallel.


Edit: I've further narrowed it down to the upgrade of Tdarr from 2.20.01 to 2.22.01 with one of these upgrades being the likely culprit:

  • Updated Docker x64 Jellyfin FFmpeg to v6.0.1-7
  • Updated mkvtoolnix to v85.0.0 (thanks to davidry)

Remuxing fixes the issue. I'm continuing to research what the root cause is, but it's likely an issue with metadata.

@rickysixx
Copy link
Contributor Author

Over the years there have been numerous requests to support error-driven automatic transcoding

I think in this case it's simpler than that.

There are no errors to catch (ExoPlayer is stuck but it does not throw any playback error). Jellyfin should simply check the supported audio codecs better than what it does right now.

Remuxing fixes the issue. I'm continuing to research what the root cause is, but it's likely an issue with metadata.

Thank you for your time in this. I agree with you, probably it's a metadata issue, because I have others movies which use DTS-HD MA codec (also with 8 channels) and they work fine. It still feels strange though, because all movies I have tested come from blu-rays and this is the only one that gives me troubles (and only with ExoPlayer, because it plays fine both on desktop and mobile when using mpv).

I will try to strip out the 3rd audio track (which is a commentary track for which I have set the MKV commentary flag) and see if this helps.

@zkhcohen
Copy link
Contributor

zkhcohen commented Aug 8, 2024

Thank you for your time in this. I agree with you, probably it's a metadata issue, because I have others movies which use DTS-HD MA codec (also with 8 channels) and they work fine. It still feels strange though, because all movies I have tested come from blu-rays and this is the only one that gives me troubles (and only with ExoPlayer, because it plays fine both on desktop and mobile when using mpv).

I'm not sure if you're able to confirm this as well, but I'm pretty sure the issue has something to do with missing TrackUID metadata on the audio track.

Media with a defined TrackUID on the audio stream play immediately 100% of the time.

Media without TrackUID will hang on the black screen, however if you press play and wait about ~5 minutes, sometimes it starts to play(!?) In other cases the seekbar starts to move but the audio and video are still missing.

If "Downmix to Stereo" is enabled, a higher percentage of the media plays without delay, but not all of it.

This is extremely unusual behavior.


Edit: In situations where the media does eventually start playing, it appears to get output in stereo, despite Jellyfin indicating that it's direct playing. Is there some sort of automatic fallback that Exoplayer does?

Another possibility is that it's not specifically the lack of a TrackUID that's causing the issue, but the other metadata that's associated with it that's missing.

@rickysixx
Copy link
Contributor Author

rickysixx commented Aug 10, 2024

Sorry for the late reply.

I'm not sure if you're able to confirm this as well, but I'm pretty sure the issue has something to do with missing TrackUID metadata on the audio track.

I can confirm that, for me, it's not a TrackUID issue. mkvinfo shows a unique track UID for each track I have in the file.

But I can also confirm this is a metadata issue, although I was not able to pinpoint which particular metadata is troublesome. I think mkvpropedit somehow screwed up MKV metadata (only for ExoPlayer) when I used it to add the commentary flag to the 3rd audio track. I had to remux the file to strip out that audio track, because using mkvpropedit --delete to remove that flag did not fix the issue.

Now that metadata is "clean" I can finally play the movie.

(or at least I thought so, because after upgrade to 0.17.1 all my blu-ray rips did not work anymore, but that's the subject for another issue)

@Sanidhya30
Copy link

May be related: #3859

I am experiencing a similar issue after upgrading to the 0.17.x client. When attempting to play a movie, only the audio plays while the screen remains black. This occurs when the streaming bitrate is set to "Auto". However, if I manually set the bitrate to 40 Mbit/s, which forces transcoding, both video and audio work correctly.

Reverting to the 0.16.11 client, I observed the following:

  • ExoPlayer with Auto bitrate: Transcoding occurs, and everything functions properly.
  • ExoPlayer with 120 Mbit/s bitrate: The black screen issue reappears.
  • LibVLC with Auto bitrate: No transcoding occurs, and there are no issues.

As LibVLC is removed from the 0.17.x client, I'm now limited to ExoPlayer, where the Auto bitrate functionality may not be working properly, as seen in the above scenarios.

@errror
Copy link

errror commented Aug 22, 2024

The issue is still present with the latest release 0.17.4 from today: All my media files encoded with ffmpeg6 fail to start without error. Attached a logcat extract for one try. The screen gets dark with the OSD in front showing that the player does not even make it to 00:01 seconds.

Please provide either a fix or reintegrate the libvlc player again, which had no issues with all these files. Thanks in advance!

noplayback.log

@Tumleren
Copy link

Tumleren commented Sep 28, 2024

I seem to be encountering the same or a similar issue on my Philips 809 TV running 0.17.5.
When playing a HEVC file with DVDSUB + 7.1 EAC audio and Direct audio output selected, the following happens:

  • DVDSUB is not supported on the TV, so must be burned in. Transcode takes place at >300 fps.
  • The player buffers and plays at less than 1 fps.
  • Even after the file is fully transcoded, it still plays at less than 1 fps.

The following causes the issue to stop:

  • Forcing Jellyfin to transcode the video by setting a bitrate limit lower than the file bitrate.
  • Disabling DVDSUB subtitles by changing to External subtitles or disabling subtitles completely.
  • Changing audio tracks to EAC 5.1 or EAC stereo.
  • Setting Audio Output to Downmix to stereo.

I'm not sure which logs to gather or how to gather them from the TV but I hope the above can be helpful somehow

Edit: This is the mediainfo for the file:

General
Unique ID                                : 17444198302507242837944667322271625860 (0xD1FA16105346D3BB5CE5B68771F7284)
Complete name                            : Movie.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 8.62 GiB
Duration                                 : 2 h 4 min
Overall bit rate                         : 9 906 kb/s
Movie name                               : Movie
Encoded date                             : UTC 2024-07-23 11:37:44
Writing application                      : mkvmerge v86.0 ('Winter') 64-bit
Writing library                          : libebml v1.4.5 + libmatroska v1.7.1
Cover                                    : Yes
Attachments                              : cover.jpg
Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 2 h 4 min
Bit rate                                 : 6 000 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 028 pixels
Display aspect ratio                     : 1.85:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.127
Stream size                              : 5.22 GiB (61%)
Writing library                          : x265 3.5+131-c5c0aa6fd:[DJATOM's Mod][Windows][GCC 13.1.0][64 bit] 10bit
Encoding settings                        : cpuid=1111039 / frame-threads=3 / numa-pools=8 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1028 / interlace=0 / total-frames=179064 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-eob / no-eos / no-hrd / info / hash=0 / temporal-layers=0 / open-gop / min-keyint=23 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=0 / b-pyramid / bframe-bias=0 / rc-lookahead=15 / lookahead-slices=6 / scenecut=40 / no-hist-scenecut / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=3 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=abr / bitrate=6000 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=2 / cplxblur=20.0 / qblur=0.5 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / aq-bias-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=0 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=1023 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.00 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass / no-mcstf / no-sbrc
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.709
Transfer characteristics                 : BT.709
Matrix coefficients                      : BT.709
Audio #1
ID                                       : 2
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 1 024 kb/s
Channel(s)                               : 8 channels
Channel layout                           : L R C LFE Ls Rs Lb Rb
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 911 MiB (10%)
Title                                    : 2020 7.1 Remix
Language                                 : Japanese
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No
Audio #2
ID                                       : 3
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 228 MiB (3%)
Title                                    : Original 2.0 Surround Mix
Language                                 : Japanese
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Audio #3
ID                                       : 4
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 684 MiB (8%)
Title                                    : 2009 5.1 Hypersonic Remix
Language                                 : Japanese
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Audio #4
ID                                       : 5
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 684 MiB (8%)
Title                                    : Classic (Surround 5.1)
Language                                 : Japanese
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Audio #5
ID                                       : 6
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 768 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 684 MiB (8%)
Title                                    : Pioneer 5.1 Dub
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Audio #6
ID                                       : 7
Format                                   : E-AC-3
Format/Info                              : Enhanced AC-3
Commercial name                          : Dolby Digital Plus
Codec ID                                 : A_EAC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 228 MiB (3%)
Title                                    : Electric Media 2.0 Dub
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Text #1
ID                                       : 8
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 7 423 b/s
Count of elements                        : 1264
Stream size                              : 6.41 MiB (0%)
Title                                    : USBD Modified Subs
Language                                 : English
Default                                  : Yes
Forced                                   : No
Text #2
ID                                       : 9
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 15.1 kb/s
Count of elements                        : 2772
Stream size                              : 13.1 MiB (0%)
Title                                    : Japanese (Retail)
Language                                 : Japanese
Default                                  : No
Forced                                   : No
Text #3
ID                                       : 10
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 59 min
Bit rate                                 : 6 596 b/s
Count of elements                        : 1284
Stream size                              : 5.62 MiB (0%)
Title                                    : English (2013 USBD)
Language                                 : English
Default                                  : No
Forced                                   : No
Text #4
ID                                       : 11
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 44 min
Bit rate                                 : 124 b/s
Count of elements                        : 24
Stream size                              : 95.4 KiB (0%)
Title                                    : English (Signs) (USBD 2013)
Language                                 : English
Default                                  : No
Forced                                   : No
Text #5
ID                                       : 12
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 59 min
Bit rate                                 : 8 694 b/s
Count of elements                        : 1252
Stream size                              : 7.40 MiB (0%)
Title                                    : English (China BD 2021)
Language                                 : English
Default                                  : No
Forced                                   : No
Text #6
ID                                       : 13
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 2 min
Bit rate                                 : 7 446 b/s
Count of elements                        : 1279
Stream size                              : 6.54 MiB (0%)
Title                                    : English (Japanese BD 2020)
Language                                 : English
Default                                  : No
Forced                                   : No
Text #7
ID                                       : 14
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 6 723 b/s
Count of elements                        : 1271
Stream size                              : 5.78 MiB (0%)
Title                                    : Cantonese
Language                                 : Chinese
Default                                  : No
Forced                                   : No
Text #8
ID                                       : 15
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 5 923 b/s
Count of elements                        : 1492
Stream size                              : 5.09 MiB (0%)
Title                                    : Simplified
Language                                 : Chinese
Default                                  : No
Forced                                   : No
Text #9
ID                                       : 16
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 59 min
Bit rate                                 : 7 637 b/s
Count of elements                        : 1240
Stream size                              : 6.56 MiB (0%)
Title                                    : Dutch
Language                                 : Dutch
Default                                  : No
Forced                                   : No
Text #10
ID                                       : 17
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 59 min
Bit rate                                 : 8 098 b/s
Count of elements                        : 1240
Stream size                              : 6.95 MiB (0%)
Title                                    : French
Language                                 : French
Default                                  : No
Forced                                   : No
Text #11
ID                                       : 18
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 5 741 b/s
Count of elements                        : 1073
Stream size                              : 4.94 MiB (0%)
Title                                    : German
Language                                 : German
Default                                  : No
Forced                                   : No
Text #12
ID                                       : 19
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 8 776 b/s
Count of elements                        : 1201
Stream size                              : 7.55 MiB (0%)
Title                                    : Italian
Language                                 : Italian
Default                                  : No
Forced                                   : No
Text #13
ID                                       : 20
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 3 min
Bit rate                                 : 5 182 b/s
Count of elements                        : 1189
Stream size                              : 4.60 MiB (0%)
Title                                    : Korean
Language                                 : Korean
Default                                  : No
Forced                                   : No
Text #14
ID                                       : 21
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 1 h 59 min
Bit rate                                 : 5 877 b/s
Count of elements                        : 1093
Stream size                              : 5.02 MiB (0%)
Title                                    : Portuguese
Language                                 : Portuguese
Default                                  : No
Forced                                   : No
Text #15
ID                                       : 22
Format                                   : VobSub
Muxing mode                              : zlib
Codec ID                                 : S_VOBSUB
Codec ID/Info                            : Picture based subtitle format used on DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 7 693 b/s
Count of elements                        : 1064
Stream size                              : 6.62 MiB (0%)
Title                                    : Spanish
Language                                 : Spanish
Default                                  : No
Forced                                   : No

@jellyfin-bot
Copy link
Contributor

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.

@RafNadler
Copy link

I have the exact same issue and I was wondering if this is an issue of bandwidth allocated to the app in AndroidTV. Is this something that could be happening? For me I can't play any media with a bitrate over 30Mbps. I have the same black screen with media player controls available but doing nothing. Everything works as it should on the Windows player.

@jellyfin-bot jellyfin-bot removed the stale label Feb 9, 2025
@Tumleren
Copy link

Tumleren commented Feb 9, 2025

I have the exact same issue and I was wondering if this is an issue of bandwidth allocated to the app in AndroidTV. Is this something that could be happening? For me I can't play any media with a bitrate over 30Mbps. I have the same black screen with media player controls available but doing nothing. Everything works as it should on the Windows player.

I believe the cause is most likely what's described in this pull request: #3936

Unless I'm misremembering - it's been quite a while

@RafNadler
Copy link

I have the exact same issue and I was wondering if this is an issue of bandwidth allocated to the app in AndroidTV. Is this something that could be happening? For me I can't play any media with a bitrate over 30Mbps. I have the same black screen with media player controls available but doing nothing. Everything works as it should on the Windows player.

I believe the cause is most likely what's described in this pull request: #3936

Unless I'm misremembering - it's been quite a while

Hi there, I read through this and I think I have a different issue since this is still happening in version 0.18.4 which should incorporate this update. I am not using ARC for sound, but Optical out to a miniDSP currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working playback Issue related to media playback
Projects
None yet
Development

No branches or pull requests

7 participants