Jellyfin Forum
Transcoding fails with FFmpeg exit code 187 - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Transcoding fails with FFmpeg exit code 187 (/t-transcoding-fails-with-ffmpeg-exit-code-187)

Pages: 1 2


Transcoding fails with FFmpeg exit code 187 - stef4n24 - 2024-09-18

Hey! My Jellyfin instance works just fine to watch movies or tv shows with direct streaming, but switching video quality options will crash the player, and trying to restart the video will show "Playback failed due to a fatal player error."

I'm running Ubuntu Server on an old Lenovo Ideacentre PC (not AIO) with an i5-7400 using VA-API with these options enabled:
Enable hardware decoding for
H264
HEVC
MPEG2
VC1
VP8
VP9
HEVC 10bit
VP9 10bit

Hardware encoding options
Enable hardware encoding
Enable Intel Low-Power H.264 hardware encoder
Enable Intel Low-Power HEVC hardware encoder


RE: Transcoding fails with FFmpeg exit code 187 - TheDreadPirate - 2024-09-18

Can you share your ffmpeg log from one of these failed transcodes via pastebin?


RE: Transcoding fails with FFmpeg exit code 187 - TheDreadPirate - 2024-09-18

Also, can you try disabling low power encoding? That requires extra steps to setup that, I suspect, haven't been taken.

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#configure-and-verify-lp-mode-on-linux


RE: Transcoding fails with FFmpeg exit code 187 - stef4n24 - 2024-09-18

I've attached the transcode logs.
I've also followed the guide to enable low power encoding, but for some reason running sudo cat /sys/kernel/debug/dri/0/gt/uc/guc_info (i've tried replacing 0 with 1 & 12Nerd-face prints "No such file or directory"


RE: Transcoding fails with FFmpeg exit code 187 - TheDreadPirate - 2024-09-18

Any particular reason you are using vanilla ffmpeg instead of jellyfin-ffmpeg? And VAAPI instead of QSV?

Also try searching for this path for the guc/huc_info path.

/sys/kernel/debug/dri/0/gt0/uc/guc_info #huc_info should also be here

Note the "gt0" instead of "gt". AFAIK, this has been the path for single GPU systems for both Ubuntu 22.04 and 24.04.


RE: Transcoding fails with FFmpeg exit code 187 - stef4n24 - 2024-09-18

It happens with QSV instead of VA-API too, I had it on QSV initially; I don't remember switching from jellyfin-ffmpeg to ffmpeg though, I'll replace it right now and check out if that fixes anything

That path also does not work


RE: Transcoding fails with FFmpeg exit code 187 - TheDreadPirate - 2024-09-18

What do you see when you run "ls -l /sys/kernel/debug/dri/"?


RE: Transcoding fails with FFmpeg exit code 187 - stef4n24 - 2024-09-18

Now I get a different encoding error:
ffmpeg version 6.0.1-Jellyfin Copyright © 2000-2023 the FFmpeg developers
built with gcc 13 (Ubuntu 13.2.0-23ubuntu4)
configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --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-opencl --enable-libdrm --enable-libxml2 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --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 @ 0x6220bbe59e80] No VA display found for any default device.
Device creation failed: -22.
Failed to set value 'vaapi=va:,kernel_driver=i915,driver=iHD' for option 'init_hw_device': Invalid argument
Error parsing global options: Invalid argument


Running ls -l /sys/kernel/debug/dri/ prints:
total 0
drwxr-xr-x 14 root root 0 Sep 18 18:08 0000:00:02.0
lrwxrwxrwx 1 root root 0 Sep 18 18:08 1 -> 0000:00:02.0
lrwxrwxrwx 1 root root 0 Sep 18 18:08 128 -> 0000:00:02.0


RE: Transcoding fails with FFmpeg exit code 187 - TheDreadPirate - 2024-09-18

The correct path should be

/sys/kernel/debug/dri/1/gt0/uc/guc_info # and huc_info

The error you're getting is probably due to low power encoding not being fully setup. But I'd need the full log to see what command it was trying to run. For the record, your iGPU only supports low power encoding for H264.


RE: Transcoding fails with FFmpeg exit code 187 - stef4n24 - 2024-09-18

Yep, that path works and returns that both GuC and HuC firmwares are running;
Here's the full log, and I've now set low power encoding only for H264