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


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2025-01-21

Your GPU does not support AV1 encoding.

But that isn't the problem. Why do you have so many GPUs?

With LXC's, you need to install all of the intel drivers on the host.

https://jellyfin.org/docs/general/administration/hardware-acceleration/intel/#lxc-on-proxmox


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

First of all I found the issue and now it is working. Your link give me the last kick in the ass to find out :-D
It was a permission error. I don't know why but the renderD*s have been part of the wrong group "_ssh" and not "render".

Code:
root@jellyfin:/dev/dri# ll
total 0
drwxr-xr-x  3 root root      220 Jan 21 17:27 ./
drwxr-xr-x 10 root root      660 Jan 21 17:48 ../
drwxr-xr-x  2 root root      200 Jan 21 17:27 by-path/
crw-rw----  1 root video 226,  1 Jan 20 16:08 card1
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, 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

To fix it, I got two options "changing ownership" or "add jellyfin to _ssh group". I changed the ownership and now the movie is streaming. So thank you for the second look, sometimes it needs more eyes on it.

Anyway, to answer your questions about so many GPUs. It is because of DKMS:
https://github.com/strongtz/i915-sriov-dkms/blob/master/README.md

It is modifing the official kernel to passphrough graphic card to virtual machine (for me two Windows 11 hosts), explained here:
https://www.derekseaman.com/2024/07/proxmox-ve-8-2-windows-11-vgpu-vt-d-passthrough-with-intel-alder-lake.html

But about AV1 are you sure? The monkey say it supports the codec: https://www.cpu-monkey.com/en/cpu-intel_core_i7_12650h


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2025-01-21

It supports AV1 DECODING. Not AV1 encoding.


RE: FFmpeg exits with code 187 when playing select files - stewey - 2025-02-07

(2024-11-11, 05:35 PM)TheDreadPirate Wrote: 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

How do I do this on a Synology with DSM 7.2.2?  

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

and got
Code:
-sh: getent: command not found

Thanks!


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2025-02-07

(2025-02-07, 04:57 AM)stewey Wrote:
(2024-11-11, 05:35 PM)TheDreadPirate Wrote: 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

How do I do this on a Synology with DSM 7.2.2?  

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

and got
Code:
-sh: getent: command not found

Thanks!

Follow this guide in the walkthrough sub-forum.

https://forum.jellyfin.org/t-guide-running-jellyfin-in-synology-s-dsm-7-using-docker-compose


RE: FFmpeg exits with code 187 when playing select files - stewey - 2025-02-08

(2025-02-07, 01:26 PM)TheDreadPirate Wrote:
(2025-02-07, 04:57 AM)stewey Wrote:
(2024-11-11, 05:35 PM)TheDreadPirate Wrote: 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

How do I do this on a Synology with DSM 7.2.2?  

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

and got
Code:
-sh: getent: command not found

Thanks!

Follow this guide in the walkthrough sub-forum.

https://forum.jellyfin.org/t-guide-running-jellyfin-in-synology-s-dsm-7-using-docker-compose

Thanks for the link.  If I setup the container to run as root, as the decribed in that guide, the transcoding error I had goes away. 

I'm brand new to docker & NAS in general and noticed some of the guides I've seen suggest running containers as a limited user, I guess for security benefits?  So that's what I assumed was 'better', and I thought I'd try that first.  That lead to the transcoding error, ffmpeg exit code 187 I ran into.  Googling that & jellyfin eventually brought me here.

Reading through this thread, your post I quoted helped the OP get transcoding working while running the container as non-root.  So I tried running the same command to get the group ID I need to add to get transcoding working, and I got the error I noted. 

So wondering how to run that command/get the needed group ID info on a Synology.  

Thanks again!


RE: FFmpeg exits with code 187 when playing select files - TheDreadPirate - 2025-02-10

If "getent" isn't available, you can just read the group file.

Code:
grep render /etc/group

Code:
chris@rat-trap:~/git/jellyfin-web$ grep render /etc/group
render:x:993:chris,jellyfin

In my case, the render group uses ID 993.


RE: FFmpeg exits with code 187 when playing select files - stewey - 2025-02-11

Thanks for the reply.

I tried the following, but got no results.
Code:
grep render /etc/group

After some googling found that I might try 'video' instead of 'render' and got the following result:
Code:
nosw@DS920:/$ grep render /etc/group
nosw@DS920:/$ grep video /etc/group
videodriver:x:937:PlexMediaServer

Using 937 works, but wondering should I see some mention of jellyfin as in your example?


EDIT to add: Should I be making a new thread?


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

It's fine to keep posting here.

For Docker, a Jellyfin user is not created like it would in a bare metal Linux install. But I manually created one, and run my container as this manually created Jellyfin user, so that I can restrict access to just my media. Since my user has more permissions that a Jellyfin container would need.

So you would NOT see "Jellyfin" when you are looking for the video/render group.


RE: FFmpeg exits with code 187 when playing select files - stewey - 2025-02-12

Got it, Thanks again!