jellyfin / jellyfin-android

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
1.35k stars 225 forks source link

Issue[bug]-Cannot play Live TV via HDHomeRun with External-MPV Player #1200

Closed nwh3365 closed 2 weeks ago

nwh3365 commented 9 months ago

Describe the bug

Media Source: Over-the-Air (OTA) TV

What DOES NOT work: I cannot play Live TV streams from my HDHomeRun devices via Android Client for Jellyfin > External Player > MPV Player. Client Error: Media cannot be played by this device; returns to Live TV > Guide. Jellyfin Dashboard: Indicates the client is using DirectPlay, but it shows it continually looping between timecodes 0:00 and ~0:12. Jellyfin Log: Indicates PlayMethod=Transcode, TranscodeReason=DirectPlayError. Steps to reproduce: Install Android Client for Jellyfin from Google Play Install MPV Player from Google Play Launch Android Client for Jellyfin Settings > Client Settings > Video Player Type = External Player, and External Player App = MPV Player Live TV > Guide > Select a currently-airing program > Play Client Error: Media cannot be played by this device; returns to Live TV > Guide

What DOES work (for comparison): I can play Live TV streams from my HDHomeRun devices via Android Client for Jellyfin > Web Player (via transcoding to H264/AAC per player). Web Player describes the original Live TV stream (via Jellyfin) as: Container: mpegts Bitrate: 8.2 Mbps Video codec: MPEG2VIDEO Main Video bitrate: 8.0 Mbps Video range type: SDR Audio codec: AC3 Audio bitrate: 192 kbps Audio channels: 2 Audio sample rate: 48000 Hz

I can play Live TV streams from my HDHomeRun devices via Android Client for Jellyfin > Integrated Player (via transcoding to H264/AC3 per Jellyfin Dashboard > Active Devices) Integrated Player describes the original Live TV stream (via Jellyfin) as: Does not display original video format; only the transcode information.

I can play Live TV streams from my HDHomeRun devices via MPV Player (the app) using Open URL (e.g., http://hdhomerun:5004/auto/v2.1). MPV Player (the app) describes the Live TV stream (direct from HDHomeRun) as: File: v3.1 Format/Protocol: mpegts Video: mpeg2video (MPEG-2 video) Native Resolution: 1280 x 720 Pixel Format: yuv420p Primaries: bt.709 Colormatrix: bt.709 Levels: limited Gamma: bt.1886 Bitrate: 5410 kbps Audio: ac3 (ATSC A/52A (AC-3)) Channels: 2 Format: floatp Sample Rate: 48000 Hz Bitrate: 192 kbps

I can play recorded copies of HDHomeRun programs via Android Client for Jellyfin > Web Player (via transcoding to H264/AAC per player). NOTE: Information below is NOT from the same program as the Live TV stream above. Web Player describes the video (from Jellyfin) as: Container: mpegts Bitrate: 9.0 Mbps Video codec: MPEG2VIDEO Main Video bitrate: 8.5 Mbps Video range type: SDR Audio codec: AC3 Audio bitrate: 384 kbps Audio channels: 6 Audio sample rate: 48000 Hz

I can play recorded copies of HDHomeRun programs via Android Client for Jellyfin > Integrated Player (via transcoding to H264/AC3 per Jellyfin Dashboard > Active Devices) NOTE: Information below is NOT from the same program as the Live TV stream above. Integrated Player describes the video (from Jellyfin) as: Does not display original video format; only the transcode information.

I can play recorded copies of HDHomeRun programs via Android Client for Jellyfin > External Player > MPV Player (via DirectPlay per Jellyfin Dashboard > Active Devices) NOTE: Information below is NOT from the same program as the Live TV stream above. MPV Player describes the video (from Jellyfin) as: File: stream?static=true&playSessionId=(redacted)&mediaSourceId=(redacted)&streamOptions={} Format/Protocol: mpegts Video: mpeg2video (MPEG-2 video) Native Resolution: 1920 x 1080 Pixel Format: yuv420p Primaries: bt.709 Colormatrix: bt.709 Levels: limited Gamma: bt.1886 Bitrate: 7282 kbps Audio: ac3 (ATSC A/52A (AC-3)) Channels: 6 Format: floatp Sample Rate: 48000 Hz Bitrate: 384 kbps

I'm not sure if this is relevant, however I can play Live TV streams from my HDHomeRun devices via Jellyfin Media Player on Windows 10, and it indicates that is using MPV Video Player. The Jellyfin log indicates that there was an error starting DirectPlay, but that it switched to transcoding to H264/AAC, which resulted in successful playback. I don't know why Jellyfin Media Player is not able to DirectPlay the Live TV stream as it can DirectPlay recorded copies of HDHomeRun programs (as can Android Client for Jellyfin > External Player > MPV Player). However, unlike the Android Client for Jellyfin > External Player > MPV Player, the Jellyfin Media Player is successfully falling back to a transcoded stream.

Related Issues: The tuner sessions on the HDHomeRun devices that are associated with the playback failures of External Player > MPV Player are being stranded/abandoned/left open by Jellyfin. From the HDHomeRun device's perspective, the tuner is still allocated to Jellyfin. Jellyfin appears to think the client is still playing the stream (based on the looping timecode in Jellyfin Dashboard > Active Devices), however there appears to be confusion on the Jellyfin server as the Jellyfin Dashboard indicates the client is using DirectPlay, while the Jellyfin Log indicates PlayMethod=Transcode, TranscodeReason=DirectPlayError. Also, I am not able to stop the Jellyfin client via Jellyfin Dashboard > Active Devices, and I never see a "(user) has finished playing (channel) on Galaxy S20+ 5G" in the Jellyfin Dashboard > Activity list. I have successfully played a recorded program in the Jellyfin client following the Live TV stream failure, and even exited the from the Jellyfin client completely, but the Live TV streams are still stranded/abandoned/left open by Jellyfin. The only way I've found to clear these streams is to restart the Jellyfin server.

Expected Result: I should be able to play Live TV streams from my HDHomeRun devices via Android Client for Jellyfin > External Player > MPV Player using DirectPlay. While Web Player and Integrated Player could be temporary workarounds to this issue, because transcoding is involved with both of them, there is additional CPU load on the Jellyfin server and the playback experience isn't as smooth and responsive as with DirectPlay. Additionally it would require continually swapping back and forth between players depending on whether I was watching recorded programs (only MPV Player supports DirectPlay) or Live TV streams (MPV Player doesn't work at all).

