2024-08-27, 11:07 PM
(This post was last modified: 2024-08-27, 11:16 PM by RitzyMage. Edited 1 time in total.)
I've been running my Jellyfin server for a while now and for the most part things are going great! However, sometimes when streaming, the server will stutter or just stop to buffer for quite a while. I *supposedly* have hardware acceleration working, but I'm not 100% sure it is. So a few questions:
I'm suspicious that hardware acceleration isn't working because of (1) the buffering and (2) when I check my GPU's usage with intel_gpu_top, I see this:
All of the usage remains at 0.00%, even when streaming.
Details:
Jellyfin versions (obtained through the AUR):
OS Versions (I'm running Manjaro):
Hardware Acceleration Configuration:
(screenshot attached)
Outputs of the commands given in the hardware acceleration documentation:
(looks normal to me)
/usr/lib/jellyfin-ffmpeg/vainfo doesn't exist (even though /usr/lib/jellyfin-ffmpeg/does), but I can run regular vainfo:
which implies that the H264 codec *should* be supported.
And I have the items listed as required in the docs:
An example file that buffers
Running ffprobe on a file that buffered gave the following:
So the encoding looks like it's just normal h264.
Logs
An anonymized log is attached
- If hardware acceleration is working, will Jellyfin lower the resolution of the stream instead of buffering?
- In either case, how do I verify that hardware acceleration is actually happening?
I'm suspicious that hardware acceleration isn't working because of (1) the buffering and (2) when I check my GPU's usage with intel_gpu_top, I see this:
Code:
intel-gpu-top: Intel Dg2 (Gen12) @ /dev/dri/card0 - 0/ 0 MHz; 100% RC6; 0 irqs/s
IMC reads: 0 MiB/s
IMC writes: 0 MiB/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 0.00% | | 0% 0%
Blitter 0.00% | | 0% 0%
Video 0.00% | | 0% 0%
VideoEnhance 0.00% | | 0% 0%
[unknown] 0.00% |
All of the usage remains at 0.00%, even when streaming.
Details:
Jellyfin versions (obtained through the AUR):
Code:
jellyfin-bin 10.8.9-1
jellyfin-ffmpeg 1:6.0.1p8-1
OS Versions (I'm running Manjaro):
Code:
[me@jellyfin ~]$ lsb_release -a
LSB Version: n/a
Distributor ID: ManjaroLinux
Description: Manjaro Linux
Release: 24.0.7
Codename: Wynsdey
[me@jellyfin ~]$ mhwd-kernel -li
Currently running: 6.1.105-1-MANJARO (linux61)
Hardware Acceleration Configuration:
(screenshot attached)
Outputs of the commands given in the hardware acceleration documentation:
Code:
[me@jellyfin ~]$ ls -l /dev/dri
total 0
drwxr-xr-x 2 root root 80 Aug 25 13:15 by-path
crw-rw---- 1 root video 226, 0 Aug 25 13:15 card0
crw-rw-rw- 1 root render 226, 128 Aug 25 13:15 renderD128
(looks normal to me)
/usr/lib/jellyfin-ffmpeg/vainfo doesn't exist (even though /usr/lib/jellyfin-ffmpeg/does), but I can run regular vainfo:
Code:
$ sudo vainfo --display drm --device /dev/dri/renderD128
Trying display: drm
vainfo: VA-API version: 1.22 (libva 2.22.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSliceLP
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSliceLP
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile1 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileVP9Profile3 : VAEntrypointVLD
VAProfileHEVCMain12 : VAEntrypointVLD
VAProfileHEVCMain422_10 : VAEntrypointVLD
VAProfileHEVCMain422_10 : VAEntrypointEncSliceLP
VAProfileHEVCMain422_12 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointVLD
VAProfileHEVCMain444 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_10 : VAEntrypointVLD
VAProfileHEVCMain444_10 : VAEntrypointEncSliceLP
VAProfileHEVCMain444_12 : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointVLD
VAProfileHEVCSccMain : VAEntrypointEncSliceLP
VAProfileHEVCSccMain10 : VAEntrypointVLD
VAProfileHEVCSccMain10 : VAEntrypointEncSliceLP
VAProfileHEVCSccMain444 : VAEntrypointVLD
VAProfileHEVCSccMain444 : VAEntrypointEncSliceLP
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointEncSliceLP
VAProfileHEVCSccMain444_10 : VAEntrypointVLD
VAProfileHEVCSccMain444_10 : VAEntrypointEncSliceLP
which implies that the H264 codec *should* be supported.
Code:
$ sudo /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 14.1.1 (GCC) 20240720
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-chromaprint --enable-libfontconfig --enable-libass --enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-libopus --enable-libopenmpt --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-opencl --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
libavutil 58. 2.100 / 58. 2.100
libavcodec 60. 3.100 / 60. 3.100
libavformat 60. 3.100 / 60. 3.100
libavdevice 60. 1.100 / 60. 1.100
libavfilter 9. 3.100 / 9. 3.100
libswscale 7. 1.100 / 7. 1.100
libswresample 4. 10.100 / 4. 10.100
libpostproc 57. 1.100 / 57. 1.100
[AVHWDeviceContext @ 0x558b204ccfc0] libva: VA-API version 1.22.0
[AVHWDeviceContext @ 0x558b204ccfc0] libva: Trying to open /usr/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x558b204ccfc0] libva: Found init function __vaDriverInit_1_21
[AVHWDeviceContext @ 0x558b204ccfc0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x558b204ccfc0] Initialised VAAPI connection: version 1.22
[AVHWDeviceContext @ 0x558b204ccfc0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.5 ().
[AVHWDeviceContext @ 0x558b204ccfc0] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x558b204fe300] 0.0: Intel(R) OpenCL Graphics / Intel(R) Arc(TM) A310 LP Graphics
[AVHWDeviceContext @ 0x558b204fe300] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x558b204fe300] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x558b204fe300] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
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'
And I have the items listed as required in the docs:
An example file that buffers
Running ffprobe on a file that buffered gave the following:
Code:
ffprobe version n7.0.1 Copyright (c) 2007-2024 the FFmpeg developers
built with gcc 14.1.1 (GCC) 20240522
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-frei0r --enable-gmp --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libdvdnav --enable-libdvdread --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libharfbuzz --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e --enable-librsvg --enable-librubberband --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-vapoursynth --enable-version3 --enable-vulkan
libavutil 59. 8.100 / 59. 8.100
libavcodec 61. 3.100 / 61. 3.100
libavformat 61. 1.100 / 61. 1.100
libavdevice 61. 1.100 / 61. 1.100
libavfilter 10. 1.100 / 10. 1.100
libswscale 8. 1.100 / 8. 1.100
libswresample 5. 1.100 / 5. 1.100
libpostproc 58. 1.100 / 58. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '<<title>>.mp4':
Metadata:
major_brand : mp42
minor_version : 512
compatible_brands: mp42iso2avc1mp41
creation_time : 2024-07-04T16:27:07.000000Z
title : <<title>>
encoder : HandBrake 1.7.3 2024021100
Duration: 00:10:56.81, start: 0.000000, bitrate: 1891 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 1722 kb/s, 23.98 fps, 23.98 tbr, 90k tbn (default)
Metadata:
creation_time : 2024-07-04T16:27:07.000000Z
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 162 kb/s (default)
Metadata:
creation_time : 2024-07-04T16:27:07.000000Z
handler_name : Original
vendor_id : [0][0][0][0]
So the encoding looks like it's just normal h264.
Logs
An anonymized log is attached