Closed barfunkle closed 1 year ago
I think the default FFMPEG AnalyzeDuration was increased for 10.8 - there is at least one issue opened in the main repo for it - sorry don't have it off-hand....
Thank you. Would prefer getting direct play working again with 10.8 which is my 'main' issue.
Following this https://github.com/jellyfin/jellyfin/issues/3930 made it so that a live stream starts <5 seconds form 15+ seconds. But Direct play still does not work. The closest I get is "Remux uses very little processing power with a completely lossless media quality." Where I had directplay. Also tried setting up a RAM disk for the transcode and FFMPEG to see if I can get the stream going faster. No noticeable difference in performance; ie lag between play and actually seeing live TV.
I found this issue searching all of the Jellyfin org for DirectPlayError
. I'm seeing similar behaviour, but with the WebOS client and with the web browser on WebOS. So I don't believe this is an Android specific problem.
In my case I'm attempting to watch LiveTV, but through the M3U tuner, not TVHeadEnd. But I have pretty much exactly the same behaviour. I try to play a LiveTV stream. After a minute or more, the video finally appears. Checking the media info, I can the video is re-muxing. When I check the logs, I see the following.
[2022-08-18 22:02:56.450 +02:00] [INF] [21] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Stu". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2022-08-18 22:02:56.537 +02:00] [INF] [21] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="http://192.168.50.203:34400/stream/aacf09c6e38ba1b1c642e290698e9920", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerNotSupported ) "media:/videos/2bd4645f-d3e9-c831-f6e8-2bcb6cc7772f/stream?MediaSourceId=aa48b66f75928bb3bfbfe6694fc2e332&AudioStreamIndex=-1&api_key=<token>&RequireAvc=false&TranscodeReasons=ContainerNotSupported"
[2022-08-18 22:02:56.561 +02:00] [INF] [21] Emby.Server.Implementations.LiveTv.LiveTvManager: Opening channel stream from "Emby", external channel Id: "m3u_eeddea0013b4f4f66e3ae6587f9a49e43431333537b039a13ab3f6c3ee597b65"
[2022-08-18 22:02:56.567 +02:00] [INF] [21] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Streaming Channel "m3u_eeddea0013b4f4f66e3ae6587f9a49e43431333537b039a13ab3f6c3ee597b65"
[2022-08-18 22:02:56.586 +02:00] [INF] [21] Emby.Server.Implementations.LiveTv.TunerHosts.M3UTunerHost: Opening "SharedHttpStream" Live stream from "http://192.168.50.203:34400/stream/aacf09c6e38ba1b1c642e290698e9920"
[2022-08-18 22:02:56.598 +02:00] [INF] [30] Emby.Server.Implementations.LiveTv.TunerHosts.M3UTunerHost: Beginning "SharedHttpStream" stream to "/config/data/transcodes/e4a91cf9948348e9aff875d50553d399.ts"
[2022-08-18 22:03:00.119 +02:00] [INF] [22] Emby.Server.Implementations.LiveTv.TunerHosts.M3UTunerHost: Live stream opened after 3535.6629ms
[2022-08-18 22:03:00.120 +02:00] [INF] [22] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Returning mediasource streamId "aa48b66f75928bb3bfbfe6694fc2e332", mediaSource.Id "aa48b66f75928bb3bfbfe6694fc2e332", mediaSource.LiveStreamId null
[2022-08-18 22:03:00.192 +02:00] [INF] [28] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took "0.0538317" seconds
[2022-08-18 22:03:00.234 +02:00] [INF] [28] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: MediaSourceInfo { Protocol: Http, Id: "aa48b66f75928bb3bfbfe6694fc2e332", Path: "http://172.20.0.11:8096/LiveTv/LiveStreamFiles/e4a91cf9948348e9aff875d50553d399/stream.ts", EncoderPath: null, EncoderProtocol: null, Type: Default, Container: "mpegts", Size: null, Name: null, IsRemote: False, ETag: null, RunTimeTicks: null, ReadAtNativeFramerate: False, IgnoreDts: True, IgnoreIndex: False, GenPtsInput: False, SupportsTranscoding: True, SupportsDirectStream: True, SupportsDirectPlay: True, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_aa48b66f75928bb3bfbfe6694fc2e332", BufferMs: null, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "h264", CodecTag: null, Language: null, ColorRange: "tv", ColorSpace: "bt709", ColorTransfer: "bt709", ColorPrimaries: "bt709", DvVersionMajor: null, DvVersionMinor: null, DvProfile: null, DvLevel: null, RpuPresentFlag: null, ElPresentFlag: null, BlPresentFlag: null, DvBlSignalCompatibilityId: null, Comment: null, TimeBase: "1/90000", CodecTimeBase: null, Title: null, VideoRange: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "1080i H264 SDR", NalLengthSize: "0", IsInterlaced: True, IsAVC: null, ChannelLayout: null, BitRate: 20000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 1080, Width: 1920, AverageFrameRate: 25, RealFrameRate: 25, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 40, IsAnamorphic: False }, MediaStream { Codec: "ac3", CodecTag: "AC-3", Language: null, ColorRange: null, ColorSpace: null, ColorTransfer: null, ColorPrimaries: null, DvVersionMajor: null, DvVersionMinor: null, DvProfile: null, DvLevel: null, RpuPresentFlag: null, ElPresentFlag: null, BlPresentFlag: null, DvBlSignalCompatibilityId: null, Comment: null, TimeBase: "1/90000", CodecTimeBase: null, Title: null, VideoRange: null, VideoRangeType: null, VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "Dolby Digital - 5.1", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: "5.1", BitRate: 384000, BitDepth: null, RefFrames: null, PacketLength: null, Channels: 6, SampleRate: 48000, IsDefault: False, IsForced: False, Height: null, Width: null, AverageFrameRate: null, RealFrameRate: null, Profile: null, Type: Audio, AspectRatio: null, Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: null, Level: 0, IsAnamorphic: null }], MediaAttachments: [], Formats: [], Bitrate: 20384000, Timestamp: null, RequiredHttpHeaders: [("User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.85 Safari/537.36")], TranscodingUrl: null, TranscodingSubProtocol: null, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "h264", CodecTag: null, Language: null, ColorRange: "tv", ColorSpace: "bt709", ColorTransfer: "bt709", ColorPrimaries: "bt709", DvVersionMajor: null, DvVersionMinor: null, DvProfile: null, DvLevel: null, RpuPresentFlag: null, ElPresentFlag: null, BlPresentFlag: null, DvBlSignalCompatibilityId: null, Comment: null, TimeBase: "1/90000", CodecTimeBase: null, Title: null, VideoRange: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "1080i H264 SDR", NalLengthSize: "0", IsInterlaced: True, IsAVC: null, ChannelLayout: null, BitRate: 20000000, BitDepth: 8, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 1080, Width: 1920, AverageFrameRate: 25, RealFrameRate: 25, Profile: "High", Type: Video, AspectRatio: "16:9", Index: -1, Score: null, IsExternal: False, DeliveryMethod: null, DeliveryUrl: null, IsExternalUrl: null, IsTextSubtitleStream: False, SupportsExternalStream: False, Path: null, PixelFormat: "yuv420p", Level: 40, IsAnamorphic: False } }
[2022-08-18 22:03:00.251 +02:00] [INF] [28] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Stu". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2022-08-18 22:03:00.255 +02:00] [INF] [28] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="http://172.20.0.11:8096/LiveTv/LiveStreamFiles/e4a91cf9948348e9aff875d50553d399/stream.ts", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) "media:/videos/2bd4645f-d3e9-c831-f6e8-2bcb6cc7772f/stream.mpegts?MediaSourceId=aa48b66f75928bb3bfbfe6694fc2e332&Static=true&VideoCodec=h264&AudioCodec=ac3&AudioStreamIndex=-1&api_key=<token>&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_aa48b66f75928bb3bfbfe6694fc2e332"
[2022-08-18 22:03:00.275 +02:00] [WRN] [28] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.50.201:8096/Items/2bd4645fd3e9c831f6e82bcb6cc7772f/PlaybackInfo?UserId=bda902daa563453f8090290c6286c623&StartTimeTicks=0&IsPlayback=true&AutoOpenLiveStream=true&MaxStreamingBitrate=140000000" to "192.168.50.161" in 0:00:05.0401612 with Status Code 200
[2022-08-18 22:04:22.931 +02:00] [INF] [27] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Stu". EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
[2022-08-18 22:04:23.039 +02:00] [INF] [27] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="http://172.20.0.11:8096/LiveTv/LiveStreamFiles/e4a91cf9948348e9aff875d50553d399/stream.ts", AudioStreamIndex=-1, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=DirectPlayError ) "media:/videos/2bd4645f-d3e9-c831-f6e8-2bcb6cc7772f/master.m3u8?MediaSourceId=aa48b66f75928bb3bfbfe6694fc2e332&VideoCodec=h264,hevc,h264&AudioCodec=ac3&AudioStreamIndex=-1&VideoBitrate=139616000&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=25&api_key=<token>&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_aa48b66f75928bb3bfbfe6694fc2e332&TranscodingMaxAudioChannels=6&RequireAvc=false&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=False&h264-level=40&h264-videobitdepth=8&h264-profile=high&h264-audiochannels=6&h264-rangetype=SDR&hevc-profile=main,main10&hevc-rangetype=SDR,HDR10,HLG,DOVI&hevc-level=183&TranscodeReasons=DirectPlayError"
[2022-08-18 22:04:24.376 +02:00] [INF] [28] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -user_agent \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.85 Safari/537.36\" -fflags +igndts+genpts -i \"http://172.20.0.11:8096/LiveTv/LiveStreamFiles/e4a91cf9948348e9aff875d50553d399/stream.ts\" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 copy -start_at_zero -flags -global_header -codec:a:0 copy -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/a4d1314a65f62075722c4be0698e5aa3/\" -hls_segment_filename \"/config/data/transcodes/a4d1314a65f62075722c4be0698e5aa3%d.ts\" -hls_playlist_type event -hls_list_size 0 -y \"/config/data/transcodes/a4d1314a65f62075722c4be0698e5aa3.m3u8\""
At 22:02:56, I start trying to view the stream, using direct play (as expected - WebOS should be able to play this stream, I have another IPTV app installed on my TV that can play this stream).
But then at 22:04:22, well over a minute later, I see a new request to play the file, this time with ( PlayMethod=Transcode, TranscodeReason=DirectPlayError )
I suspect the log file in the original post is missing this first attempt to DirectPlay the stream. But still, the same problem is reported, the stream takes ages to start, and when it does, we can see DirectPlayError
when ultimately running the stream is then redirected through ffmpeg.
I don't have the same problem when playing the stream through jellyfin-web on my laptop, but that seems to be because it never attempts to DirectPlay in the first place.
Given I don't think this is an Android client specific problem, I could create a new ticket elsewhere, but suspect this one should instead be moved to avoid duplication - is that possible?
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.
Describe the bug
Upgraded to 10.8.3 had long delays before live TV would appear on end client. Ended up reverting back to 10.7.x. Did a fresh install on a second machine issue still existed. The delays happened both on Nvidea Shield and FireStick. On or off local LAN.
This weekend Nvidia Shield stopped working stating that the client was updated and required 10.8. Although stream does finally start it takes a long time to begin.
Installed on Windows 10, SSD HD, 16GB RAM, No hardware acceleration. SiliconDust CableCard.
No choice but to run 10.8 did some TS. Get this error: There was an error starting direct playback.
No combination will get rid of this error and long delays.
Recorded Live TV. Will Direct Stream without an issue and will play within +-4seconds.
Same issue with current unstable version.
Logs
FFmpeg logs
Media info of the file
Application version
0.13.7
Device information
Firestick
Android version
unk
Jellyfin server version
10.9