Logs

Here is a snippet from logcat.  More extensive logging can be provided if needed.
09-16 21:24:43.904 21885 21885 I WebView : Requesting url without automatic networking: https://jellyfin:8920/Sessions/Playing, https://jellyfin:8920/web/main.jellyfin.bundle.js?dafe991ea4b0f4a6e0a5?deferred=true&ts=1694921066177 (2)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver: Cannot create JellyfinMediaSource
09-16 21:24:44.239 21885 21885 E MediaSourceResolver: java.lang.IllegalArgumentException: No play method found for KCNC-TV (4929c8bb-c7e9-cd2c-d4d2-8471be53a7a5)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at org.jellyfin.mobile.player.source.JellyfinMediaSource.<init>(JellyfinMediaSource.kt:348)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at org.jellyfin.mobile.player.source.MediaSourceResolver.resolveMediaSource-eH_QyT8(MediaSourceResolver.kt:579)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at org.jellyfin.mobile.player.source.MediaSourceResolver$resolveMediaSource$1.invokeSuspend(MediaSourceResolver.kt:20)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at rb.a.resumeWith(ContinuationImpl.kt:9)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at kotlinx.coroutines.p0.run(DispatchedTask.kt:107)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at android.os.Handler.handleCallback(Handler.java:942)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at android.os.Handler.dispatchMessage(Handler.java:99)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at android.os.Looper.loopOnce(Looper.java:226)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at android.os.Looper.loop(Looper.java:313)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at android.app.ActivityThread.main(ActivityThread.java:8762)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at java.lang.reflect.Method.invoke(Native Method)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
09-16 21:24:44.239 21885 21885 E MediaSourceResolver:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
09-16 21:24:44.241  5813  5813 I Launcher.NotificationListener: onNotificationPosted : com.android.systemui number : 0
09-16 21:24:44.243 21885 21885 V Toast   : show: caller = org.jellyfin.mobile.bridge.ExternalPlayer$initPlayer$1.invokeSuspend:169

Application version

2.5.3

Where did you install the app from?

Google Play

Device information

Samsung Galaxy S20+ 5G

Android version

Android 13

Jellyfin server version

10.8.10

Which video player implementations does this bug apply to?

Maxr1998 commented 9 months ago

External player doesn't support transcoded playback, that's the root cause here. I'm not sure why it doesn't direct play, but looking at the metadata the audio codec or channel count might be the reason. But I'm honestly not sure. Could you try if 2.6.0 beta 1 works for you?

nwh3365 commented 9 months ago

Just for my information, when you say the external player doesn't support transcoded playback, do you mean no external player will support transcoded playback (i.e. it is a limitation related to the External Player mechanism in JF), or that MPV Player specifically does not support transcoded playback?

