Bug 275249 - multimedia/jellyfin 14.0-RELEASE runtime issues
Summary: multimedia/jellyfin 14.0-RELEASE runtime issues
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-22 00:39 UTC by pete
Modified: 2023-12-22 15:39 UTC (History)
4 users (show)

See Also:
michiel: maintainer-feedback+


Attachments
0001-multimedia-jellyfin-Update-to-10.8.13.patch (10.16 KB, patch)
2023-12-01 12:26 UTC, Michiel van Baak Jansen
michiel: maintainer-approval+
Details | Diff
0001-multimedia-jellyfin-Update-to-10.8.13.patch (10.71 KB, patch)
2023-12-11 14:04 UTC, Michiel van Baak Jansen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pete 2023-11-22 00:39:05 UTC
Hey there, I've just updated a system from 13.2-RELEASE to 14.0-RELEASE and have run into a few problems with Jellyfin 10.8.10.

1) It looks like with the upgrade to OpenSSL-3 on 14.0 you need to install the openssl111 port to get Jellyfin running (when installed from packages at least).  Without that installed it's crash on startup like so:
[00:11:31] [INF] [4] Main: Kestrel listening on Any IP4 Address
No usable version of libssl was found
Abort trap


2) After installing the legacy openssl pkg it starts up as expected and the webUI loads.  unfortunately it looks like ffmpeg has issues trying to play back media.  I uninstalled the ffmpeg pkg, and reinstalled - and also verified that I can run ffmpeg in a shell.

This is the error in the logs when i start up jellyfin:

[2023-11-22 00:17:04.193 +00:00] [ERR] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Error validating encoder
System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'ffmpeg' with working directory '/'. No such file or directory
   at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)
   at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at MediaBrowser.MediaEncoding.Encoder.EncoderValidator.GetProcessOutput(String path, String arguments, Boolean readStdErr, String testKey)
   at MediaBrowser.MediaEncoding.Encoder.EncoderValidator.ValidateVersion()
[2023-11-22 00:17:04.212 +00:00] [WRN] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: Failed version check: "ffmpeg"
[2023-11-22 00:17:04.228 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: ""


Then i get this error when I attempt to playback media:

2023-11-22 00:18:02.232 +00:00] [ERR] [26] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/a22bbeb0-697b-7b60-74dc-d5261e29e4e6/hls1/main/0.ts".
System.ArgumentException: FFmpeg path not set.
   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.GetDynamicSegment(StreamingRequestDto streamingRequest, Int32 segmentId)
   at Jellyfin.Api.Controllers.DynamicHlsController.GetHlsVideoSegment(Guid itemId, String playlistId, Int32 segmentId, String container, Int64 runtimeTicks, Int64 actualSegmentLengthTicks, 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 maxWidth, Nullable`1 maxHeight, 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)
   at lambda_method1068(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()
--- End of stack trace from previous location ---
   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()
--- End of stack trace from previous location ---
   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)


(interestingly - media i've previously played back works, but new video files throw this error along with an Playback Error in the UI).
Comment 1 pete 2023-11-22 00:50:38 UTC
Should have done more testing before creating this bug.  If you update the path for ffmpeg in the Jellyfin web UI by going to:
Admin Dashboard -> Playback -> FFmpeg Path

And put in "/usr/local/bin/" the second issue is resolved.  I am not sure why that did not get picked up.

The first issue re: OpenSSL probably still warrants investigation though.
Comment 2 Michiel van Baak Jansen 2023-11-22 13:56:36 UTC
OpenSSL 1.1 is needed, and OpenSSL 3 will break things (as you have found out)
I will update the port in the coming days (there's also a newer jellyfin build available from TheFrank).
Sorry for the delays, my time is limited at the moment.
Comment 3 pete 2023-11-22 18:08:54 UTC
(In reply to Michiel van Baak Jansen from comment #2)
No worries and thanks for the fast reply.  I'm happy to test out any patches for updating the port if you need that.  Appreciate your work on this port!
Comment 4 Michiel van Baak Jansen 2023-12-01 12:26:37 UTC
Created attachment 246711 [details]
0001-multimedia-jellyfin-Update-to-10.8.13.patch

Depend on openssl111 (Jellyfin won't start with openssl 3)
Update to 10.8.13 - this release patches several security issues.

Poudriere ok
I no longer use JF, but a quick check shows it starts and runs on my setup (14.0 amd64)
Comment 5 Bernard Spil freebsd_committer freebsd_triage 2023-12-09 12:39:20 UTC
As this is only required for < 14 versions, please make the dependency for

__FreeBSD_version < 1400092 

See https://docs.freebsd.org/en/books/porters-handbook/book/#versions-14
Comment 6 Michiel van Baak Jansen 2023-12-11 14:04:23 UTC
Created attachment 246977 [details]
0001-multimedia-jellyfin-Update-to-10.8.13.patch

poudriere ok
Did a quick test and it runs and playback works as well (14.0 amd64)

Also removed the dependency on openssl111.
init script now sets an environment variable to select the correct runtime for openssl in base. This should fix the comment in the last triage reply.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-22 15:38:23 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=eed3524ad2b51919e8a48af9ea93b39fd904c087

commit eed3524ad2b51919e8a48af9ea93b39fd904c087
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2023-12-22 15:24:08 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2023-12-22 15:37:04 +0000

    multimedia/jellyfin: Update to 10.8.13

    Changelog: https://github.com/jellyfin/jellyfin/releases/tag/v10.8.11
               https://github.com/jellyfin/jellyfin/releases/tag/v10.8.12
               https://github.com/jellyfin/jellyfin/releases/tag/v10.8.13

    PR:             275249
    Approved by:    Michiel van Baak Jansen <michiel@vanbaak.eu> (maintainer)

 multimedia/jellyfin/Makefile          |  5 ++---
 multimedia/jellyfin/distinfo          |  6 +++---
 multimedia/jellyfin/files/jellyfin.in |  4 ++++
 multimedia/jellyfin/pkg-plist         | 34 +++++++++++++++++-----------------
 4 files changed, 26 insertions(+), 23 deletions(-)
Comment 8 Rodrigo Osorio freebsd_committer freebsd_triage 2023-12-22 15:39:14 UTC
Tested of FreeBSD14:amd64 & Committed, thanks.