nicknsy / jellyscrub

Smooth mouse-over video scrubbing previews for Jellyfin.
MIT License
672 stars 27 forks source link

Access to the path '/mnt/mediaStorage/data/movies/Interstellar (2014)/trickplay' is denied #137

Closed jschmidt02 closed 8 months ago

jschmidt02 commented 8 months ago

I use Proxmox with Jellyfin, Radarr, Sonarr etc in a separate priviliged LXC. I installed the Jellyscrub and Intro Skipper Plugin (incase it matters). First Jellyscrub didnt inject the script correctly so I did it manually but I figured that it still didn't work.

So I checked the logs and get errors in every folder that "trickplay" is trying accessing to. Every show and movie.

"/mnt/mediaStorage" is added through a mountpoint, the folders are created on the proxmox shell itself. (Up to the point of "/shows" and "/movies")

EDIT: I changed the setting to save it not in the same directory as the media files., but it still does not work. Logfiles arent showing any errors anymore tho...

[2024-01-20 03:16:58.164 +01:00] [INF] Creating trickplay files at 320 width, for "/mnt/mediaStorage/data/movies/Interstellar (2014)/Interstellar (2014).mkv" [ID: ab8d9137-5469-c57b-ed0f-26c64d14dc59] [2024-01-20 03:16:58.165 +01:00] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -autorotate 0 -i file:"/mnt/mediaStorage/data/movies/Interstellar (2014)/Interstellar (2014).mkv" -autoscale 0 -an -sn -vf "fps=1/10,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=w=320:h=180:format=nv12:extra_hw_frames=24,hwmap=mode=read,format=nv12" -threads 0 -c:v mjpeg -f image2 "/var/cache/jellyfin/temp/94a21b8d1f2f4653986181c08f2038de/img_%08d.jpg" [2024-01-20 03:16:58.165 +01:00] [INF] Setting generation process priority to BelowNormal [2024-01-20 03:24:06.284 +01:00] [ERR] Error while creating BIF file System.UnauthorizedAccessException: Access to the path '/mnt/mediaStorage/data/movies/Interstellar (2014)/trickplay' is denied. ---> System.IO.IOException: Permission denied

EDIT: Had a permission issue with HWA but I got it right. Still got errors:

[2024-01-20 23:04:52.670 +01:00] [INF] Creating trickplay files at 320 width, for "/mnt/mediaStorage/data/shows/Reacher/Staffel 2/Reacher - S02E01 - ATM.mkv" [ID: 71cb3f8b-bc89-5481-6ba7-fa96ca591785] [2024-01-20 23:04:52.695 +01:00] [INF] /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -threads 0 -autorotate 0 -i file:"/mnt/mediaStorage/data/shows/Reacher/Staffel 2/Reacher - S02E01 - ATM.mkv" -an -sn -vf

nicknsy commented 8 months ago

I haven't used Proxmox containers personally but the permission issue is likely due to a misconfiguration on the attached volume (e.g. container only has read permission in Proxmox) or the jellyfin container is running as a user that does not have permission at a filesystem level. For instance, linuxserver.io containers by default run processes as non-root users, so it may be that the movie files are owned by a separate user from the one running jellyfin. You should be able to check by attaching a terminal to the jellyfin container and doing ls -la /mnt/mediaStorage/data/shows/ and then ps aux to see if the users/groups match up.

As for your second edit, those are just info logs about generation. If you look for shows that have logged "trickplay generation complete for..." and go to them in jellyfin do you not see previews? If so, make sure that you have cleared your browser cache & cookies for the jellyfin website as the client script may not be running.

jschmidt02 commented 8 months ago

I haven't used Proxmox containers personally but the permission issue is likely due to a misconfiguration on the attached volume (e.g. container only has read permission in Proxmox) or the jellyfin container is running as a user that does not have permission at a filesystem level. For instance, linuxserver.io containers by default run processes as non-root users, so it may be that the movie files are owned by a separate user from the one running jellyfin. You should be able to check by attaching a terminal to the jellyfin container and doing ls -la /mnt/mediaStorage/data/shows/ and then ps aux to see if the users/groups match up.

As for your second edit, those are just info logs about generation. If you look for shows that have logged "trickplay generation complete for..." and go to them in jellyfin do you not see previews? If so, make sure that you have cleared your browser cache & cookies for the jellyfin website as the client script may not be running.

The folders are owned but root:root drwxrwxrwx 4 root root 4096 Jan 20 19:47 drwxrwxrwx 6 root root 4096 Jan 19 11:10 drwxr-xr-x 3 root root 4096 Jan 20 19:47 Reacher drwxr-xr-x 5 root root 4096 Jan 19 22:53 'The Simpsons'