And a related question, should either of web player or integrated player be able to DirectPlay these streams, or is that only going to be supported by an external player?

I'd be happy to try the beta. While I've done beta testing in the past, I haven't done it specifically with Android apps, so I need a little guidance. When I joined the Beta in the Play Store, it gave me an option to Update. I did that and it installed 2.6.0 beta 2. Is that OK, or is there a way for me to specifically select beta 1, and if so, do you need me to do that, or does beta 2 cover what you're looking for?

With beta 2, the behavior is a bit different from 2.5.3. When I click Play, the screen goes black for an instant then I'm taken back to the Guide, however I'm no longer getting the message "Media cannot be played by this device"; no messages at all now, just sent back to Guide. On the server side, it is a cleaner shutdown now as the tuner session is no longer being left open, but it's still indicating PlayMethod=Transcode, TranscodeReason=DirectPlayError.

Here are the lines from logcat from mpv. I can send you more if you need it; just filtered it down to mpv for size. 09-17 14:35:51.255 24936 24936 V mpv : Skipping copy of asset file (exists same size): subfont.ttf 09-17 14:35:51.255 24936 24936 V mpv : Skipping copy of asset file (exists same size): cacert.pem 09-17 14:35:51.274 24936 24936 V mpv : Display 0 reports FPS of 60.000004 09-17 14:35:51.277 24936 24936 V mpv : You're using the 64-bit build of mpv! 09-17 14:35:51.277 24936 27313 V mpv : [cplayer:v] mpv v0.36.0-184-ga19aefac37 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects 09-17 14:35:51.277 24936 27313 V mpv : [cplayer:v] built on Aug 27 2023 22:25:00 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] FFmpeg version: N-111830-gc48ec95ba3 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] FFmpeg library versions: 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libavutil 58.17.100 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libavcodec 60.23.100 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libavformat 60.10.101 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libswscale 7.3.100 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libavfilter 9.11.100 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] libswresample 4.11.100 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] Configuration: -Diconv=disabled -Dlua=enabled -Dlibmpv=true -Dcplayer=false -Dmanpage-build=disabled -Ddefault_library=shared --cross-file=/var/tmp/mpv-android/buildscripts/prefix/arm64/crossfile.txt 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] List of enabled features: android android-media-ndk av-channel-layout avif_muxer build-date cplugins egl-android egl-helpers ffmpeg gl glibc-thread-name gpl jpegxl libass libavdevice libdl libm linux-fstatfs lua noexecstack opensles posix stdatomic threads vector vt.h zlib 09-17 14:35:51.278 24936 27313 V mpv : [file:v] Opening /data/user/0/is.xyz.mpv/files/input.conf 09-17 14:35:51.278 24936 27313 V mpv : [input:v] Parsing input config file /data/user/0/is.xyz.mpv/files/input.conf 09-17 14:35:51.278 24936 27313 V mpv : [input:v] Input config file /data/user/0/is.xyz.mpv/files/input.conf parsed: 2 binds 09-17 14:35:51.278 24936 27313 V mpv : [cplayer:v] Waiting for scripts... 09-17 14:35:51.281 24936 27313 V mpv : [osd/libass:v] libass API version: 0x1701000 09-17 14:35:51.281 24936 27313 V mpv : [osd/libass:v] libass source: commit: 0.17.0-55-g5c15c883a4783641f7e71a6a1f440209965eb64f 09-17 14:35:51.281 24936 27313 V mpv : [osd/libass:v] Shaper: FriBidi 1.0.13 (SIMPLE) HarfBuzz-ng 8.1.1 (COMPLEX) 09-17 14:35:51.281 24936 27313 V mpv : [osd/libass:v] Setting up fonts... 09-17 14:35:51.282 24936 27313 V mpv : [osd/libass:info] can't find selected font provider 09-17 14:35:51.282 24936 27313 V mpv : [osd/libass:v] Done. 09-17 14:35:51.284 24936 27313 V mpv : [cplayer:v] Done loading scripts. 09-17 14:35:51.285 24936 27313 V mpv : event: idle 09-17 14:35:51.289 24936 24936 E mpv : mpv_get_property(hwdec-current) format 1 returned error property unavailable 09-17 14:35:51.310 24936 24936 W mpv : attaching surface 09-17 14:35:51.310 24936 27313 V mpv : event: start-file 09-17 14:35:51.310 24936 27313 V mpv : [cplayer:v] Running hook: ytdl_hook/on_load 09-17 14:35:51.313 24936 27313 V mpv : [ytdl_hook:v] ytdl:// hook 09-17 14:35:51.313 24936 27313 V mpv : [cplayer:v] Set property: android-surface-size="1440x3200" -> 1 09-17 14:35:51.314 24936 27313 V mpv : [ytdl_hook:v] not a ytdl:// url 09-17 14:35:51.314 24936 27313 V mpv : [ffmpeg:v] Opening https://jellyfin:8920/Videos/cda10c0a-8b5c-5372-5d0b-b3aa3716cb2f/stream?static=true&playSessionId=657580d9151f4a8cba801acd344d61e2&mediaSourceId=native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&streamOptions=%7B%7D 09-17 14:35:51.316 24936 24936 E mpv : mpv_get_property(hwdec-current) format 1 returned error property unavailable 09-17 14:35:51.318 24936 24936 E mpv : mpv_get_property(hwdec-current) format 1 returned error property unavailable 09-17 14:35:51.391 1468 3076 D MdnieScenarioControlService: packageName : is.xyz.mpv className : is.xyz.mpv.MPVActivity 09-17 14:35:51.598 24936 27313 V mpv : [ffmpeg:warn] https: HTTP error 400 Bad Request 09-17 14:35:51.599 24936 27313 V mpv : [stream:error] Failed to open https://jellyfin:8920/Videos/cda10c0a-8b5c-5372-5d0b-b3aa3716cb2f/stream?static=true&playSessionId=657580d9151f4a8cba801acd344d61e2&mediaSourceId=native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&streamOptions=%7B%7D. 09-17 14:35:51.599 24936 27313 V mpv : [cplayer:v] Opening failed or was aborted: https://jellyfin:8920/Videos/cda10c0a-8b5c-5372-5d0b-b3aa3716cb2f/stream?static=true&playSessionId=657580d9151f4a8cba801acd344d61e2&mediaSourceId=native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&streamOptions=%7B%7D 09-17 14:35:51.599 24936 27313 V mpv : [cplayer:v] Running hook: ytdl_hook/on_load_fail 09-17 14:35:51.599 24936 27313 V mpv : [ytdl_hook:v] full hook 09-17 14:35:51.599 24936 27313 V mpv : [ytdl_hook:v] No youtube-dl found with path yt-dlp in config directories 09-17 14:35:51.609 24936 27313 V mpv : [ytdl_hook:v] youtube-dl with path yt-dlp not found in PATH or not enough permissions 09-17 14:35:51.609 24936 27313 V mpv : [ytdl_hook:v] No youtube-dl found with path yt-dlp_x86 in config directories 09-17 14:35:51.618 24936 27313 V mpv : [ytdl_hook:v] youtube-dl with path yt-dlp_x86 not found in PATH or not enough permissions 09-17 14:35:51.618 24936 27313 V mpv : [ytdl_hook:v] No youtube-dl found with path youtube-dl in config directories 09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:v] youtube-dl with path youtube-dl not found in PATH or not enough permissions 09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:v] status: -3 09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:v] reason: init 09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:v] stdout:
09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:v] stderr:
09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:error]
09-17 14:35:51.627 24936 27313 V mpv : [ytdl_hook:error] youtube-dl failed: not found or not enough permissions 09-17 14:35:51.627 24936 27313 V mpv : event: end-file 09-17 14:35:51.627 24936 27313 V mpv : event: shutdown 09-17 14:35:51.630 24936 27313 V mpv : [cplayer:v] finished playback, loading failed (reason 4) 09-17 14:35:51.630 24936 27313 V mpv : [cplayer:info] 09-17 14:35:51.630 24936 24936 E mpv : mpv_get_property(video-format) format 1 returned error property unavailable 09-17 14:35:51.977 24936 24936 W mpv : detaching surface 09-17 14:35:51.978 24936 27313 V mpv : [cplayer:v] Set property: vo="null" -> 1 09-17 14:35:51.987 24936 24936 V mpv : Exiting.

