LiveTV with TVHeadend direct playback fails black screen - ElCapitanTV - 2024-01-03
Hello,
My setup is Jellyfin running in Docker, also TVHeadend 4.3 in Docker and I have set up Jellyfin LiveTV to use M3U channels.
However attempting to play back live TV channels, result is only black screen and nothing happens, no audio or video.
There are two separate issues:
1) (Server issue) For TV live stream Docker internal address is used: Jellyfin Mediaplayer log Code: ffmpeg: Opening http://172.18.0.7:8096/LiveTv/LiveStreamFiles/..id../stream.ts.
This IP accessed is incorrect since my Jellyfin is in dedicated Docker network and the issue can be "fixed" in source code SharedHttpStream by hardcoding actual host IP here in place of _appHost.GetApiUrlForLocalAccess() :
Code: MediaSource.Path = _appHost.GetApiUrlForLocalAccess() + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
2) (Andoird client issue) After fixing issue 1) Jellyfin Mediaplayer works fine and correct IP and stream is played. However Android client + external MPV player still fails, in the adb logcat can be seen Code: mpv : [ffmpeg:v] Opening http://192.168.1.1:8096/Videos/..id../stream?static=true&playSessionId=..id..&mediaSourceId=..id..&streamOptions=%7B%7D
Accessing this URL just hangs and does not respond anything, even when accessed in browser. I would expect it to return error if it is about illegal state or call.
I strongly feel that this is a bug in Android client and the correct URL accessed should be http://192.168.1.1:8096/LiveTv/LiveStreamFiles/..id../stream.ts like in Jellyfin Mediaplayer.
I was unable to figure out why Android client resolves to wrong URL instead of LiveStream.
For ExoPlayer I see in adb logs
Code: ExoPlayerImplInternal: Playback error
ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException: Source error
ExoPlayerImplInternal: at o5.o0.k(SourceFile:17)
ExoPlayerImplInternal: at o5.o0.handleMessage(SourceFile:382)
ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:102)
ExoPlayerImplInternal: at android.os.Looper.loopOnce(Looper.java:226)
ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:313)
ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:67)
ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.ParserException: Input does not start with the #EXTM3U header.{contentIsMalformed=true, dataType=4}
ExoPlayerImplInternal: at y6.n.f(SourceFile:259)
ExoPlayerImplInternal: at l7.i0.a(SourceFile:30)
ExoPlayerImplInternal: at l7.d0.run(SourceFile:41)
ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
ExoPlayerImplInternal: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
ExoPlayerImplInternal: at java.lang.Thread.run(Thread.java:1012)
and server side looks fine, I don't know what URL it is requesting. I'm a bit surprised how broken basic stuff is.
RE: LiveTV with TVHeadend direct playback fails black screen - TheDreadPirate - 2024-01-03
Are both of your containers using the same networking type? Looks like one is using host network and the other is using bridge networking?
RE: LiveTV with TVHeadend direct playback fails black screen - ElCapitanTV - 2024-01-03
EDIT: See original post
RE: LiveTV with TVHeadend direct playback fails black screen - ElCapitanTV - 2024-01-04
EDIT: See original post
RE: LiveTV with TVHeadend direct playback fails black screen - ElCapitanTV - 2024-01-07
I have updated my final findings in first post
RE: LiveTV with TVHeadend direct playback fails black screen - nikko6386 - 2024-02-06
Hi. I'm getting the same issue. TVHeadEnd Channels works fine on Jellyfin Media Player but wont play on mobile app (tried integerated / external player)
RE: LiveTV with TVHeadend direct playback fails black screen - TheDreadPirate - 2024-02-06
Do you have a reverse proxy setup?
RE: LiveTV with TVHeadend direct playback fails black screen - nikko6386 - 2024-02-08
(2024-02-06, 06:12 PM)TheDreadPirate Wrote: Do you have a reverse proxy setup?
Yes. But I tried it today using my jellyfin's server ip and I'm still getting the same problem
If this will help, Here's the logs i'm getting on Android client (Playback not working)
Code: [20:05:37] [WRN] Slow HTTP Response from http://192.168.0.5:8096/videos/5705dc6f-983f-d7b0-d89f-9eea9add392d/live.m3u8?DeviceId=52e7f8e7da22515609ba8fcb70e548a69a114181c920fc9d&MediaSourceId=1906441028&VideoCodec=h264&AudioCodec=mp3,aac,ac3,eac3&AudioStreamIndex=-1&VideoBitrate=119872000&AudioBitrate=128000&PlaySessionId=5476d398e4754dcca2e5a644f9980aa4&api_key=9e46fba69b0a4da7b8c11fc2cf16bf41&RequireAvc=false&SegmentContainer=ts&BreakOnNonKeyFrames=False&TranscodeReasons=ContainerNotSupported,%20VideoCodecNotSupported,%20AudioCodecNotSupported to 192.168.0.195 in 0:00:01.6507008 with Status Code 500
Feb 8 20:05:41 jellyfin jellyfin[117]: [20:05:41] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -autorotate 0 -i "http://192.168.0.4:9981/stream/channelid/1906441028?ticket=b0c65a5a06d39e635986549a4fb7072e9a533d23" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 119872000 -maxrate 119872000 -bufsize 239744000 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,yadif=0:-1:0,format=yuv420p" -flags -global_header -codec:a:0 libmp3lame -ac 2 -ab 128000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_base_url "hls/2c2c719b524bbb1ca9ac675fa00894a7/" -hls_segment_filename "/mnt/ssd/Transcodes/2c2c719b524bbb1ca9ac675fa00894a7%d.ts" -hls_playlist_type event -hls_list_size 0 -y "/mnt/ssd/Transcodes/2c2c719b524bbb1ca9ac675fa00894a7.m3u8"
Feb 8 20:05:41 jellyfin jellyfin[117]: [20:05:41] [ERR] FFmpeg exited with code 1
Feb 8 20:05:41 jellyfin jellyfin[117]: [20:05:41] [ERR] Error processing request. URL GET /videos/5705dc6f-983f-d7b0-d89f-9eea9add392d/live.m3u8.
Feb 8 20:05:41 jellyfin jellyfin[117]: MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
Feb 8 20:05:41 jellyfin jellyfin[117]: at Jellyfin.Api.Helpers.TranscodingJobHelper.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, HttpRequest request, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
Feb 8 20:05:41 jellyfin jellyfin[117]: at Jellyfin.Api.Controllers.DynamicHlsController.GetLiveHlsStream(Guid itemId, String container, Nullable`1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable`1 segmentLength, Nullable`1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable`1 enableAutoStreamCopy, Nullable`1 allowVideoStreamCopy, Nullable`1 allowAudioStreamCopy, Nullable`1 breakOnNonKeyFrames, Nullable`1 audioSampleRate, Nullable`1 maxAudioBitDepth, Nullable`1 audioBitRate, Nullable`1 audioChannels, Nullable`1 maxAudioChannels, String profile, String level, Nullable`1 framerate, Nullable`1 maxFramerate, Nullable`1 copyTimestamps, Nullable`1 startTimeTicks, Nullable`1 width, Nullable`1 height, Nullable`1 videoBitRate, Nullable`1 subtitleStreamIndex, Nullable`1 subtitleMethod, Nullable`1 maxRefFrames, Nullable`1 maxVideoBitDepth, Nullable`1 requireAvc, Nullable`1 deInterlace, Nullable`1 requireNonAnamorphic, Nullable`1 transcodingMaxAudioChannels, Nullable`1 cpuCoreLimit, String liveStreamId, Nullable`1 enableMpegtsM2TsMode, String videoCodec, String subtitleCodec, String transcodeReasons, Nullable`1 audioStreamIndex, Nullable`1 videoStreamIndex, Nullable`1 context, Dictionary`2 streamOptions, Nullable`1 maxWidth, Nullable`1 maxHeight, Nullable`1 enableSubtitlesInManifest)
vs
Windows client (Jellyfin Media Player) which playback is working
Code: eb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] [TVHclient] AccessTicketHandler.GetAccessTicket: New ticket (#14) created for channelId=1906441028
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] User policy for nikko. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] StreamBuilder.BuildVideoItem( Profile=Jellyfin Media Player, Path=http://192.168.0.4:9981/stream/channelid/1906441028?ticket=00ac710f99e03c20e09d338928b97910af6211c4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/5705dc6f-983f-d7b0-d89f-9eea9add392d/stream?MediaSourceId=1906441028&Static=true&AudioStreamIndex=-1&api_key=<token>
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] Adding playback tracker : SmVsbHlmaW5NZWRpYVBsYXllciAxLjkuMSAod2luZG93cy14ODZfNjQgMTApfDE3MDcxMjQwOTAzMjQ1-09ba8fcb70e548a69a114181c920fc9d-5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] PlaybackTracker : Adding Start Event : 02/08/2024 20:08:36
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] Creating StartPlaybackTimer Task
Feb 8 20:08:36 jellyfin jellyfin[117]: [20:08:36] [INF] StartPlaybackTimer : Entered
Feb 8 20:08:37 jellyfin jellyfin[117]: [20:08:37] [INF] Sending ForceKeepAlive message to 1 inactive WebSockets.
Feb 8 20:08:37 jellyfin jellyfin[117]: [20:08:37] [INF] Processing playback tracker : SmVsbHlmaW5NZWRpYVBsYXllciAxLjkuMSAod2luZG93cy14ODZfNjQgMTApfDE3MDcxMjQwOTAzMjQ1-09ba8fcb70e548a69a114181c920fc9d-5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:49 jellyfin jellyfin[117]: [20:08:49] [INF] Lost 1 WebSockets.
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] session.RemoteEndPoint : 192.168.0.10
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : event_playing_id = 5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : event_user_id = 09ba8fcb70e548a69a114181c920fc9d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : event_user_id_int = 1
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : session_playing_id = 5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : session_user_id = 09ba8fcb70e548a69a114181c920fc9d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : play_method = DirectPlay
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : e.ClientName = Jellyfin Media Player
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : e.DeviceName = Nikko-MiniPC
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : ItemName = GMA
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : ItemId = 5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : ItemType = TvChannel
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : All matches, playback registered
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] Playback tracker found, adding playback info : SmVsbHlmaW5NZWRpYVBsYXllciAxLjkuMSAod2luZG93cy14ODZfNjQgMTApfDE3MDcxMjQwOTAzMjQ1-09ba8fcb70e548a69a114181c920fc9d-5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] Saving playback tracking activity in DB
Feb 8 20:08:56 jellyfin jellyfin[117]: [20:08:56] [INF] StartPlaybackTimer : Exited
Feb 8 20:08:57 jellyfin jellyfin[117]: [20:08:57] [INF] Processing playback tracker : SmVsbHlmaW5NZWRpYVBsYXllciAxLjkuMSAod2luZG93cy14ODZfNjQgMTApfDE3MDcxMjQwOTAzMjQ1-09ba8fcb70e548a69a114181c920fc9d-5705dc6f983fd7b0d89f9eea9add392d
Feb 8 20:09:17 jellyfin jell
RE: LiveTV with TVHeadend direct playback fails black screen - TheDreadPirate - 2024-02-08
You are transcoding on Android. Not transcoding in JMP. And the transcode is failing. Can you share the ffmpeg log?
What Linux distro and what are your server specs?
|