pdulvp / jellyfin-qnap

Jellyfin server packaging for QNAP NAS
https://jellyfin.org
505 stars 33 forks source link

Libraries thumbnails missing, Skia not available #28

Closed gummykage closed 5 months ago

gummykage commented 2 years ago

Running on windows 10 jellyfin rotates the images after a full scan: image

On QNAP Jellyfin the images never appear: image

gummykage commented 2 years ago

This problem may be caused by the skia library not loading properly. https://github.com/jellyfin/jellyfin/issues/7617 The exact error code is:

[2022-09-22 16:46:49.614 -07:00] [WRN] [1] Emby.Server.Implementations.ApplicationHost: Skia not available. Will fallback to "NullImageEncoder".

This causes nonstop errors on the server: [2022-09-22 16:58:06.322 -07:00] [ERR] [63] Emby.Server.Implementations.Dto.DtoService: Failed to determine primary image aspect ratio for "/share/Dev1Partition2/Shows

@pdulvp if you have time could you look into this? Thank you! m( )m

waynepaulward commented 1 year ago

Is this issue fixed on [10.8.9-1]

waynepaulward commented 1 year ago

Ah thats a shame is there a way to add the library or a fix you think as i want to use this Do you not get the images changing on the tv show / film icons etc ...

pdulvp commented 1 year ago

see https://github.com/jellyfin/jellyfin-skiasharp-native

waynepaulward commented 1 year ago

Yes i can try and help if you like Im sorry if you think im not being polite ive no problem im just eager to fix. 😁Sent from my iPhoneOn 30 Jan 2023, at 09:15, pdulvp @.***> wrote: see https://github.com/jellyfin/jellyfin-skiasharp-native

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

gummykage commented 1 year ago

Thank you @pdulvp

waynepaulward commented 1 year ago

Is the skia fixed in the new release im currently on stable but would like to just waiting for the skia fix really eager to be part of this project!!!! Nice work on the new release !!!

waynepaulward commented 1 year ago

Does the skia sharp repository work on qnap 251 do i just add the repository and install the skia is there any docs for this please

wwwlicious commented 8 months ago

So the issue is caused by a missing dependency of libSkiaSharp.so.1, at least it was in my case with the error as above

[WRN] [1] Emby.Server.Implementations.ApplicationHost: Skia not available. Will fallback to "NullImageEncoder".

SSH onto QNAP server Go to the .qpkg jellyfin install directory and find the skiasharp library to make sure it is there.

[/share/<DATA_LOCATION>/.qpkg/jellyfin]> find . -name libSkiaSharp.so

./jellyfin/bin/libSkiaSharp.so

Now check its dependencies using ldd.

[/share/<DATA_LOCATION>/.qpkg/jellyfin/jellyfin/bin]> ldd libSkiaSharp.so

linux-vdso.so.1 (0x00007ffe4fd87000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f1f34fb5000)
libfontconfig.so.1 => not found
libdl.so.2 => /lib/libdl.so.2 (0x00007f1f34db1000)
libm.so.6 => /lib/libm.so.6 (0x00007f1f34aac000)
libc.so.6 => /lib/libc.so.6 (0x00007f1f34709000)
/lib64/ld-linux-x86-64.so.2 (0x00007f1f35ca8000)

libfontconfig.so.1 => not found is the reason why libSkiaSharp.so cannot load properly

the lib should be in the jellyfin-ffmpeg/lib folder.

[/share/<DATA_LOCATION>/.qpkg/jellyfin]> find . -name libfontconfig.so.1

./jellyfin-ffmpeg/lib/libfontconfig.so.1

Copy this file to the root /usr/lib folder.

[/share/<DATA_LOCATION>/.qpkg/jellyfin]> cp ./jellyfin-ffmpeg/lib/libfontconfig.so.1 /usr/lib

Confirm the library is now found by checking the dependencies again.

[/share/<DATA_LOCATION>/.qpkg/jellyfin/jellyfin/bin]> ldd libSkiaSharp.so
linux-vdso.so.1 (0x00007ffdd6c8c000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fef67e99000)
libfontconfig.so.1 => /lib/libfontconfig.so.1 (0x00007fef68d5a000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fef67c95000)
libm.so.6 => /lib/libm.so.6 (0x00007fef67990000)
libc.so.6 => /lib/libc.so.6 (0x00007fef675ed000)
/lib64/ld-linux-x86-64.so.2 (0x00007fef68b8c000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007fef6736a000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007fef67141000)
libuuid.so.1 => /lib/libuuid.so.1 (0x00007fef66f39000)
libz.so.1 => /lib/libz.so.1 (0x00007fef66d1f000)

Restart Jellyfin and you should see no more skiasharp errors but then it threw an error about not being able to load font.config when loading the UI.

Fontconfig error: Cannot load default config file
/share/<DATA_LOCATION>/.qpkg/jellyfin/jellyfin/bin/jellyfin: symbol lookup error: /usr/lib/libfontconfig.so.1: undefined symbol: FT_Get_Advance

I tried installing fontconfig via entware opkg install fontconfig and it worked but it had no effect on the erorr. I tried both versions of the libSkiaSharp.so in the nuget package but both still had libfontconfig.so.1 as a dependency.

In the end the only thing that worked was to use the version without fontconfig dependency. https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux.NoDependencies/

I downloaded this, unzipped, grabbed the libSkiaSharp.so for linux-x64 and replaced the one in the jellyfin/bin directory.

Restarted and no skiasharp loading error. loaded the UI and no fontconfig error.

robotreto commented 8 months ago

@wwwlicious nailed it!

In the end the only thing that worked was to use the version without fontconfig dependency. https://www.nuget.org/packages/SkiaSharp.NativeAssets.Linux.NoDependencies/

I downloaded this, unzipped, grabbed the libSkiaSharp.so for linux-x64 and replaced the one in the jellyfin/bin directory.

Restarted and no skiasharp loading error. loaded the UI and no fontconfig error.

followed above instructions, and the zillions of logfile error entries are gone! Many Kudos to Glasgow!

@pdulvp : shouldn't this dependency problem be fixed in the source package ?

pdulvp commented 5 months ago

I didn't reproduce now with the last fixes I made for the 10.9.0 release.

gummykage commented 5 months ago

Wow some serious effort to get the skia library working. I will try these myself.