HEVC via QSV - theMAXuser - 2023-09-24
Hello, I have always had issues with hardware transcodes. This usually crashes the server requiring a restart. Please let me know if this is a config item or if the ffmpeg package can be updated to resolve. This usually happens within 20 minutes of starting a stream but is very sporadic. Sometimes it doesn't happen and sometimes it can take hours (I tested by playing random movies on mute in background. It seems to happen more on the webclient but can happen with iphone app or roku app as well. Thanks for taking a look.
edit: for additional context, this error has always happened in the past year of my JF usage across previous versions as well. I just fixed it via restart script but hoping to fully resolve one day.
Trancode Log
Code: [hls @ 0x55bf3a7123c0] Opening '/transcode/104f458ec3cb8c616491366f1d64c4c7367.ts' for writing
frame= 7827 fps=167 q=17.0 size=N/A time=00:05:26.46 bitrate=N/A speed=6.98x
[hls @ 0x55bf3a7123c0] Opening '/transcode/104f458ec3cb8c616491366f1d64c4c7368.ts' for writing
[hevc @ 0x55bf3a8d83c0] Failed to end picture decode issue: 23 (internal decoding error).
[hevc @ 0x55bf3a8d83c0] hardware accelerator failed to decode picture
[h264_qsv @ 0x55bf3a6f9e00] Error during encoding: device failed (-17)
Error submitting video frame to the encoder
[libfdk_aac @ 0x55bf3a6fcc40] 2 frames left in the queue on closing
Main Log
Code: [2023-09-24 16:56:18.225 +00:00] [ERR] [145] Jellyfin.Api.Helpers.TranscodingJobHelper: FFmpeg exited with code 1
OpenCL Runtime status
Code: root@jellyfin:/usr/lib/jellyfin-ffmpeg# ./ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va
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 @ 0x5631e057e4c0] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x5631e057e4c0] libva: VA-API version 1.19.0
[AVHWDeviceContext @ 0x5631e057e4c0] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x5631e057e4c0] libva: Found init function __vaDriverInit_1_19
[AVHWDeviceContext @ 0x5631e057e4c0] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x5631e057e4c0] Initialised VAAPI connection: version 1.19
[AVHWDeviceContext @ 0x5631e057e4c0] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 23.3.2 (95dc859).
[AVHWDeviceContext @ 0x5631e057e4c0] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x5631e05a2000] 0.0: Intel(R) OpenCL HD Graphics / Intel(R) UHD Graphics 630 [0x3e92]
[AVHWDeviceContext @ 0x5631e05a2000] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x5631e05a2000] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x5631e05a2000] 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'
Version
Code: root@jellyfin:/usr/lib/jellyfin-ffmpeg# jellyfin
[17:20:54] [INF] [4] Main: Jellyfin version: 10.8.11
[17:20:54] [INF] [4] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /usr/lib/jellyfin-ffmpeg/jellyfin/log]"]
[17:20:54] [INF] [4] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll"]
[17:20:54] [INF] [4] Main: Operating system: Linux
[17:20:54] [INF] [4] Main: Architecture: X64
[17:20:54] [INF] [4] Main: 64-Bit Process: True
[17:20:54] [INF] [4] Main: User Interactive: True
[17:20:54] [INF] [4] Main: Processor count: 3
[17:20:54] [INF] [4] Main: Program data path: /usr/lib/jellyfin-ffmpeg/jellyfin
[17:20:54] [INF] [4] Main: Web resources path: /usr/lib/jellyfin/bin/jellyfin-web
[17:20:54] [INF] [4] Main: Application directory: /usr/lib/jellyfin/bin/
[17:20:54] [ERR] [4] Main: The server is expected to host the web client, but the provided content directory is either invalid or empty: /usr/lib/jellyfin/bin/jellyfin-web. If you do not want to host the web client with the server, you may set the '--nowebclient' command line flag, or set'hostwebclient=false' in your config settings.
[17:20:54] [INF] [2] Main: Received a SIGTERM signal, shutting down
RE: HEVC via QSV - TheDreadPirate - 2023-09-24
What OS is the server running?
What CPU/GPU is your server using?
What version of jellyfin?
Does this happen with all media? Certain media? What codecs?
Can we see the full ffmpeg and jellyfin logs? Sanitize any IPs/domains (leave placeholders so we know used to be there) and upload it to pastebin.
|