jellyfin / jellyfin

The Free Software Media System
https://jellyfin.org
GNU General Public License v2.0
31.66k stars 2.89k forks source link

Live TV m3u works fine with VLC and other players, Jellyfin won't play #7675

Open ashipaek0 opened 2 years ago

ashipaek0 commented 2 years ago

Media Info of the file

Logs https://gist.github.com/ashipaek0/3d6802eea11070c9cead2e5bdf334f6b

FFmpeg Logs https://gist.github.com/ashipaek0/95a037d9866526bee4946807d5db2547

Stats for Nerds Screenshots

Server System (please complete the following information):

Client System (please complete the following information):

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.

eshirvana commented 1 year ago

I have the same issue on :

Version: 10.8.9 Operating System: Linux Architecture: X64 I almost tried any live tv from https://iptv-org.github.io/ and It shows as multiple channels with no name like so : image

and still can't play anything , here tis last error trace ( not sure if ts's related but includes it here just in case :

023-02-25 19:55:17.598 +00:00] [INF] [16] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "admin". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2023-02-25 19:55:17.601 +00:00] [INF] [16] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="stream-565092.ts", AudioStreamIndex=-1, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerNotSupported, VideoCodecNotSupported, AudioCodecNotSupported ) "media:/videos/ce061024-b11c-64ba-3c4e-93047bef3f08/master.m3u8?MediaSourceId=707136082034332ae2275924fd013642&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=-1&VideoBitrate=139616000&AudioBitrate=384000&api_key=<token>&LiveStreamId=a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_707136082034332ae2275924fd013642&TranscodingMaxAudioChannels=2&RequireAvc=false&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&h264-profile=high,main,baseline,constrainedbaseline&h264-rangetype=SDR&h264-level=52&h264-deinterlace=true&TranscodeReasons=ContainerNotSupported,%20VideoCodecNotSupported,%20AudioCodecNotSupported"
[2023-02-25 19:55:17.618 +00:00] [INF] [19] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/transcodes/991a25ca7c5ba684f0821a24f54c5d31.m3u8"
[2023-02-25 19:55:17.680 +00:00] [INF] [19] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2023-02-25 19:55:17.683 +00:00] [INF] [19] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 3000000 -fflags +igndts -autorotate 0 -i file:\"stream-565092.ts\" -map_metadata -1 -map_chapters -1 -threads 0 -sn -codec:v:0 libx264 -preset superfast -crf 23 -maxrate 20000000 -bufsize 40000000 -profile:v:0 high -level 51 -x264opts:0 subme=0:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 \"expr:gte(t,n_forced*3)\" -sc_threshold:v:0 0 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,yadif=0:-1:0,format=yuv420p\" -flags -global_header -codec:a:0 libfdk_aac -ac 2 -ab 384000 -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/f88cac19a6faad02be414cb14c151bac/\" -hls_segment_filename \"/config/transcodes/f88cac19a6faad02be414cb14c151bac%d.ts\" -hls_playlist_type event -hls_list_size 0 -y \"/config/transcodes/f88cac19a6faad02be414cb14c151bac.m3u8\""
[2023-02-25 19:55:17.747 +00:00] [ERR] [19] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
[2023-02-25 19:55:17.848 +00:00] [ERR] [19] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/ce061024-b11c-64ba-3c4e-93047bef3f08/live.m3u8".
MediaBrowser.Common.FfmpegException: FFmpeg exited with code 1
   at Jellyfin.Api.Helpers.TranscodingJobHelper.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, HttpRequest request, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory)
   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)
   at lambda_method1265(Closure , Object )
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Jellyfin.Server.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Server.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Server.Middleware.IpBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Server.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.Policy.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Server.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Server.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Server.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Server.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2023-02-25 19:55:17.989 +00:00] [INF] [19] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) "/config/transcodes/f88cac19a6faad02be414cb14c151bac.m3u8"
[2023-02-25 19:55:19.514 +00:00] [INF] [16] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.8.9" playing null. Stopped at "0" ms
[2023-02-25 19:55:19.535 +00:00] [INF] [16] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "707136082034332ae2275924fd013642" consumer count is now 0
[2023-02-25 19:55:19.536 +00:00] [INF] [16] Emby.Server.Implementations.Library.MediaSourceManager: Closing live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_707136082034332ae2275924fd013642"
[2023-02-25 19:55:19.537 +00:00] [INF] [16] Emby.Server.Implementations.LiveTv.TunerHosts.M3UTunerHost: Closing "LiveStream"
[2023-02-25 19:55:19.537 +00:00] [INF] [16] Emby.Server.Implementations.Library.MediaSourceManager: Live stream "a17c75760a04e99b68cf766e11316e1c_09efa0d56b934a82adec00a87b837fb0_707136082034332ae2275924fd013642" closed successfully
[2023-02-25 19:55:19.554 +00:00] [WRN] [16] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.2.218:8096/Sessions/Playing/Stopped" to "192.168.2.225" in 0:00:01.6009744 with Status Code 204
jellyfin-bot commented 10 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.

