Jump to content

DNG Photos not displaying on v3.5+


marcelolagos

Recommended Posts

alucryd

We're not using the ImageMagick binaries from your system, we're directly using the MagickWand library via C# bindings. A such, we're shipping our own library in the package. This library is correctly detected on my FreeBSD VM, but maybe I missed some dependency in the package we're publishing. Could you please run the following on your system?

cd /usr/local/lib/emby-server/lib
export LD_LIBRARY_PATH=$(pwd)
ldd libMagickWand-6.Q8.so.6.0.0

You'll get something like this:

libMagickWand-6.Q8.so.6.0.0:
    libMagickCore-6.Q8.so.6 => /usr/local/lib/emby-server/lib/libMagickCore-6.Q8.so.6 (0x801400000)
    libtiff.so.5 => /usr/local/lib/libtiff.so.5 (0x80195e000)
    libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x801bd8000)
    libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x801e6b000)
    libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x8020a6000)
    libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x8022ed000)
    libwebpmux.so.3 => /usr/local/lib/libwebpmux.so.3 (0x8025a3000)
    libwebp.so.7 => /usr/local/lib/libwebp.so.7 (0x8027ad000)
    libraw_r.so.16 => /usr/local/lib/libraw_r.so.16 (0x802a3c000)
    liblcms2.so.2 => /usr/local/lib/liblcms2.so.2 (0x802d38000)
    libz.so.6 => /lib/libz.so.6 (0x802f94000)
    libgomp.so.1 => /usr/local/lib/gcc6/libgomp.so.1 (0x8031ac000)
    libm.so.5 => /lib/libm.so.5 (0x8033d8000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x803605000)
    libthr.so.3 => /lib/libthr.so.3 (0x803814000)
    libc.so.7 => /lib/libc.so.7 (0x800823000)
    liblzma.so.5 => /usr/lib/liblzma.so.5 (0x803a3c000)
    libjbig.so.2 => /usr/local/lib/libjbig.so.2 (0x803c65000)
    libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x803e72000)
    libbz2.so.4 => /usr/lib/libbz2.so.4 (0x80409c000)
    libc++.so.1 => /usr/lib/libc++.so.1 (0x8042b0000)
    libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x80457e000)
    libdl.so.1 => /usr/lib/libdl.so.1 (0x80479d000)

If something is "not found" that will be the issue. Quick question, are you on the latest or quarterly release cycle? Our packages are based on latest.

Link to comment
Share on other sites

marcelolagos

No missing dependencies that I can see.

root@emby:/usr/local/lib/emby-server/lib # cd /usr/local/lib/emby-server/lib/
root@emby:/usr/local/lib/emby-server/lib # setenv LD_LIBRARY_PATH /usr/local/lib/emby-server/lib
root@emby:/usr/local/lib/emby-server/lib # ldd libMagickWand-6.Q8.so.6.0.0
libMagickWand-6.Q8.so.6.0.0:
        libMagickCore-6.Q8.so.6 => /usr/local/lib/emby-server/lib/libMagickCore-6.Q8.so.6 (0x801400000)
        libtiff.so.5 => /usr/local/lib/libtiff.so.5 (0x80195e000)
        libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x801bd8000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x801e47000)
        libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x802082000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x8022c9000)
        libwebpmux.so.3 => /usr/local/lib/libwebpmux.so.3 (0x80257f000)
        libwebp.so.7 => /usr/local/lib/libwebp.so.7 (0x802789000)
        libraw_r.so.16 => /usr/local/lib/libraw_r.so.16 (0x802a18000)
        liblcms2.so.2 => /usr/local/lib/liblcms2.so.2 (0x802d14000)
        libz.so.6 => /lib/libz.so.6 (0x802f70000)
        libgomp.so.1 => /usr/local/lib/compat/libgomp.so.1 (0x803188000)
        libm.so.5 => /lib/libm.so.5 (0x803390000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x8035bd000)
        libthr.so.3 => /lib/libthr.so.3 (0x8037cc000)
        libc.so.7 => /lib/libc.so.7 (0x800823000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x8039f4000)
        libjbig.so.2 => /usr/local/lib/libjbig.so.2 (0x803c1d000)
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x803e2a000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x804054000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x804268000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x804536000)
root@emby:/usr/local/lib/emby-server/lib #
I had to use setenv as I don't have export.

 

And using the default: quarterly.

root@emby:/usr/local/lib/emby-server/lib # cat /etc/pkg/FreeBSD.conf
# $FreeBSD: releng/11.2/etc/pkg/FreeBSD.conf 333474 2018-05-10 23:58:33Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
root@emby:/usr/local/lib/emby-server/lib #
To see if it helped, I changed to latest and upgraded.

ldd did not show any missing dependencies either, and the log from emby server still shows it can't find ImageMagick. (Attaching log).

embyserver.txt

Link to comment
Share on other sites

alucryd

Thanks for the feedback, I'm at a loss, will try to get more log out of emby about potential failures while trying to load ImageMagick.

Link to comment
Share on other sites

makarai

Is the "libdl.so.1 => /usr/lib/libdl.so.1 (0x80479d000)" importatnt as i dont see them on my freenas or your freebsd installation ?

Edited by makarai
Link to comment
Share on other sites

alucryd

