[ Jellyfin ] The Free Software Media System

Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

Has anyone managed to set up hardware encoding on the f4-424 pro? Doesn't work for me, iHD driver is installed.
F4-424 Pro TOS 6.0.229
User avatar
outkastm
Posts: 1207
Joined: 29 Dec 2020, 23:52

Re: [ Jellyfin ] The Free Software Media System

Post by outkastm »

Check the Jellyfin logfiles for some info.
And did you configured HW transcoding in Jellyfin ?
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

Hi, yes.
Log jellyfin + ffmpeg --hwaccels + sreenshots attached.

./ffmpeg -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD
Device creation failed: -542398533.
Failed to set value 'vaapi=va:,kernel_driver=i915,driver=iHD' for option 'init_hw_device': Generic error in an external library
Error parsing global options: Generic error in an external library

./ffmpeg -init_hw_device qsv=qs@va
Invalid device specification "qsv=qs@va": invalid source device name
Failed to set value 'qsv=qs@va' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument

Code: Select all

[samius@TNAS_Sam bin]# ./ffmpeg -hwaccels
ffmpeg version 5.1.3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 7.2.0 (Buildroot 2017.11.2)
  configuration: --pkg-config=pkg-config --prefix=/usr/local/ffmpeg51/sys --arch=x86_64 --target-os=linux --cross-prefix=x86_64-tnas-linux-gnu- --enable-cross-compile --extra-cflags='-O2 -I/usr/local/ffmpeg/sys/include' --extra-ldflags=-L/usr/local/ffmpeg/sys/lib --enable-static --enable-gpl --enable-version3 --libdir=/usr/local/ffmpeg51/sys/lib --shlibdir=/usr/local/ffmpeg51/sys/lib --enable-libcelt --enable-fontconfig --enable-gnutls --enable-hwaccels --enable-vaapi --enable-iconv --enable-libass --enable-libbluray --enable-libdc1394 --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libxvid --enable-libmodplug --enable-libopus --enable-shared --enable-pthreads --enable-libopenjpeg --disable-libopencv --enable-avisynth --enable-libgme --enable-libcaca --enable-libx264 --enable-libx265 --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --extra-libs=-latomic --cpu=nocona --enable-libdrm --enable-libmfx --enable-libvpx
  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
Hardware acceleration methods:
vaapi
qsv
drm

Devices:
 D. = Demuxing supported
 .E = Muxing supported
 --
 DE alsa            ALSA audio output
  E caca            caca (color ASCII art) output device
 DE fbdev           Linux framebuffer
 D  kmsgrab         KMS screen capture
 D  lavfi           Libavfilter virtual input device
 D  libdc1394       dc1394 v.2 A/V grab
 DE oss             OSS (Open Sound System) playback
 DE video4linux2,v4l2 Video4Linux2 output device
 


[2024-05-10 12:27:42.913 +03:00] [INF] [39] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "samius". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
[2024-05-10 12:27:42.914 +03:00] [INF] [39] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile="Anonymous Profile", Path="/Volume4/Media/Фильмы/Подземелья и драконы Честь среди воров 2023г.mkv", AudioStreamIndex=1, SubtitleStreamIndex=9 ) => ( PlayMethod=Transcode, TranscodeReason=VideoCodecNotSupported, AudioCodecNotSupported ) "media:/videos/6718348f-a89b-70e0-4147-ecaac7233b6d/master.m3u8?MediaSourceId=6718348fa89b70e04147ecaac7233b6d&VideoCodec=h264&AudioCodec=aac,mp3&AudioStreamIndex=1&VideoBitrate=139616000&AudioBitrate=384000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=16f9044aab4a377c2ab7d2f20742a635&SegmentContainer=ts&MinSegments=1&BreakOnNonKeyFrames=True&hevc-level=150&hevc-videobitdepth=10&hevc-profile=main10&TranscodeReasons=VideoCodecNotSupported,%20AudioCodecNotSupported"
[2024-05-10 12:27:43.308 +03:00] [INF] [41] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
[2024-05-10 12:27:43.309 +03:00] [INF] [41] Jellyfin.Api.Helpers.TranscodingJobHelper: "/usr/local/ffmpeg51/sys/bin/ffmpeg" "-analyzeduration 200M -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -autorotate 0 -i file:\"/Volume4/Media/Фильмы/Подземелья и драконы Честь среди воров 2023г.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_qsv -preset 7 -look_ahead 0 -b:v 49986168 -maxrate 49986168 -bufsize 99972336 -g:v:0 72 -keyint_min:v:0 72 -vf \"setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,min(3840\,1608*a))/2)*2:trunc(min(max(iw/a\,ih)\,min(3840/a\,1608))/2)*2,format=yuv420p\" -codec:a:0 aac -ac 2 -ab 384000 -af \"volume=2\" -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_segment_filename \"/usr/local/@APP_CONFIG/Jellyfin/data/transcodes/0a4136ab31c19a9729f67c17023f0903%d.ts\" -hls_playlist_type vod -hls_list_size 0 -y \"/usr/local/@APP_CONFIG/Jellyfin/data/transcodes/0a4136ab31c19a9729f67c17023f0903.m3u8\""
[2024-05-10 12:27:43.328 +03:00] [ERR] [45] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
[2024-05-10 12:27:43.427 +03:00] [ERR] [39] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/videos/6718348f-a89b-70e0-4147-ecaac7233b6d/hls1/main/0.ts".
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.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>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)
Attachments
1.PNG
2.PNG
jellyfin.zip
(196.55 KiB) Not downloaded yet
F4-424 Pro TOS 6.0.229
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

./ffmpeg -v verbose -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va
[AVHWDeviceContext @ 0x1a7d180] Cannot open DRM render node for device 0.
[AVHWDeviceContext @ 0x1a7d180] Cannot open a VA display from DRM device (null).
Device creation failed: -542398533.

./vainfo
error: failed to initialize display
Aborted
F4-424 Pro TOS 6.0.229
User avatar
outkastm
Posts: 1207
Joined: 29 Dec 2020, 23:52

Re: [ Jellyfin ] The Free Software Media System

Post by outkastm »

and the result of the command ?

Code: Select all

dmesg | grep i915
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

Nothing

Code: Select all

# dmesg | grep i915
# 
F4-424 Pro TOS 6.0.229
User avatar
IdiotBox
Posts: 4
Joined: 13 May 2024, 20:24
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by IdiotBox »

samius wrote: 25 May 2024, 05:36Nothing
27.05.2024 - new version Jellyfin released. Does it work?
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

No, its not about the jellyfish.
F4-424 Pro TOS 6.0.229
User avatar
outkastm
Posts: 1207
Joined: 29 Dec 2020, 23:52

Re: [ Jellyfin ] The Free Software Media System

Post by outkastm »

samius wrote: 25 May 2024, 05:36 Nothing

Code: Select all

# dmesg | grep i915
# 
Try a reboot and run the command again. This should return some info if the kernel has loaded correctly the GPU. If still no message, you can maybe check with TM. Hopefully there is no need for a new kernel.
User avatar
samius
Posts: 18
Joined: 14 Apr 2024, 21:46
Russia

Re: [ Jellyfin ] The Free Software Media System

Post by samius »

outkastm wrote: 31 May 2024, 22:17
I already asked support about new kernel, but they ignored me.
F4-424 Pro TOS 6.0.229
Post Reply

Return to “Developer Discussion Room”