jellyfin / jellyfin-androidtv

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

Long Delay before stream of Live TV - There was an error starting direct playback #1945

Closed barfunkle closed 1 year ago

barfunkle commented 2 years ago

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

[2022-08-08 17:35:24.936 -04:00] [INF] [76] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: MediaSourceInfo { Protocol: Http, Id: "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", Path: "https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/0915f691da2a42e3be56b2205995f940/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: False, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", BufferMs: 0, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: null, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False }, MediaStream { Codec: "ac3", CodecTag: null, 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: 448000, 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: 8448000, Timestamp: null, RequiredHttpHeaders: [], TranscodingUrl: null, TranscodingSubProtocol: null, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: null, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False } }
[2022-08-08 17:35:25.099 -04:00] [INF] [76] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "USER1". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2022-08-08 17:35:25.102 -04:00] [INF] [76] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV", Path="https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/0915f691da2a42e3be56b2205995f940/stream.ts", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=DirectPlayError ) "media:/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15401430&AudioBitrate=448000&MaxFramerate=59.94006&api_key=<token>&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&CopyTimestamps=true&RequireAvc=false&mpeg2video-level=4&mpeg2video-profile=main&TranscodeReasons=DirectPlayError"
[2022-08-08 17:35:25.107 -04:00] [WRN] [76] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/LiveStreams/Open?format=json" to "jellyfinlocalIP" in 0:00:00.6915562 with Status Code 200
[2022-08-08 17:35:25.322 -04:00] [INF] [76] Jellyfin.Api.Helpers.TranscodingJobHelper: "C:\Program Files\Jellyfin\Server\ffmpeg.exe" "-analyzeduration 200M -fflags +igndts -f mpegts -autorotate 0 -i \"https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/0915f691da2a42e3be56b2205995f940/stream.ts\" -sn -codec:v:0 libx264 -force_key_frames \"expr:gte(t,n_forced*5)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p\" -preset superfast -crf 23 -maxrate 8000000 -bufsize 16000000 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 libfdk_aac -ac 6 -ab 448000 -y \"C:\ProgramData\Jellyfin\Server\transcodes\15133cee90a569eee63ba386ff8a66d3.mkv\""
[2022-08-08 17:35:33.961 -04:00] [WRN] [76] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?DeviceId=eafed13c8d9addf7f1907cc6c25c97824a1ccba7&MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15401430&AudioBitrate=448000&MaxFramerate=59.94006&PlaySessionId=58988e65657e458aac6775a61e97204e&api_key=9124e4f52d3e426dba68999d265cb273&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&CopyTimestamps=true&RequireAvc=false&mpeg2video-level=4&mpeg2video-profile=main&TranscodeReasons=DirectPlayError" to "jellyfinlocalIP" in 0:00:08.6415674 with Status Code 200
[2022-08-08 17:35:33.961 -04:00] [WRN] [75] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?DeviceId=eafed13c8d9addf7f1907cc6c25c97824a1ccba7&MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15401430&AudioBitrate=448000&MaxFramerate=59.94006&PlaySessionId=58988e65657e458aac6775a61e97204e&api_key=9124e4f52d3e426dba68999d265cb273&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&CopyTimestamps=true&RequireAvc=false&mpeg2video-level=4&mpeg2video-profile=main&TranscodeReasons=DirectPlayError" to "jellyfinlocalIP" in 0:00:00.6248397 with Status Code 200
[2022-08-08 17:35:39.600 -04:00] [INF] [90] Jellyfin.Api.Helpers.TranscodingJobHelper: Stopping ffmpeg process with q command for "C:\ProgramData\Jellyfin\Server\transcodes\15133cee90a569eee63ba386ff8a66d3.mkv"
[2022-08-08 17:35:39.666 -04:00] [INF] [90] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
[2022-08-08 17:35:39.668 -04:00] [INF] [90] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "C:\ProgramData\Jellyfin\Server\transcodes\15133cee90a569eee63ba386ff8a66d3.mkv"
[2022-08-08 17:35:41.165 -04:00] [INF] [77] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Android TV" "0.13.7" playing "WDCA Fox 5 Plus". Stopped at "340170" ms
[2022-08-08 17:35:41.188 -04:00] [INF] [77] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400" consumer count is now 0
[2022-08-08 17:35:41.195 -04:00] [INF] [77] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400"
[2022-08-08 17:35:41.197 -04:00] [INF] [77] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Closing "SharedHttpStream"
[2022-08-08 17:35:41.199 -04:00] [INF] [77] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400" closed successfully
[2022-08-08 17:35:41.200 -04:00] [INF] [90] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Copying of "SharedHttpStream" to "C:\ProgramData\Jellyfin\Server\transcodes\0915f691da2a42e3be56b2205995f940.ts" was canceled
[2022-08-08 17:35:41.204 -04:00] [INF] [90] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Deleting temp file "C:\ProgramData\Jellyfin\Server\transcodes\0915f691da2a42e3be56b2205995f940.ts"
[2022-08-08 17:35:41.206 -04:00] [WRN] [77] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/Sessions/Playing/Stopped" to "jellyfinlocalIP" in 0:00:01.6080447 with Status Code 204
[2022-08-08 17:36:13.109 -04:00] [WRN] [71] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/Items/0cf4fc08-8b9e-8d10-0708-0e3cec129d37/Images/Primary?maxHeight=280&tag=543b6ca4c9f21c87d81daf7a932499c0" to "jellyfinlocalIP" in 0:00:00.6704859 with Status Code 200
[2022-08-08 17:36:34.127 -04:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "USER1". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2022-08-08 17:36:34.133 -04:00] [INF] [75] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV", Path="http://HDHomeRuNIP", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=DirectPlayError ) "media:/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15878530&AudioBitrate=448000&api_key=<token>&CopyTimestamps=true&RequireAvc=false&TranscodeReasons=DirectPlayError"
[2022-08-08 17:36:34.281 -04:00] [INF] [75] Emby.Server.Implementations.LiveTv.LiveTvManager: Opening channel stream from "Emby", external channel Id: "hdhr_506"
[2022-08-08 17:36:34.295 -04:00] [INF] [75] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Streaming Channel "hdhr_506"
[2022-08-08 17:36:34.308 -04:00] [INF] [75] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: GetChannelStream: channel id: "hdhr_506". stream id: "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400" profile: "native"
[2022-08-08 17:36:34.325 -04:00] [INF] [75] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Opening "SharedHttpStream" Live stream from "http://HDHomeRuNIP:5004/auto/v506"
[2022-08-08 17:36:34.838 -04:00] [INF] [71] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Beginning "SharedHttpStream" stream to "C:\ProgramData\Jellyfin\Server\transcodes\d59263936fe648bdbee356c77fe73c43.ts"
[2022-08-08 17:36:34.855 -04:00] [INF] [71] Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun.HdHomerunHost: Live stream opened after 530.0715ms
[2022-08-08 17:36:34.869 -04:00] [INF] [71] Emby.Server.Implementations.LiveTv.EmbyTV.EmbyTV: Returning mediasource streamId "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", mediaSource.Id "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", mediaSource.LiveStreamId null
[2022-08-08 17:36:34.886 -04:00] [INF] [71] Emby.Server.Implementations.Library.MediaSourceManager: Live tv media info probe took "0.0010304" seconds
[2022-08-08 17:36:34.891 -04:00] [INF] [71] Emby.Server.Implementations.Library.MediaSourceManager: Live stream opened: MediaSourceInfo { Protocol: Http, Id: "native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", Path: "https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/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: False, IsInfiniteStream: True, RequiresOpening: True, OpenToken: null, RequiresClosing: True, LiveStreamId: "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400", BufferMs: 0, RequiresLooping: False, SupportsProbing: True, VideoType: null, IsoType: null, Video3DFormat: null, MediaStreams: [MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: null, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False }, MediaStream { Codec: "ac3", CodecTag: null, 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: 448000, 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: 8448000, Timestamp: null, RequiredHttpHeaders: [], TranscodingUrl: null, TranscodingSubProtocol: null, TranscodingContainer: null, AnalyzeDurationMs: 3000, TranscodeReasons: 0, DefaultAudioStreamIndex: null, DefaultSubtitleStreamIndex: null, VideoStream: MediaStream { Codec: "mpeg2video", CodecTag: null, Language: null, ColorRange: "tv", 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: "SDR", VideoRangeType: "SDR", VideoDoViTitle: null, LocalizedUndefined: null, LocalizedDefault: null, LocalizedForced: null, LocalizedExternal: null, DisplayTitle: "720p MPEG2VIDEO SDR", NalLengthSize: null, IsInterlaced: False, IsAVC: null, ChannelLayout: null, BitRate: 8000000, BitDepth: null, RefFrames: 1, PacketLength: null, Channels: null, SampleRate: null, IsDefault: False, IsForced: False, Height: 720, Width: 1280, AverageFrameRate: 59.94006, RealFrameRate: 59.94006, Profile: "Main", 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: 4, IsAnamorphic: False } }
[2022-08-08 17:36:35.052 -04:00] [INF] [71] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "USER1". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2022-08-08 17:36:35.056 -04:00] [INF] [71] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="AndroidTV", Path="https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/stream.ts", AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=DirectPlayError ) "media:/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15878530&AudioBitrate=448000&MaxFramerate=59.94006&api_key=<token>&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&CopyTimestamps=true&RequireAvc=false&mpeg2video-level=4&mpeg2video-profile=main&TranscodeReasons=DirectPlayError"
[2022-08-08 17:36:35.061 -04:00] [WRN] [71] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/LiveStreams/Open?format=json" to "jellyfinlocalIP" in 0:00:00.7867262 with Status Code 200
[2022-08-08 17:36:35.214 -04:00] [INF] [71] Jellyfin.Api.Helpers.TranscodingJobHelper: "C:\Program Files\Jellyfin\Server\ffmpeg.exe" "-analyzeduration 200M -fflags +igndts -f mpegts -autorotate 0 -i \"https://jellyfinlocalIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/stream.ts\" -sn -codec:v:0 libx264 -force_key_frames \"expr:gte(t,n_forced*5)\" -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p\" -preset superfast -crf 23 -maxrate 8000000 -bufsize 16000000 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 libfdk_aac -ac 6 -ab 448000 -y \"C:\ProgramData\Jellyfin\Server\transcodes\8e9a6b7bb906343618b8ac4135c650bd.mkv\""
[2022-08-08 17:36:43.698 -04:00] [WRN] [77] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "https://IntExtFQDN:8920/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv?DeviceId=eafed13c8d9addf7f1907cc6c25c97824a1ccba7&MediaSourceId=native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=15878530&AudioBitrate=448000&MaxFramerate=59.94006&PlaySessionId=61d2eb322ecd4bde8a9cb2da5cffb598&api_key=9124e4f52d3e426dba68999d265cb273&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400&CopyTimestamps=true&RequireAvc=false&mpeg2video-level=4&mpeg2video-profile=main&TranscodeReasons=DirectPlayError" to "jellyfinlocalIP" in 0:00:08.4906544 with Status Code 200

