Main Menu

ExifTool on DSM7

Started by stefanjoa, August 26, 2021, 04:16:41 AM

Previous topic - Next topic

stefanjoa

Hi All,

I just upgraded my Synology to DSM 7 and identified that ExifTool is no longer working. Is there a plan to upgrade it to work again?
The ExifTool is the most important tool on my Synology because it sorts all my pictures the way I want it.

Would love to use it again :)

Thank you!

StarGeek

Exiftool is written in Perl, which is system neutral for the most part.  So the problem is most likely on the Synology side.

You don't mention how exiftool stopped working, so there's not much help we can provide.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

marfig

Hello,
I'm facing the same issue. It stopped working, because Synology DSM requires a reinstall of the package
https://www.cphub.net/?p=exiftool
but the package has no longer valid format for DSM.

I've already sent a message to Nexius2, who originally created the package.

Would be great, if we can find anyone who has an experience with DSM packages and could take a look on this.

(I've investigated if there is any option how to manually install exiftool as perl script on DSM, but without any success)

Thank you
Regards
Martin

marfig

So :)
I always love workarounds. In my case, exiftool is called from web photo gallery - piwigo, from PHO script via shell_exec.
I've downloaded exiftool package, extracted it somewhere in syno and updated the path in PHP script into something like
shell_exec('perl /volume1/web/Image-ExifTool-12.30/exiftool -json "'.$filepath.'"');

and voila .. it works

Regards
Martin

Nexius2

Hello,
the probleme is from the way new packages for DSM 7 need to be written.
as I no longer have a synology, I can't keep up with the update.
you'll have to find a workaround by yourself.
if someone want's to continue updating the package, I'd be glad to give him what he needs

stefanjoa

Thanks for your messages. I just put the latest version of ExifTool on my synology and calling it directly in my script.
There is no need to have a package.

acampbell3000

Quote from: Nexius2 on August 26, 2021, 04:09:26 PM
Hello,
the probleme is from the way new packages for DSM 7 need to be written.
as I no longer have a synology, I can't keep up with the update.
you'll have to find a workaround by yourself.
if someone want's to continue updating the package, I'd be glad to give him what he needs

Is the package on GitHub? Perhaps we could share the package with the wider Synology community and find out if someone wants to take up ownership?

A.

scrapix

I'll try to set up a github repo for the ExifTool Syno Package in the next time. Meanwhile you can set up ExifTool as follows:

How To get exiftool running on Synology DSM 7


  •    ssh into your synology
  •    wget https://exiftool.org/Image-ExifTool-12.33.tar.gz
  •    rm Image-ExifTool-12.33 ExifTool.tar.gz
  •    mv Image-ExifTool-12.33 ExifTool
  •    sudo mv /volume1/homes/YourUserName/ExifTool /usr/share/applications/
  •    sudo vi /etc/profile
  •    add ":/usr/share/applications/ExifTool"
  •    save and exit
  •    exit
  •    ssh again into your synology and you should be able to use exiftool via command line

