Jellyfin Forum
SOLVED: FFmpeg exits with code 187 when playing select files - 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: SOLVED: FFmpeg exits with code 187 when playing select files (/t-solved-ffmpeg-exits-with-code-187-when-playing-select-files)

Pages: 1 2


FFmpeg exits with code 187 when playing select files - BajaSlap - 2024-11-11

Hello all, brand new to this world and relatively new to linux.

I have Jellyfin running on Ubuntu server with a gen 4 i5 and an intel arc a310.
If I have hardware transcoding enabled, some files' playback will immediately fail due to a "fatal playback error"

In my docker logs I see that FFmpeg exits with code 187 along with a stack trace that I can't really make sense of.

The other strange thing I noticed is that it doesn't seem to happen to all users. I had one friend test one of the files out from his house over openVPN and it was able to play.

I've attached the docker logs related to this error


RE: FFmpeg exits with code 187 when playing select files - crobibero - 2024-11-11

Please attach the ffmpeg log and your hardware acceleration configuration


RE: FFmpeg exits with code 187 when playing select files - BajaSlap - 2024-11-11

Thanks for the reply.

Attached is the logs from ffmpeg when the file fails to load and my current encoding configuration file.

Let me know if you need anything else


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2024-11-11

Did you pass the GPU into the container? Can you share your docker compose?


RE: FFmpeg exits with code 187 when playing select files - BajaSlap - 2024-11-11

I certainly tried to - here is my docker-compose

Edit: updated my signature to include my hardware details in my initial post


RE: FFmpeg exits with code 187 when playing select files - theguymadmax - 2024-11-11

Code:
<AllowAv1Encoding>false</AllowAv1Encoding>
You're using your cpu to encode AV1, that's why it's failing. Go to Dashboard-> Playback->Transcoding and select "Allow encoding in HEVC format".


RE: FFmpeg exits with code 187 when playing select files - BajaSlap - 2024-11-11

I enabled both hardware encoding and checked the boxes for allowing both HEVC and AV1 because you mentioned both in your post. I have the same result unfortunately.

I have attached the ffmpeg logs from the attempt with those configuration changes as well as the new config file.


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2024-11-11

Since you are not running the container as root, you need to pass in the render group.

Code:
getent group render | cut -d: -f3

Code:
group_add:
      - "122" # Change this to match your "render" host group id and remove this comment



RE: FFmpeg exits with code 187 when playing select files - BajaSlap - 2024-11-11

That did it, thank you!

I marked this issue as solved.


RE: FFmpeg exits with code 187 when playing select files - Ch3ck3rM0n - 2025-01-20

Hi all,

I have a similar issue like the thread owner and I tried different solutions but nothing worked for me. It is still crashing when I try to play my movie. The permissions should be fine and "Allow encoding in HEVC format" (also AV1) is activated.

Code:
root@jellyfin:~# cat /etc/group | grep render
render:x:993:root,jellyfin
root@jellyfin:~# getent group render | cut -d: -f3
993

I am running Jellyfin in a Proxmox container and gpu accelerator should be forwarded. I set inside config the "QSV Device" to use "/dev/dri/renderD133" to be sure it is using a free device, because the first and second are already bind to other containers/vms. I activated both tone mappings and the supported codecs for my i7-12650h.

Code:
root@jellyfin:~# lspci -nn | grep -Ei "3d|display|vga"
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.1 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.2 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.3 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.4 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.5 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.6 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
00:02.7 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT1 [UHD Graphics] [8086:46a3] (rev 0c)
root@jellyfin:~# ll /dev/dri/
total 0
drwxr-xr-x  3 root root        300 Jan 20 16:08 ./
drwxr-xr-x 10 root root        660 Jan 20 21:00 ../
drwxr-xr-x  2 root root        280 Jan 20 16:08 by-path/
crw-rw----  1 root video  226,  1 Jan 20 16:08 card1
crw-rw----  1 root video  226,  3 Jan 20 16:08 card3
crw-rw----  1 root video  226,  4 Jan 20 16:08 card4
crw-rw----  1 root video  226,  5 Jan 20 16:08 card5
crw-rw----  1 root video  226,  6 Jan 20 16:08 card6
crw-rw----  1 root video  226,  7 Jan 20 16:08 card7
crw-rw----  1 root _ssh  226, 128 Jan 20 16:08 renderD128
crw-rw----  1 root _ssh  226, 131 Jan 20 16:08 renderD131
crw-rw----  1 root _ssh  226, 132 Jan 20 16:08 renderD132
crw-rw----  1 root _ssh  226, 133 Jan 20 16:08 renderD133
crw-rw----  1 root _ssh  226, 134 Jan 20 16:08 renderD134
crw-rw----  1 root _ssh  226, 135 Jan 20 16:08 renderD135