• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting SOLVED: Hardware acceleration on Unraid issues

    Pages (2): « Previous 1 2

     
    • 0 Vote(s) - 0 Average

    SOLVED: Hardware acceleration on Unraid issues

    Configuring hardware acceleration for an iGPU w/Unraid
    n8jadams
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Oct
    Reputation: 0
    Country:United States
    #11
    2023-10-11, 11:18 PM
    Hm. I don't see that stuff:

    Code:
    # docker exec -it jellyfin_official /usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device qsv=qs:/dev/dri/renderD128
    ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
      built with gcc 10 (Debian 10.2.1-6)
      configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --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
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'
    bitmap
    Offline

    Community Moderator

    Posts: 893
    Threads: 9
    Joined: 2023 Jul
    Reputation: 29
    #12
    2023-10-11, 11:30 PM
    Try with -v verbose...weird that you have to add that, but it's likely part of the jellyfin-ffmpeg config to suppress the libva output:

    Code:
    bitmap@server:docker$  docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device qsv=qs:/dev/dri/renderD128
    ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
      built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
      configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --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
    [AVHWDeviceContext @ 0x55e0fa364a00] Trying to use DRM render node for device 0, with matching kernel driver (i915).
    [AVHWDeviceContext @ 0x55e0fa364a00] libva: VA-API version 1.19.0                                                                                                                                  
    [AVHWDeviceContext @ 0x55e0fa364a00] libva: User requested driver 'iHD'                                                                                                                            
    [AVHWDeviceContext @ 0x55e0fa364a00] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so                                                                                      
    [AVHWDeviceContext @ 0x55e0fa364a00] libva: Found init function __vaDriverInit_1_19                                                                                                                
    [AVHWDeviceContext @ 0x55e0fa364a00] libva: va_openDriver() returns 0                                                                                                                              
    [AVHWDeviceContext @ 0x55e0fa364a00] Initialised VAAPI connection: version 1.19                                                                                                                    
    [AVHWDeviceContext @ 0x55e0fa364a00] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (95dc859).                                                                                  
    [AVHWDeviceContext @ 0x55e0fa364a00] Driver not found in known nonstandard list, using standard behaviour.                                                                                        
    [AVHWDeviceContext @ 0x55e0fa364500] Initialize MFX session: API version is 1.35, implementation version is 1.255                                                                                  
    Hyper fast Audio and Video encoder                                                                                                                                                                
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    n8jadams
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Oct
    Reputation: 0
    Country:United States
    #13
    2023-10-11, 11:49 PM (This post was last modified: 2023-10-11, 11:50 PM by n8jadams. Edited 1 time in total.)
    Got it. With the verbose flag

    Code:
    # docker exec -it jellyfin_official /usr/lib/jellyfin-ffmpeg/ffmpeg -init_hw_device qsv=qs:/dev/dri/renderD128 -v verbose
    ffmpeg version 5.1.3-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
      built with gcc 10 (Debian 10.2.1-6)
      configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libsvtav1 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --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
    [AVHWDeviceContext @ 0x55890b611200] Trying to use DRM render node for device 0, with matching kernel driver (i915).
    [AVHWDeviceContext @ 0x55890b611200] libva: VA-API version 1.19.0
    [AVHWDeviceContext @ 0x55890b611200] libva: User requested driver 'iHD'
    [AVHWDeviceContext @ 0x55890b611200] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
    [AVHWDeviceContext @ 0x55890b611200] libva: Found init function __vaDriverInit_1_19
    [AVHWDeviceContext @ 0x55890b611200] libva: va_openDriver() returns 0
    [AVHWDeviceContext @ 0x55890b611200] Initialised VAAPI connection: version 1.19
    [AVHWDeviceContext @ 0x55890b611200] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (95dc859).
    [AVHWDeviceContext @ 0x55890b611200] Driver not found in known nonstandard list, using standard behaviour.
    [AVHWDeviceContext @ 0x55890b610d00] Initialize MFX session: API version is 1.35, implementation version is 1.35
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

    Use -h to get full help or, even better, run 'man ffmpeg'

    Honestly this looks normal to me
    bitmap
    Offline

    Community Moderator

    Posts: 893
    Threads: 9
    Joined: 2023 Jul
    Reputation: 29
    #14
    2023-10-12, 02:53 AM
    Yup, that looks to me like the container has access and can initialize the device for encoding/transcoding.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    n8jadams
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Oct
    Reputation: 0
    Country:United States
    #15
    2023-10-12, 09:17 PM
    Ok, so I think that I've isolated the problem a bit. I think it has something to do with stream caching...

    I was able to get the video to play for a few seconds, and then I stopped it.

    Code:
    [14:05:40] [INF] [63] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
    [14:05:40] [INF] [63] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=Transcode, TranscodeReason=ContainerBitrateExceedsLimit ) media:/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/master.m3u8?MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=2&VideoBitrate=946482&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=23.976025&api_key=<token>&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=4df13c51ed77c888f05fbead0afce219&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=6&aac-profile=lc&TranscodeReasons=ContainerBitrateExceedsLimit
    [14:05:42] [INF] [63] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
    [14:05:42] [INF] [63] Jellyfin.Api.Helpers.TranscodingJobHelper: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,driver=iHD,kernel_driver=i915 -init_hw_device qsv=qs@va -filter_hw_device qs -autorotate 0 -i file:"/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4" -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 946482 -maxrate 946482 -bufsize 1892964 -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)\,640)/2)*2:trunc(ow/a/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -ar 48000 -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 "/config/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b.m3u8"
    [14:05:43] [WRN] [64] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/hls1/main/0.ts?DeviceId=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTVfNykgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExNy4wLjAuMCBTYWZhcmkvNTM3LjM2fDE2OTcxNDQ3MjE1MTA1&MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&VideoCodec=h264&AudioCodec=aac&AudioStreamIndex=2&VideoBitrate=946482&AudioBitrate=384000&AudioSampleRate=48000&MaxFramerate=23.976025&PlaySessionId=f958f7f8da04459fbea028336644d8b6&api_key=9af520924666494c80e288f7480c086f&TranscodingMaxAudioChannels=2&RequireAvc=false&Tag=4df13c51ed77c888f05fbead0afce219&SegmentContainer=ts&MinSegments=2&BreakOnNonKeyFrames=True&hevc-level=120&hevc-videobitdepth=10&hevc-profile=main10&hevc-audiochannels=6&aac-profile=lc&TranscodeReasons=ContainerBitrateExceedsLimit&runtimeTicks=0&actualSegmentLengthTicks=30000000 to 163.116.147.39 in 0:00:01.1611297 with Status Code 200
    [14:05:45] [WRN] [64] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/Sessions/Playing to 163.116.147.39 in 0:00:00.5967831 with Status Code 204
    [14:08:17] [INF] [83] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 0
    [14:08:19] [INF] [83] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
    [14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
    [14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: CustomAuthentication was not authenticated. Failure message: Invalid token.
    [14:08:36] [INF] [64] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: CustomAuthentication was challenged.
    [14:08:55] [INF] [70] Jellyfin.Api.Helpers.TranscodingJobHelper: Deleting partial stream file(s) /config/data/transcodes/fe9a33fadb57048ab88d5033d6eff75b.m3u8
    [14:08:57] [INF] [60] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 163.116.147.39 closed
    [14:08:57] [INF] [70] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.8.11 playing Whistleblower. Stopped at 12058 ms
    [14:08:57] [WRN] [70] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from <REDACTED_MY_SERVER_URL>/Sessions/Playing/Stopped to 163.116.147.39 in 0:00:01.6846389 with Status Code 204
    [14:08:57] [INF] [60] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 163.116.147.39 request

    Then when I (cleared my browser cache, logged in again,) tried to watch the same video, this logged
    Code:
    [14:09:03] [INF] [65] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for admin. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
    [14:09:03] [INF] [65] Jellyfin.Api.Helpers.MediaInfoHelper: StreamBuilder.BuildVideoItem( Profile=Anonymous Profile, Path=/media/TV/The Office (US)/Season 6/The Office (US) - S06E26 - Whistleblower Bluray-1080p.mp4, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/0ea35f7e-919a-bd95-fe54-530e9ebc816f/stream.mp4?MediaSourceId=0ea35f7e919abd95fe54530e9ebc816f&Static=true&VideoCodec=hevc&AudioCodec=aac&AudioStreamIndex=2&api_key=<token>&Tag=4df13c51ed77c888f05fbead0afce219

    and it just hung there for a minute or so, and then the video resumed eventually. If I pause the video again, and then play, it hangs a long time again. So it's like the client can't read the transcoded stream files or something for a long time. Perhaps I need to remap where my cache goes, so it actually lives on a cache SSD instead of my Unraid array.

    Thoughts?
    bitmap
    Offline

    Community Moderator

    Posts: 893
    Threads: 9
    Joined: 2023 Jul
    Reputation: 29
    #16
    2023-10-13, 12:40 AM
    You could easily change your transcode directory. You have to map that volume in your Compose file, then change that setting in your admin Dashboard. This is different than the cache directory I mentioned earlier. If your transcode directory is on a slower disk or one that experiences high I/O traffic, that could impact performance, but you'd expect to see that in the logs (or somewhere).

    Worth a shot. Just make sure you don't map it anywhere that other data exists. Jellyfin will erase that data (as the transcode directory is meant to be ephemeral. You can also try a RAM disk, but that's a little bit of extra configuration and requires that the host have considerable available memory.
    Jellyfin 10.10.7 LSIO Docker | Ubuntu 24.04 LTS | i7-13700K | Arc A380 6 GB | 64 GB RAM | 79 TB Storage

    [Image: AIL4fc84QG6uSnTDEZiCCtosg7uAA8x9j1myFaFs...qL0Q=w2400]
    n8jadams
    Offline

    Junior Member

    Posts: 10
    Threads: 2
    Joined: 2023 Oct
    Reputation: 0
    Country:United States
    #17
    2023-10-13, 09:09 PM (This post was last modified: 2023-10-14, 06:06 PM by n8jadams. Edited 2 times in total.)
    Didn't do the trick. SMH. It's seriously so strange, I set up a new server, and the videos seem to play fine. Then I try again later and they take forever to load, and it only loads part of the video, and I can't really scrub at all. This is only in the web client too, now it's doing this with hardware acceleration off. *shrugs*

    EDIT: Chrome was the culprit. I went into
    Code:
    chrome://flags
    and disabled "Hardware-accelerated video decode" and now videos reliably load quickly.
    Pages (2): « Previous 1 2

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode