Name, Description and Keywords are not recognized by Shutterstock

(Peter Cherry) #1

I added Name, Description and Keywords in Darktable and exported picture as JPG.
As you can see, Windows shows everything, but not Shutterstock. No problem with Pond5.

(darix) #2

maybe open a case with shutterstock why this is missing. could also be a bug on their side.

(Peter Cherry) #3

I just did, let’s wait and see.
But to be sure, is Darktable format compatible with IPTC standard?
Is anybody using Darktable for writing keywrods and description for stock photos?


No, darktable doesn’t write IPTC data.


If possible, I would like darktable to stick to XMP metadata, although some services and software might (and do) still expect IPTC.

IPTC is old and outdated, with many drawbacks (like tag length limitations), and while UTF-8 is officially supported, some programs use it, some offer this as an option, and some are using locale charsets, which can be a nightmare when one is using, for instance, a Windows system in a language with some “foreign” characters.

When necessary, XMP tags can be copied to IPTC via ExifTool and similar programs.

(Christian Kanzian) #6

I use a lua script which calls the exiftool after export mainly to copy over the tags as only reads tags from IPTC.

(Peter Cherry) #7

Are you able to run this LUA script with Windows Darktable also?
I tried several locations of lua script (AppData\Local\darktable OR Darktable\share\darktable) and luarc but still can’t see any new module in Darktable.

require "exiftool_export"
require "lua/exiftool_export"
nothing works…

Thanks for help.


I don’t think that would work, the script uses an external program to do its job. That being said, Lua should work on Windows, too, if there is no Unicode character in the path. And thus not in your username.

(Christian Kanzian) #9

Windows, well I’m sitting all day long in front of such a machine, but don’t use it for my RAW images to process.

Anyway, I got it working on Win10 with the attached LUA script.

I did following for installation:

  1. Install exiftool in a place where it can be found if you use the cmd.exe from any place. I copied exiftool.exe into C:\Windows\
  2. in AppData\Local\darktable I made a new folder lua and copied exiftool_export.lua into this folder
  3. created a luarc and added require "exiftool_export" (2.0 KB)

From the original version I removed the checking if the exiftool is installed. I also needed to replace ' with "

Sometimes even a blind chicken …

edit: cmd.exe pops up on every call. That can be a bit annoying I guess …

(Peter Cherry) #10

@pk5dark: Thanks a lot, now LUA is really working:slight_smile:
I can see my tags on Shutterstock after export now, but no description, i need to investigate.

(Christian Kanzian) #11

Dam, I forgot to fix that part in the script. So it won’t work with the version above, Sorry. (2.0 KB)

You need to figure out what else need to be copied.

You can try to use the exiftool with an arguments file. An arguments file can have several options over multiple lines. This is the -@ option, which you should be able select from the modul. There is a kind of official but old sample argument file. If you select the -@ option in the modul, you will get a field for file selection. You can try this file:

(Peter Cherry) #12

@pk5dark: You are right, there was just Keywords to Tags mapping in the LUA script.
Can I add mapping for Title without using argument file? I tried to add -XMP-dc:Title > IPTC:ObjectName mapping into LUA script, but it is not working:

cmd_options[1] = “-XMP-dc:Subject > IPTC:Keywords -XMP-dc:Title > IPTC:ObjectName”

(Christian Kanzian) #13

@P_Cherry: before fideling with the script, you can try command options directly in the cmd.exe.

I’m not an exiftool expert :smirk:

If I try

exiftool "-XMP-dc:Subject > IPTC:Keywords -XMP-dc:Title > IPTC:ObjectName" image.jpg

in the cmd.exe I got the error message:

Warning: Invalid tag name 'iptc:keywords -xmp-dc:title > iptc:objectname'

I think it would be much easier to use an arg file. Just create a new txt file (XMPtoIPTC.txt) and add arguments line by line like:

-XMP-dc:Subject > IPTC:Keywords
-XMP-dc:Title > IPTC:ObjectName

and then try:

exiftool -@ XMPtoIPTC.txt image.jpg

(Tobias) #14

@pk5dark Could you please test if this “check_if_bin_exists” version works with Windows?

function check_if_bin_exists(bin)
  local result
  if (dt.configuration.running_os == "windows") then
    if f~=nil then 
	  return true 
	  return false 
  elseif (dt.configuration.running_os == "linux") then
    result = os.execute("which " .. bin)
  elseif (dt.configuration.running_os == "macos") then
    result = os.execute() -- ToDo: We need something here
    result = false
  if (not result or result == nil) then
    result = false
  return result

(Christian Kanzian) #15


if not check_if_bin_exists("exiftool") then
    dt.print_error("exiftool not found")
	dt.print_error("exiftool found")

LUA ERROR exiftool not found

should do on Windows?

me don’t like to test much on windows

(Peter Cherry) #16

Yes, I know I can use arg file. But I am curious if it is possible to use more arguments directly in exiftool commamnd line…
Maybe someone expeienced with exiftool itself?

exiftool “-XMP-dc:Subject > IPTC:Keywords -XMP-dc:Title > IPTC:ObjectName” image.jpg
in the cmd.exe I got the error message:
Warning: Invalid tag name ‘iptc:keywords -xmp-dc:title > iptc:objectname’

(Steve) #17

I don’t have access to a windows box to test, but this seems to work for me on the command line in Bash:

exiftool -IPTC:Keywords=xmp-dc:Subject -IPTC:ObjectName=xmp-dc:Title image.jpg

I wouldn’t think cmd.exe would be that different; maybe just a matter of putting the arguments in quotes?

(Christian Kanzian) #18

Are you sure this works in bash?
in cmd.exe I get following IPTC entries:

Keywords:	xmp-dc:Subject
Application Record Version:	4
Object Name:	xmp-dc:Title

which is expected I guess with the = operator :innocent:

(Tobias) #19

should do on Windows?

It should, but I don’t have a Windows to test. Maybe we need the complete path.

(Christian Kanzian) #20

@Tobias There is a PATH variable on windows, but I guess it is not mandatory? So most windows programs which rely on external binaries have some file chooser in the preferences in such cases.

I think so, because programs can be installed in different places and there is no which command.

Currently this check_if_bin_exists() function in the lua scripts is a bit of needless. There is no script/plugin installer, so there is some knowlegde required to install the scripts and users need to read the docs and description. If somethings goes wrong users likely can check themself the error logs. Unfortunately, on windows darktable.print() is only written to the log file and not printed in the cmd.exe. dartable.error() disappears quite fast. So maybe it is not easy to find errors. Once there is a script installer check_if_bin_exists() would make more sense.

Maybe we should split the thread?