Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Nextcloud 20 help with HEIC support via Imagick7

wavesswe

Junior Member
Joined
Dec 2, 2020
Messages
20
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

Wizened Sage
Joined
Jan 1, 2016
Messages
3,926
You could try installing the pkg for it in the NC jail:
pkg install libheif
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

Junior Member
Joined
Dec 2, 2020
Messages
20
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

Member
Joined
Sep 7, 2014
Messages
85
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

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

Member
Joined
Sep 7, 2014
Messages
85
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

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
/usr/ports/graphics/ImageMagick6-nox11 - the ports directories do not carry the version number the final package does.
 

nikinp

Member
Joined
Sep 7, 2014
Messages
85
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

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
What FreeBSD version does jour jail run? What FreeNAS/TrueNAS version are you running?
 

nikinp

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

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

Member
Joined
Sep 7, 2014
Messages
85
THE FreeBSD version is 11.3-RELEASE-p7
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

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

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

Member
Joined
Sep 7, 2014
Messages
85
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

Dedicated Sage
Joined
Nov 25, 2013
Messages
2,757
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

Member
Joined
Sep 7, 2014
Messages
85
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

Member
Joined
Sep 7, 2014
Messages
85
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