And PID of Jellyfin is 1299 jellyfin 1299 0.0 3.2 4356876 268492 ? Ssl 00:02 1:35 /usr/bin/jell

Changing ownership of the storage path to 1299 would probably break sonarr/radarr, tho I'm not sure. But is it still needed if I opt out the settings to save the BIF file in the same directory of the media?

I do not see any previews, only the default 5 min intervall previews, tho sometimes the smaller box of probably jellyscrub pops up, not shows a grey picture.

nicknsy commented 8 months ago

I haven't used Proxmox containers personally but the permission issue is likely due to a misconfiguration on the attached volume (e.g. container only has read permission in Proxmox) or the jellyfin container is running as a user that does not have permission at a filesystem level. For instance, linuxserver.io containers by default run processes as non-root users, so it may be that the movie files are owned by a separate user from the one running jellyfin. You should be able to check by attaching a terminal to the jellyfin container and doing ls -la /mnt/mediaStorage/data/shows/ and then ps aux to see if the users/groups match up. As for your second edit, those are just info logs about generation. If you look for shows that have logged "trickplay generation complete for..." and go to them in jellyfin do you not see previews? If so, make sure that you have cleared your browser cache & cookies for the jellyfin website as the client script may not be running.

The folders are owned but root:root drwxrwxrwx 4 root root 4096 Jan 20 19:47 drwxrwxrwx 6 root root 4096 Jan 19 11:10 drwxr-xr-x 3 root root 4096 Jan 20 19:47 Reacher drwxr-xr-x 5 root root 4096 Jan 19 22:53 'The Simpsons'

And PID of Jellyfin is 1299 jellyfin 1299 0.0 3.2 4356876 268492 ? Ssl 00:02 1:35 /usr/bin/jell

Changing ownership of the storage path to 1299 would probably break sonarr/radarr, tho I'm not sure. But is it still needed if I opt out the settings to save the BIF file in the same directory of the media?

I do not see any previews, only the default 5 min intervall previews, tho sometimes the smaller box of probably jellyscrub pops up, not shows a grey picture.

It's not needed if you're storing it in the jellyfin metadata folders.

On your browser if you open up Developer Tools / Inspect Element and go to the Console window do you see log messages produced by the jellyscrub script when you click on a video that has finished generation?

jschmidt02 commented 8 months ago

I haven't used Proxmox containers personally but the permission issue is likely due to a misconfiguration on the attached volume (e.g. container only has read permission in Proxmox) or the jellyfin container is running as a user that does not have permission at a filesystem level. For instance, linuxserver.io containers by default run processes as non-root users, so it may be that the movie files are owned by a separate user from the one running jellyfin. You should be able to check by attaching a terminal to the jellyfin container and doing ls -la /mnt/mediaStorage/data/shows/ and then ps aux to see if the users/groups match up. As for your second edit, those are just info logs about generation. If you look for shows that have logged "trickplay generation complete for..." and go to them in jellyfin do you not see previews? If so, make sure that you have cleared your browser cache & cookies for the jellyfin website as the client script may not be running.

The folders are owned but root:root drwxrwxrwx 4 root root 4096 Jan 20 19:47 drwxrwxrwx 6 root root 4096 Jan 19 11:10 drwxr-xr-x 3 root root 4096 Jan 20 19:47 Reacher drwxr-xr-x 5 root root 4096 Jan 19 22:53 'The Simpsons' And PID of Jellyfin is 1299 jellyfin 1299 0.0 3.2 4356876 268492 ? Ssl 00:02 1:35 /usr/bin/jell Changing ownership of the storage path to 1299 would probably break sonarr/radarr, tho I'm not sure. But is it still needed if I opt out the settings to save the BIF file in the same directory of the media? I do not see any previews, only the default 5 min intervall previews, tho sometimes the smaller box of probably jellyscrub pops up, not shows a grey picture.

It's not needed if you're storing it in the jellyfin metadata folders.

On your browser if you open up Developer Tools / Inspect Element and go to the Console window do you see log messages produced by the jellyscrub script when you click on a video that has finished generation?

Omg I'm dumb. I needed to inject the script manually and I did before the opening body tag instead of the closing body tag. I placed it at the right side, ran a BIF Generating Job to be sure and it works after around 5-10 Seconds into a video. I guess I would have never looked at it, because I thought I placed it at the right place.

Now the script is not at the end of the body tag (but I placed it there) but in the middle of the body tag, along with a