FFmpeg logs

/videos/5affc9a1-4c3e-e8c2-bfaf-3eb2150391ed/stream.mkv

{"Protocol":1,"Id":"native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400","Path":"https://localhostIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/stream.ts","EncoderPath":null,"EncoderProtocol":null,"Type":0,"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":false,"IsInfiniteStream":true,"RequiresOpening":true,"OpenToken":null,"RequiresClosing":true,"LiveStreamId":"a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_native_57787d67e13abe79ccb2c9f5431502d1_7cb44b1bbc7642c89815f8917ef56400","BufferMs":0,"RequiresLooping":false,"SupportsProbing":true,"VideoType":null,"IsoType":null,"Video3DFormat":null,"MediaStreams":[{"Codec":"mpeg2video","CodecTag":null,"Language":null,"ColorRange":"tv","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":"SDR","VideoRangeType":"SDR","VideoDoViTitle":null,"LocalizedUndefined":null,"LocalizedDefault":null,"LocalizedForced":null,"LocalizedExternal":null,"DisplayTitle":"720p MPEG2VIDEO SDR","NalLengthSize":null,"IsInterlaced":false,"IsAVC":null,"ChannelLayout":null,"BitRate":8000000,"BitDepth":null,"RefFrames":1,"PacketLength":null,"Channels":null,"SampleRate":null,"IsDefault":false,"IsForced":false,"Height":720,"Width":1280,"AverageFrameRate":59.94006,"RealFrameRate":59.94006,"Profile":"Main","Type":1,"AspectRatio":"16:9","Index":-1,"Score":null,"IsExternal":false,"DeliveryMethod":null,"DeliveryUrl":null,"IsExternalUrl":null,"IsTextSubtitleStream":false,"SupportsExternalStream":false,"Path":null,"PixelFormat":"yuv420p","Level":4,"IsAnamorphic":false},{"Codec":"ac3","CodecTag":null,"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":448000,"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":0,"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":8448000,"Timestamp":null,"RequiredHttpHeaders":{},"TranscodingUrl":null,"TranscodingSubProtocol":null,"TranscodingContainer":null,"AnalyzeDurationMs":3000,"DefaultAudioStreamIndex":null,"DefaultSubtitleStreamIndex":null}

C:\Program Files\Jellyfin\Server\ffmpeg.exe -analyzeduration 200M -fflags +igndts -f mpegts -autorotate 0 -i "https://localhostIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/stream.ts" -sn -codec:v:0 libx264 -force_key_frames "expr:gte(t,n_forced*5)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(1280\,720*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(1280/a\,720))/2)*2,format=yuv420p" -preset superfast -crf 23 -maxrate 8000000 -bufsize 16000000 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -map_metadata -1 -map_chapters -1 -threads 0 -codec:a:0 libfdk_aac -ac 6 -ab 448000 -y "C:\ProgramData\Jellyfin\Server\transcodes\8e9a6b7bb906343618b8ac4135c650bd.mkv"

ffmpeg version 5.1-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20220113
  configuration: --prefix=/opt/ffmpeg --arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-libs='-lfftw3f -lstdc++' --extra-cflags=-DCHROMAPRINT_NODLL --extra-version=Jellyfin --disable-ffplay --disable-debug --disable-doc --disable-sdl2 --disable-ptx-compression --disable-w32threads --enable-pthreads --enable-shared --enable-lto --enable-gpl --enable-version3 --enable-schannel --enable-iconv --enable-libxml2 --enable-zlib --enable-lzma --enable-gmp --enable-chromaprint --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libwebp --enable-libvpx --enable-libzimg --enable-libx264 --enable-libx265 --enable-libdav1d --enable-libfdk-aac --enable-opencl --enable-dxva2 --enable-d3d11va --enable-amf --enable-libmfx --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[mpeg2video @ 0000029efeb61700] Invalid frame dimensions 0x0.
    Last message repeated 31 times
Input #0, mpegts, from 'https://localhostIP:8920/LiveTv/LiveStreamFiles/d59263936fe648bdbee356c77fe73c43/stream.ts':
  Duration: N/A, start: 6688.522411, bitrate: N/A
  Program 1019 
  Stream #0:0[0x4e3]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn
    Side data:
      cpb: bitrate max/min/avg: 17588800/0/0 buffer size: 7995392 vbv_delay: N/A
  Stream #0:1[0x4e4](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, 5.1(side), fltp, 448 kb/s
  Stream #0:2[0x4e5](spa): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s (visual impaired)
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (ac3 (native) -> aac (libfdk_aac))
Press [q] to stop, [?] for help
[libx264 @ 0000029efebdd700] using SAR=1/1
[libx264 @ 0000029efebdd700] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0000029efebdd700] profile Main, level 3.2, 4:2:0, 8-bit
[libx264 @ 0000029efebdd700] 264 - core 164 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=1 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=4 chroma_me=0 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=1 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=10 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=8000 vbv_bufsize=16000 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 pb_ratio=1.30 aq=1:1.00
Output #0, matroska, to 'C:\ProgramData\Jellyfin\Server\transcodes\8e9a6b7bb906343618b8ac4135c650bd.mkv':
  Metadata:
    encoder         : Lavf59.27.100
  Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 1k tbn
    Metadata:
      encoder         : Lavc59.37.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 8000000/0/0 buffer size: 16000000 vbv_delay: N/A
  Stream #0:1: Audio: aac ([255][0][0][0] / 0x00FF), 48000 Hz, 5.1, s16, 448 kb/s
    Metadata:
      encoder         : Lavc59.37.100 libfdk_aac
frame=    1 fps=0.0 q=0.0 size=       1kB time=00:00:00.87 bitrate=   6.9kbits/s speed=18.7x    
frame=  124 fps=0.0 q=25.0 size=     256kB time=00:00:02.95 bitrate= 709.9kbits/s speed=5.31x    
frame=  229 fps=214 q=28.0 size=    1024kB time=00:00:04.70 bitrate=1782.5kbits/s speed=4.39x    
frame=  341 fps=216 q=24.0 size=    1536kB time=00:00:06.57 bitrate=1914.0kbits/s speed=4.16x    
frame=  448 fps=214 q=28.0 size=    1792kB time=00:00:08.35 bitrate=1756.2kbits/s speed=3.99x    
frame=  545 fps=210 q=27.0 size=    1792kB time=00:00:09.97 bitrate=1471.2kbits/s speed=3.84x    
frame=  609 fps=194 q=27.0 size=    2816kB time=00:00:11.04 bitrate=2088.6kbits/s speed=3.53x    
frame=  636 fps=172 q=26.0 size=    3328kB time=00:00:11.49 bitrate=2371.5kbits/s speed=3.11x    
frame=  677 fps=161 q=27.0 size=    3328kB time=00:00:12.18 bitrate=2238.3kbits/s speed= 2.9x    
frame=  713 fps=152 q=25.0 size=    3328kB time=00:00:12.78 bitrate=2133.3kbits/s speed=2.72x    
frame=  733 fps=141 q=24.0 size=    3840kB time=00:00:13.11 bitrate=2398.8kbits/s speed=2.52x    
frame=  767 fps=134 q=23.0 size=    3840kB time=00:00:13.68 bitrate=2299.3kbits/s speed= 2.4x    
frame=  796 fps=127 q=24.0 size=    3840kB time=00:00:14.16 bitrate=2220.8kbits/s speed=2.26x    
frame=  824 fps=122 q=23.0 size=    3840kB time=00:00:14.63 bitrate=2149.9kbits/s speed=2.16x    
frame=  844 fps=115 q=26.0 size=    4352kB time=00:00:14.96 bitrate=2382.2kbits/s speed=2.04x    
frame=  895 fps=114 q=26.0 size=    4352kB time=00:00:15.81 bitrate=2254.0kbits/s speed=2.02x

Media info of the file

unk

Application version

0.13.7

Device information

Firestick

Android version

unk

Jellyfin server version

10.9

PrplHaz4 commented 2 years 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....

barfunkle commented 2 years ago

Thank you. Would prefer getting direct play working again with 10.8 which is my 'main' issue.

barfunkle commented 2 years ago

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.

CloudStu commented 2 years ago

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?

jellyfin-bot commented 1 year 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.