eshirvana commented 10 months ago

I still have the same issue with version 10.8.13

the4anoni commented 10 months ago

i have same issue

Duration: N/A, start: 1029.625289, bitrate: N/A Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn Metadata: variant_bitrate : 0 Stream #0:1: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s Metadata: variant_bitrate : 0 Stream #0:2: Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 128 kb/s Metadata: variant_bitrate : 0 Stream #0:3: Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Metadata: variant_bitrate : 0 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (mp2 (native) -> aac (libfdk_aac)) Press [q] to stop, [?] for help Output #0, hls, to '/config/transcodes/redacted.m3u8': Metadata: encoder : Lavf59.27.100 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 50 fps, 50 tbr, 90k tbn Stream #0:1: Audio: aac, 48000 Hz, stereo, s16, 256 kb/s Metadata: encoder : Lavc59.37.100 libfdk_aac frame= 0 fps=0.0 q=-1.0 size=N/A time=00:00:00.00 bitrate=N/A speed=N/A [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 16200, current: 10800; changing to 16201. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 16201, current: 12600; changing to 16202. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 30600, current: 25200; changing to 30601. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 30601, current: 27000; changing to 30602. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 45000, current: 39600; changing to 45001. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 45001, current: 41400; changing to 45002. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 59400, current: 54000; changing to 59401. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 59401, current: 55800; changing to 59402. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 73800, current: 68400; changing to 73801. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 73801, current: 70200; changing to 73802. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 99000, current: 93600; changing to 99001. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 99001, current: 95400; changing to 99002. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 113400, current: 108000; changing to 113401. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 113401, current: 109800; changing to 113402. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 127800, current: 122400; changing to 127801. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 127801, current: 124200; changing to 127802. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 142200, current: 136800; changing to 142201. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 142201, current: 138600; changing to 142202. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 156600, current: 151200; changing to 156601. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 156601, current: 153000; changing to 156602. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 171000, current: 165600; changing to 171001. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 171001, current: 167400; changing to 171002. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 185400, current: 180000; changing to 185401. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 185401, current: 181800; changing to 185402. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 199800, current: 194400; changing to 199801. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 199801, current: 196200; changing to 199802. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 214200, current: 208800; changing to 214201. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 214201, current: 210600; changing to 214202. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 228600, current: 223200; changing to 228601. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 228601, current: 225000; changing to 228602. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 243000, current: 237600; changing to 243001. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 243001, current: 239400; changing to 243002. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 257400, current: 252000; changing to 257401. This may result in incorrect timestamps in the output file. [hls @ 0x560c6389c040] Non-monotonous DTS in output stream 0:0; previous: 257401, current: 253800; changing to 257402. This may result in incorrect timestamps in the output file.

I can't play anything while jellyfin works fine.

Kakoluz commented 8 months ago

I've found myself with this issue as well. After some digging i suspect that is something either with FFMPEG (my ffmpeg log ends with Option reconnect_at_eof not found.).

The thing that has me really confused is that i have setted up 2 channels (that are my own streamings for testing) one of them plays nicely and only remuxes and the other one, same settings just a different key, it won't play at all, jellyfin will try to transcode and fails.

Stream that fails (keys redacted) log Stream that works: log

This is the /m3u8 file for both of them, the stream named kakoluz works, the one named dazn works https://pastebin.com/73emEBwg

VLC works fine for both. but jellyfin provide different arguments to them, even if i just stop one stream in OBS change the key and it won't play on the other with the exact same options.

Next-Page-Vi commented 4 months ago

mee too

chminsc commented 3 months ago

Show

did you find a solution?

PhynixP commented 2 months ago

I have the same Problem (10.8.13). I hope the 10.9.0 will fix this problem.