@makarai: I would say no, it's not directly required by both imagemagick libs. It is a dep of libgomp from gcc though. I see that @marcelalolagos has libgomp.so.1 => /usr/local/lib/compat/libgomp.so.1, while I have /usr/local/lib/gcc6/libgomp.so.1 so this is why you don't see libdl.so. Do you have a gcc package installed? Just realized I still had gcc6 while regular gcc is available. I'll rebuild imagemagick with gcc 7.

readelf -d libMagickWand-6.Q8.so

Dynamic section at offset 0xde9a0 contains 38 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libMagickCore-6.Q8.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libtiff.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libjpeg.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libpng16.so.16]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libwebpmux.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libwebp.so.7]
 0x0000000000000001 (NEEDED)             Shared library: [libraw_r.so.16]
 0x0000000000000001 (NEEDED)             Shared library: [liblcms2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgomp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libthr.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.7]
readelf -d libMagickCore-6.Q8.so

Dynamic section at offset 0x3542c0 contains 37 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libtiff.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libjpeg.so.8]
 0x0000000000000001 (NEEDED)             Shared library: [libpng16.so.16]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libwebpmux.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libwebp.so.7]
 0x0000000000000001 (NEEDED)             Shared library: [libraw_r.so.16]
 0x0000000000000001 (NEEDED)             Shared library: [liblcms2.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.5]
 0x0000000000000001 (NEEDED)             Shared library: [libgomp.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libthr.so.3]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.7]

@@adrianwi RAW support is needed for DNG so you should get it as well when this works as expected.

  • Like 1
Link to comment
Share on other sites

makarai

@@Luke @@alucryd

 

after i installed gcc7 (pkg install gcc7) on my freenas Jail the speed issue (of displaying images) seems to be gone. Not sure if the actual bug is fixed or if its just a random fluke. But what i describe here https://emby.media/community/index.php?/topic/66010-36073-movie-list-loading-slow/ is not present.

 

Also my list is 

root@emby-server-beta74:~ # cd /usr/local/lib/emby-server/lib/
root@emby-server-beta74:/usr/local/lib/emby-server/lib # setenv LD_LIBRARY_PATH /usr/local/lib/emby-server/lib
root@emby-server-beta74:/usr/local/lib/emby-server/lib # ldd libMagickWand-6.Q8.so.6.0.0
libMagickWand-6.Q8.so.6.0.0:
        libMagickCore-6.Q8.so.6 => /usr/local/lib/emby-server/lib/libMagickCore-6.Q8.so.6 (0x801400000)
        libtiff.so.5 => /usr/local/lib/libtiff.so.5 (0x80195e000)
        libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x801bd8000)
        libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x801e6b000)
        libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0x8020a6000)
        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x8022ee000)
        libwebpmux.so.3 => /usr/local/lib/libwebpmux.so.3 (0x8025a5000)
        libwebp.so.7 => /usr/local/lib/libwebp.so.7 (0x8027af000)
        libraw_r.so.16 => /usr/local/lib/libraw_r.so.16 (0x802a3e000)
        liblcms2.so.2 => /usr/local/lib/liblcms2.so.2 (0x802d3a000)
        libz.so.6 => /lib/libz.so.6 (0x802f99000)
        libgomp.so.1 => /usr/local/lib/gcc7/libgomp.so.1 (0x8031b1000)
        libm.so.5 => /lib/libm.so.5 (0x8033dd000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x80360a000)
        libthr.so.3 => /lib/libthr.so.3 (0x803819000)
        libc.so.7 => /lib/libc.so.7 (0x800823000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x803a41000)
        libjbig.so.2 => /usr/local/lib/libjbig.so.2 (0x803c6a000)
        libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x803e77000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x8040a1000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x8042b5000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x804583000)
        libdl.so.1 => /usr/lib/libdl.so.1 (0x8047a2000)
root@emby-server-beta74:/usr/local/lib/emby-server/lib #

is now quite similar. :D

Edited by makarai
Link to comment
Share on other sites

alucryd

That said, I'll try disabling openmp first so that you don't have to install gcc at all.

Link to comment
Share on other sites

makarai

Awesome, thx! I guess we can live without openmp then, we'll go with that.

 

What is openmp for, usually? It's i guess for parallelization, whatever that means :P

I have not done an in depth performance review, in terms of how much the cpu is utilized and so on cause i am probably not the right person for that :D 

Edited by makarai
Link to comment
Share on other sites

alucryd

It's for parallelization, see https://imagemagick.org/script/openmp.php

 

It's not an end-all be-all speed improvement though and in some cases it won't even help at all. If we are satisfied with the current speeds, a more portable build is preferable. If we do need the extra speed, it's worth considering in the future though, if skia with dng support is not a thing on freebsd by then that is.

Link to comment
Share on other sites

It's better for Emby server to not have openmp anyway. It will already be using multiple threads for simultaneous image processing. When that happens it is best to keep each on it's own single thread.

Link to comment
Share on other sites

marcelolagos

Could you guys give this one a try? https://paste.xinu.at/e3Vyx/

 

This is built without openmp and doesn't link against libgomp.so.

Awesome!. This one worked perfectly, without installing gcc7. It can display DNG files now. Thank you!

I will install gcc7 anyways as @@makarai mentions it will improve performance.

Link to comment
Share on other sites

makarai

Awesome!. This one worked perfectly, without installing gcc7. It can display DNG files now. Thank you!

I will install gcc7 anyways as @@makarai mentions it will improve performance.

 

Did i? i dont think i did. We more or less problemsolved your problem, by testing some of these things. The beta 74_1 and 74 + gcc show the same performance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...