Explanation

  •     you log in via command line to your synology (ssh)
  •     download and unpack  exiftool from exiftool.org to your home directory
  •     remove zipped file Image-ExifTool-12.33 ExifTool.tar.gz
  •     rename directory "Image-ExifTool-12.33" to "ExifTool"
  •     move directory "ExifTool" to /usr/share/applications/
  •     open profile file in text editor "vi" to add a path to applications so that you can use the command "exiftool" in command line
  •     exit your ssh connection
  •     log in again to be able to finally use exiftool
  •     enjoy (hope I haven't forgot anything)

acampbell3000

Quote from: scrapix on October 25, 2021, 12:56:23 AM
I'll try to set up a github repo for the ExifTool Syno Package in the next time. Meanwhile you can set up ExifTool as follows:

How To get exiftool running on Synology DSM 7


  •    ssh into your synology
  •    wget https://exiftool.org/Image-ExifTool-12.33.tar.gz
  •    rm Image-ExifTool-12.33 ExifTool.tar.gz
  •    mv Image-ExifTool-12.33 ExifTool
  •    sudo mv /volume1/homes/YourUserName/ExifTool /usr/share/applications/
  •    sudo vi /etc/profile
  •    add ":/usr/share/applications/ExifTool"
  •    save and exit
  •    exit
  •    ssh again into your synology and you should be able to use exiftool via command line

Explanation

  •     you log in via command line to your synology (ssh)
  •     download and unpack  exiftool from exiftool.org to your home directory
  •     remove zipped file Image-ExifTool-12.33 ExifTool.tar.gz
  •     rename directory "Image-ExifTool-12.33" to "ExifTool"
  •     move directory "ExifTool" to /usr/share/applications/
  •     open profile file in text editor "vi" to add a path to applications so that you can use the command "exiftool" in command line
  •     exit your ssh connection
  •     log in again to be able to finally use exiftool
  •     enjoy (hope I haven't forgot anything)

Thanks scrapix, much appreciated. Makes sense, essentially adding the latest exiftool binary to the path.

Curious, how complicated are synology DSM packages? I assume, they required a specific folder structure along with a load of metadata?

FixEUser

QuoteCurious, how complicated are synology DSM packages? I assume, they required a specific folder structure along with a load of metadata?

@acampbell3000 - Maybe this guides can give you an impression:
https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/7.0/enu/DSM_Developer_Guide_7_0_Beta.pdf
or online
https://help.synology.com/developer-guide/

StarGeek

Quote from: scrapix on October 25, 2021, 12:56:23 AM

  • 2.   wget https://exiftool.org/Image-ExifTool-12.33.tar.gz
  • 3.   rm Image-ExifTool-12.33 ExifTool.tar.gz

Shouldn't there be a step such as tar -xf Image-ExifTool-12.33.tar.gz in between?  Otherwise it looks like you're just downloading the file and deleting it.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

scrapix

Quote from: StarGeek on October 25, 2021, 11:27:33 AM
Shouldn't there be a step such as tar -xf Image-ExifTool-12.33.tar.gz in between?  Otherwise it looks like you're just downloading the file and deleting it.

Thank you for the hint! That was indeed missing and an important step!
Corrected Version:

How To get exiftool running on Synology DSM 7
In a terminal/shell/cmd on your computer/mac do following:


  •    ssh yourSynologyAdminUser@yourSynologyIpAddress -p yourPortNumber
  •    wget https://exiftool.org/Image-ExifTool-12.33.tar.gz
  •    tar -xf Image-ExifTool-12.33.tar.gz
  •    rm Image-ExifTool-12.33 ExifTool.tar.gz
  •    mv Image-ExifTool-12.33 ExifTool
  •    sudo mv /volume1/homes/YourUserName/ExifTool /usr/share/applications/
  •    sudo vi /etc/profile
  •    add ":/usr/share/applications/ExifTool"
  •    save and exit
  •    exit
  •    ssh again into your synology and you should be able to use exiftool via command line

Explanation

  •     you log in via command line to your synology (ssh)
  •     download and unpack exiftool from exiftool.org to your home directory
  •     extract zipped file Image-ExifTool-12.33 ExifTool.tar.gz
  •     remove zipped file Image-ExifTool-12.33 ExifTool.tar.gz
  •     rename directory "Image-ExifTool-12.33" to "ExifTool"
  •     move directory "ExifTool" to /usr/share/applications/
  •     open profile file in text editor "vi" to add a path to applications so that you can use the command "exiftool" in command line
  •     exit your ssh connection
  •     log in again to be able to finally use exiftool
  •     enjoy (hope I haven't forgot anything)

jeff_k

This is outstanding — thank you for writing these up!
As a followup, if later on I am updating the exiftool version, it *looks* like I'd need to have a step 5.5 where I would remove the existing /usr/share/applications/ExifTool directory before moving the newly downloaded version there, correct?

StarGeek

Quote from: jeff_k on January 08, 2022, 01:56:13 PMAs a followup, if later on I am updating the exiftool version, it *looks* like I'd need to have a step 5.5 where I would remove the existing /usr/share/applications/ExifTool directory before moving the newly downloaded version there, correct?

It's perfectly find to just overwrite the program files.  But doing a quick check on the linux mv command, it looks like it can't overwrite according to this StackExchange answer.  If that's so, then yes, either delete the target or use cp instead and delete the source directory afterwards.

Bah, conflicting answer in this StackExchange answer which says you can add -f to force an overwrite.  If so, then just add that to step 5.

Hopefully someone who can check and see will give a definitive answer.

Reading further, the comments in that first link seem to indicate the mv -f won't overwrite subdirectories.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

On my system (MacOS), mv will overwrite the target file if you have permission, but if the target is a directory then it will be moved into the directory.  But depending on your shell configuration, mv -i may be the default, in which case it will prompt to overwrite a file unless you use -f.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).