From Jellyfin log (after it has already setup the stream from HDHomeRun): [20:35:51] [INF] [163] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for Guest. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True

[20:35:51] [INF] [163] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Android External Player Stub, Path=https://192.168.194.32:8920/LiveTv/LiveStreamFiles/a3964caeef514ee1a598750759e77ff9/stream.ts, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=DirectPlayError ) media:/videos/cda10c0a-8b5c-5372-5d0b-b3aa3716cb2f/stream?MediaSourceId=native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&AudioStreamIndex=-1&api_key=&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&RequireAvc=false&TranscodeReasons=DirectPlayError

[20:35:51] [INF] [170] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Android 2.6.0-beta.2 playing KWGN-DT. Stopped at unknown ms

[20:35:51] [INF] [170] Emby.Server.Implementations.Library.MediaSourceManager: Live stream native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af consumer count is now 0

[20:35:51] [INF] [170] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af

[20:35:51] [INF] [170] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Closing SharedHttpStream

[20:35:51] [INF] [170] Emby.Server.Implementations.Library.MediaSourceManager: Live stream a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af closed successfully

[20:35:51] [INF] [173] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Copying of SharedHttpStream to /config/transcodes/a3964caeef514ee1a598750759e77ff9.ts was canceled

[20:35:51] [INF] [173] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Deleting temp file /config/transcodes/a3964caeef514ee1a598750759e77ff9.ts

