jellyfin-qnap icon indicating copy to clipboard operation
jellyfin-qnap copied to clipboard

Libraries thumbnails missing, Skia not available

Open gummykage opened this issue 2 years ago • 10 comments

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

On QNAP Jellyfin the images never appear: image

gummykage avatar Sep 22 '22 01:09 gummykage

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

gummykage avatar Sep 23 '22 00:09 gummykage

Is this issue fixed on [10.8.9-1]

waynepaulward avatar Jan 27 '23 00:01 waynepaulward

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 ...

waynepaulward avatar Jan 29 '23 21:01 waynepaulward

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

pdulvp avatar Jan 30 '23 08:01 pdulvp

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: @.***>

waynepaulward avatar Jan 30 '23 09:01 waynepaulward

Thank you @pdulvp

gummykage avatar Feb 23 '23 23:02 gummykage

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 avatar Feb 25 '23 00:02 waynepaulward

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

waynepaulward avatar Apr 07 '23 00:04 waynepaulward

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.

wwwlicious avatar Feb 24 '24 23:02 wwwlicious

@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 ?

robotreto avatar Mar 04 '24 11:03 robotreto

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

pdulvp avatar May 12 '24 23:05 pdulvp

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

gummykage avatar May 13 '24 12:05 gummykage