Nextcloud 20 help with HEIC support via Imagick7

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Hi!

I have been running Freenas / Truenas now for around 6 months. I have setup NC and its working really well except that i cant get HEIC to work with preview or thumbnails or in the photo section.

It seams that the Imagick version isnt compiled with HEIC support as standard for jails / freebsd.

If i put up a NC in a docker it works out of the box.

I have tried to reinstall and install the HEIC addons but im not able to compile it correct i think.
upgrade, downgrade ImageMagick but no luck there either, and its probably due to my lack of knowledge in FreeBSD / Truenas.

I have googled alot and i dont find much help. I hope that some one here could help me out and get this to work.

BR
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
You could try installing the pkg for it in the NC jail:
pkg install libheif
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Unfortunately the FreeBSD package of ImageMagick 7 is built without HEIF/HEIC support:

So you would need to install that one from ports. Log into your jail as root, then do:
Code:
mkdir -p /usr/ports
svnlite co https://svn.freebsd.org/ports/head /usr/ports
cd /usr/ports/graphics/ImageMagick7-nox11
make config
# enable HEIF
make -DBATCH
make deinstall reinstall
pkg lock ImageMagick7-nox11
pkg autoremove

Provided it is ImageMagick7-nox11 you installed for your Nextcloud installation. Adjust accordingly.
 
Last edited:

wavesswe

Dabbler
Joined
Dec 2, 2020
Messages
21
Unfortunately the FreeBSD package of ImageMagick 7 is built without HEIF/HEIC support:

So you would need to install that one from ports. Log into your jail as root, then do:
Code:
mkdir -p /usr/ports
svnlite co https://svn.freebsd.org/ports/head /usr/ports
cd /usr/ports/graphics/ImageMagick7-nox11
make config
# enable HEIF
make -DBATCH
make deinstall reinstall
pkg lock ImageMagick7-nox11
pkg autoremove

Provided it is ImageMagick7-nox11 you installed for your Nextcloud installation. Adjust accordingly.


Big thanks! worked like charm!
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Provided it is ImageMagick7-nox11 you installed for your Nextcloud installation. Adjust accordingly.
Dear Patrick
Excuse my ignorance, but where do you find which ImageMagick version you installation at installation? I didnt see that stated when I ran the danb35 script to set it up
Thanks in advance
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Use ssh to login to your jail, enter pkg info. Or ssh to your FreeNAS/TrueNAS host, then enter iocage exec <jailname> pkg info.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
It comes up with:

ImageMagick6-nox11-6.9.11.6_2,1 Image processing tools (legacy version)

I will try your code substituting ImageMagick7-nox11 with ImageMagick6-nox11-6.9.11.6_2,1
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
/usr/ports/graphics/ImageMagick6-nox11 - the ports directories do not carry the version number the final package does.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
I got as far as 'make config' but got this message

===> Building/installing dialog4ports as it is required for the config dialog
===> Cleaning for dialog4ports-0.1.6
/!\ ERROR: /!\

Ports Collection support for your FreeBSD version has ended, and no ports are
guaranteed to build on this system. Please upgrade to a supported release.

No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.

*** Error code 1

Stop.
make[2]: stopped in /usr/ports/ports-mgmt/dialog4ports
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/ports-mgmt/dialog4ports
===> Options unchanged
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
What FreeBSD version does jour jail run? What FreeNAS/TrueNAS version are you running?
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
FreeNAS-11.3-U2.1
How do I check FreeBSD version for the jail?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
FreeBSD 11.3 is EOL - upgrade to TrueNAS 12.0 first, then upgrade your jail.

How do I check FreeBSD version for the jail?
freebsd-version

Some people seem to have successfully upgraded their jails to FreeBSD 11.4 on a FreeNAS 11.3 - possibly an alternative way for you. I generally advise against running "newer" jails on an "older" host system. Can work, but is not guaranteed.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
THE FreeBSD version is 11.3-RELEASE-p7
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
As I wrote: that version is EOL. You cannot install anything, anymore. Upgrade to TN 12.0 and then the jail to FreeBSD 12.2 or upgrade just the jail to FreeBSD 11.4.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Is the right command to upgrade the jail iocage upgrade jailname -r 11.4-RELEASE
Thanks in advance?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
IIRC, yes. Possibly you will need to iocage fetch first. No parameters necessary, that one comes up with an interactive menu.
Make sure to have snapshots of all jail datasets in case you break anything.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
The jail showed upgraded to 11.4 on the Freenas GUI
I went back to the code and ran
make -DBATCH
Its been running for several hours now. Would it make a difference whether the jail was up or down (currently it is up).
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
It needs to be up so you can be "in the jail" and run the compilation process. It's compiling ImageMagick and all dependencies necessary for building from source. That's why it takes a while.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
It needs to be up so you can be "in the jail" and run the compilation process. It's compiling ImageMagick and all dependencies necessary for building from source. That's why it takes a while.
Thanks for your help. It completed but doesnt seem to have solved the problem. I will ask the original poster if it works for him.
 

nikinp

Contributor
Joined
Sep 7, 2014
Messages
116
Hi!

I have been running Freenas / Truenas now for around 6 months. I have setup NC and its working really well except that i cant get HEIC to work with preview or thumbnails or in the photo section.

It seams that the Imagick version isnt compiled with HEIC support as standard for jails / freebsd.

If i put up a NC in a docker it works out of the box.

I have tried to reinstall and install the HEIC addons but im not able to compile it correct i think.
upgrade, downgrade ImageMagick but no luck there either, and its probably due to my lack of knowledge in FreeBSD / Truenas.

I have googled alot and i dont find much help. I hope that some one here could help me out and get this to work.

BR
I followed the same steps that you did (but for version 6) but I am still unable to see HEIC files highlighted as 'Live photos' or preview them in the nextcloud portal (it works on the app). Could you tell me what you werent able to do, and was fixed by the update?
Thanks in advance
 
Top