pdulvp / jellyfin-qnap

Jellyfin server packaging for QNAP NAS
https://jellyfin.org
505 stars 33 forks source link

Jellyfin 10.9.9 on QNAP TS-464-4G, issue with playing videos: "System.ArgumentNullException: Value cannot be null. (Parameter '_mediaEncoder.EncoderPath')" #97

Closed phidix closed 2 months ago

phidix commented 2 months ago

Hello, I've tried to install new version of Jellyfin-Qnap v10.9.9 on my QNAP TS-464-4G yesterday but I had to downgrade it to v.10.9.7 because when I try to play movie it doesn't work and in the clients' (Android, Android-TV, WebClient) there is thrown error regarding issue with movie source. In the log files of the server I've found the following line: ~[ERR] Error processing request. URL "GET" "/videos/az534b1a-3a51-1edc-1b25-23b4e47f9eaf/". System.ArgumentNullException: Value cannot be null. (Parameter '_mediaEncoder.EncoderPath')

I've found that issue can be related to the empty node in jellyfin/conf/encoding.xml file which should point to jellyfin-ffmpeg location of Jellyfin server. I've tried to modify this file (node) on the QNAP device but everytime I'm restarting Jellyfin-Qnap app this file jellyfin/conf/encoding.xml is being restored to the version with empty node and the issue still persists.

I don't observe similar issue on Jellyfin-Qnap v10.9.7. In this version value of the aforementioned node is non-empty properly pointing to jellyfin-ffmpeg location by default after installation of the app on Qnap device and no error is being thrown during playback.

Could you verify whether it is a bug or is there any workaround to fix it?

Thank you in advance!

InterN0te commented 2 months ago

Got the same issue. Only direct play works, if a video needs to be transcode, it fails :

Log

``` [2024-08-11 22:33:00.660 +02:00] [INF] [36] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting null with args "-analyzeduration 200M -probesize 1G -i file:\"/[filepath].mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format" [2024-08-11 22:33:00.660 +02:00] [ERR] [36] MediaBrowser.Providers.TV.EpisodeMetadataService: Error in "Probe Provider" System.InvalidOperationException: Cannot start process because a file name has not been provided. at System.Diagnostics.Process.Start() at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.StartProcess(ProcessWrapper process) at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, CancellationToken cancellationToken) at MediaBrowser.MediaEncoding.Encoder.MediaEncoder.GetMediaInfoInternal(String inputPath, String primaryPath, MediaProtocol protocol, Boolean extractChapters, String probeSizeArgument, Boolean isAudio, Nullable`1 videoType, CancellationToken cancellationToken) at MediaBrowser.Providers.MediaInfo.FFProbeVideoInfo.ProbeVideo[T](T item, MetadataRefreshOptions options, CancellationToken cancellationToken) at MediaBrowser.Providers.Manager.MetadataService`2.RunCustomProvider(ICustomMetadataProvider`1 provider, TItemType item, String logName, MetadataRefreshOptions options, RefreshResult refreshResult, CancellationToken cancellationToken) [2024-08-11 22:33:00.765 +02:00] [INF] [15] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "Toto". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-11 22:33:00.806 +02:00] [INF] [15] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [2024-08-11 22:33:00.807 +02:00] [ERR] [15] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/268eb874-b8b5-db76-8bc2-cc5cce8ea37f/live.m3u8". System.ArgumentNullException: Value cannot be null. (Parameter '_mediaEncoder.EncoderPath') at System.ArgumentNullException.Throw(String paramName) at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName) at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName) at System.ArgumentException.ThrowIfNullOrEmpty(String argument, String paramName) at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, 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_method1842(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.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() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.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() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager) at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager) at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager) at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Jellyfin.Api.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.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext) at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context) at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager) at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context) [2024-08-11 22:33:00.854 +02:00] [INF] [15] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.9.9" playing "[Episode Name]". Stopped at "0" ms ```

tangyl2000 commented 2 months ago

我也遇到了相同的问题,现象是涉及到转码的一律不能播放。 encoding.xml里EncoderAppPathDisplay参数是空的,没有ffmpeg的路径。 日志报错信息如下:

[2024-08-12 10:34:53.318 +08:00] [INF] [8] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.9.9" playing "葛洛利亚·贝尔". Stopped at "0" ms [2024-08-12 10:36:46.961 +08:00] [INF] [8] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "tangyl2000". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True [2024-08-12 10:36:47.515 +08:00] [INF] [23] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request [2024-08-12 10:36:47.517 +08:00] [ERR] [23] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/09794497-0d91-a70b-61bb-cbe92964760c/hls1/main/-1.mp4". System.ArgumentNullException: Value cannot be null. (Parameter '_mediaEncoder.EncoderPath') at System.ArgumentNullException.Throw(String paramName) at System.ArgumentNullException.ThrowIfNull(Object argument, String paramName) at System.ArgumentException.ThrowNullOrEmptyException(String argument, String paramName) at System.ArgumentException.ThrowIfNullOrEmpty(String argument, String paramName) at MediaBrowser.MediaEncoding.Transcoding.TranscodeManager.StartFfMpeg(StreamState state, String outputPath, String commandLineArguments, Guid userId, TranscodingJobType transcodingJobType, CancellationTokenSource cancellationTokenSource, String workingDirectory) at Jellyfin.Api.Controllers.DynamicHlsController.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId) at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, Nullable1 static, String params, String tag, String deviceProfileId, String playSessionId, String segmentContainer, Nullable1 segmentLength, Nullable1 minSegments, String mediaSourceId, String deviceId, String audioCodec, Nullable1 enableAutoStreamCopy, Nullable1 allowVideoStreamCopy, Nullable1 allowAudioStreamCopy, Nullable`1

fa-ribeiro commented 2 months ago

Same on my TVS-h474...

InterN0te commented 2 months ago

Had the same error as this issue with the standard package (jellyfin_10.9.9) but transcoding works on my TS-264-8G with the package jellyfin_10.9.9_ffmpeg5

pdulvp commented 2 months ago

Shall be fixed. Some dependencies were not included. error while loading shared libraries: libgnutls.so.30: cannot open shared object file: No such file or directory