nwh3365 commented 9 months ago

I've been doing some playing with Jellyfin Media Player on Windows 10 since it also uses MPV Player and exhibits similar issues, except that it falls back to transcoding and plays the Live TV stream, where Android simply aborts and returns to the Guide.

I installed MPV Player on a Windows 10 computer and opened a Live TV stream direct from my HDHomeRun device to see what MPV Player sees coming direct from the device (http://hdhomerun:5004/auto/v2.1). MPV Player plays this stream fine.

I then opened the same channel in Jellyfin Media Player on Windows 10 (different computer) so it's streaming the same channel, but doing it via the Jellyfin server, and it's being transcoded.

At this point, there are two streams available on the Jellyfin server (obtained from Jellyfin log): the DirectPlay one (https://jellyfin:8920/LiveTv/LiveStreamFiles/ed54867b609a4fada3652b8d0719f3eb/stream.ts), and the transcoded one (https://jellyfin:8920/videos/cda10c0a-8b5c-5372-5d0b-b3aa3716cb2f/live.m3u8?DeviceId=SmVsbHlmaW5NZWRpYVBsYXllciAxLjkuMSAod2luZG93cy14ODZfNjQgMTApfDE2OTM4MTc0OTcwMDY1&MediaSourceId=native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&VideoCodec=h264&AudioCodec=aac,mp3,ac3&AudioStreamIndex=-1&VideoBitrate=139360000&AudioBitrate=640000&MaxFramerate=59.94006&PlaySessionId=a6fa5aa9155c4ec896f7ee11725856b7&api_key=86b580d12f0645dd8d8f2ef47d10d17c&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_b23ebc9442ec90ed5f591ef1683972b1_f2fa6a44ea15c447d07ed812047bb1af&TranscodingMaxAudioChannels=6&RequireAvc=false&SegmentContainer=ts&BreakOnNonKeyFrames=False&mpeg2video-level=4&mpeg2video-videobitdepth=8&mpeg2video-profile=main&TranscodeReasons=DirectPlayError).

Back on my test computer, I used MPV Player to open the DirectPlay stream and the transcoded stream from the Jellyfin server. MPV Player can play both of them just fine. The DirectPlay stream matches the stream direct from HDHomeRun. The transcoded stream matches the one that Jellyfin Media Player is seeing.

I then tried the same test on MPV Player my Galaxy S20+ 5G. It, too, can play both the DirectPlay stream and the transcoded stream from the Jellyfin server.

This seems to indicate that the DirectPlay failure issue with both Jellyfin Media Player and Jellyfin for Android (MPV Player) is not with MPV Player itself, but something related to the setup and/or hand-off between these two Jellyfin clients and their respective MPV Players.

Please let me know if there is any additional testing I can do and/or logging or other information I can provide to aid in tracking this down. Also, once this is figured out, will it be possible for you to share the info with the Jellyfin Media Player folks so that the issue can be addressed in that client as well?

nwh3365 commented 9 months ago

Stream specs from MPV Player (Windows 10) streaming direct from HDHomeRun device. snap400132

nwh3365 commented 9 months ago

The same channel via the DirectPlay stream created by Jellyfin server, but that is not being used by Jellyfin Media Player (using a trancoded version of this stream) or Jellyfin for Android (not playing anything). snap400134

jellyfin-bot commented 5 months ago

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.

nwh3365 commented 5 months ago

Today (01/28/2024), I uninstalled the Jellyfin for Android client from my phone so I could re-test this issue. I followed the "Steps to Recreate" as described in my original post. The issue still exists, and the behavior is the same as I described above for v2.6.0 beta 2. Apps indicates Jellyfin for Android v2.6.0 following the reinstallation of Jellyfin. HDHomeRun Flex 4K has been upgraded to firmware v20231214 since my original post. Jellyfin server has been upgraded to v10.8.13 since my original post.

jellyfin-bot commented 1 month ago

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.