Batch for IPTC Tags

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

Post Reply
pnussbau
Posts: 3
Joined: Sat May 25, 2019 7:28 pm

Batch for IPTC Tags

Post by pnussbau »

Hello
I'll insert the filename into IPTC tag "Source" for save the original filename, if I rename the file. I can do this in XnView MP for one file, but I need a batch processing to edit all the 10'000 pictures.
I try some variation with nconvert but wit "-iptc_print" I can't see what I set manualy:
C:\Users\peter\Downloads\XnView>nconvert -iptc_print Source P:\Dampfzentrum\Sammelgut\Dampfwalzen\P1010188.jpg
** NCONVERT v7.25 (c) 1991-2019 Pierre-E Gougelet (Jan 15 2019/12:05:55) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
** This is freeware software (for non-commercial use)

P:\Dampfzentrum\Sammelgut\Dampfwalzen\P1010188.jpg : Success
Format : JPEG TrueColor (v1.1)
Name : jpeg
Compression : JPEG
Width : 3456
Height : 2592
Components per pixel : 3
Bits per component : 8
Depth : 24
# colors : 16777216
Color model : RGB
Bytes Per Plane : 10368
Orientation : Top Left
Xdpi : 180
Ydpi : 180
Page(s) : 1
Metadata : ( EXIF XMP IPTC )

C:\Users\peter\Downloads\XnView>


If I call "fullinfo" then I can see the IPTC Info:
P:\Dampfzentrum\Sammelgut\Dampfwalzen\P1010188.jpg : Success
Format : JPEG TrueColor (v1.1)
Name : jpeg
.........
IPTC:
Byline (0x50): Peter Nussbaumer
Source (0x73): P1010188.JPG
Copyright Notice (0x74): ® Peter Nussbaumer
Caption (0x78): Transport Dampfwalze "Vaporama"

C:\Users\peter\Downloads\XnView>

My question is : How can I access the tag "Source" in nconvert?

Many Thanks if any can help me
Peter
cday
XnThusiast
Posts: 2569
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch for IPTC Tags

Post by cday »

As I don't use metadata I'm not the obvious person to help, but as it is unlikely that anyone else will respond, at least until Pierre has time to read your post, I'll attempt an initial response.

pnussbau wrote: Sat May 25, 2019 8:25 pm I'll insert the filename into IPTC tag "Source" for save the original filename, if I rename the file. I can do this in XnView MP for one file, but I need a batch processing to edit all the 10'000 pictures.
First of all, are you sure that XnView MP doesn't support batch operation?

Michel038 or Pierre may possibly be able to indicate a way of doing what you need if it is actually supported.

My question is : How can I access the tag "Source" in nconvert?

I generally reply to NConvert questions because no-one other than Pierre, who has very limited time, replies:

The NConvert help file gives the following option for writing IPTC data:

Code: Select all

-iptc_set tag value : Set value to IPTC tag
I would therefore expect the code needed to start with -iptc_set source followed by the required value, however that should be expressed.

If my attempted response is not helpful, I can easily delete it so that Pierre can more easily read your original post... :wink:
pnussbau
Posts: 3
Joined: Sat May 25, 2019 7:28 pm

Re: Batch for IPTC Tags

Post by pnussbau »

Thanks for your answer

I try this with nconvert and the program insert my value in Tag 0x00 and not in the tag "source" or the Hex 0x73

How can I execute a batch command in XnView MP? If I select more than one picture and change the Tag "Source" to the filename all the selected pictures has the same value in the Tag and not there own filename.

Peter
pnussbau
Posts: 3
Joined: Sat May 25, 2019 7:28 pm

Re: Batch for IPTC Tags

Post by pnussbau »

Sorry for all my entries, I try it again with Batchprocessing in XnView MP and it works fine as I expected.
It's a great Program and I will spend my thank you on MyCommerce for XnView

Many Thanks and best regards
Peter
cday
XnThusiast
Posts: 2569
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch for IPTC Tags

Post by cday »

pnussbau wrote: Wed May 29, 2019 6:36 pm Thanks for your answer

I try this with nconvert and the program insert my value in Tag 0x00 and not in the tag "source" or the Hex 0x73
I said I knew nothing about IPTC!

I try it again with Batch processing in XnView MP and now it works fine.
It's a great Program and I will spend my thank you on MyCommerce for XnView.
XnView MP (and the stand-alone XnConvert) are excellent programs, and Pierre will be pleased! :D
User avatar
michel038
Posts: 551
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Batch for IPTC Tags

Post by michel038 »

I've never used Xnconvert, so I could not help
In XnViewMP french version, "batch processing" is translated "conversion par lots".

And I did not see that this tool could do batch processing, not just conversions !
cday
XnThusiast
Posts: 2569
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Batch for IPTC Tags

Post by cday »

michel038 wrote: Mon Jun 03, 2019 4:57 pm ... I did not see that this tool could do batch processing, not just conversions !
NConvert or XnConvert?

With command line NConvert, files in the same directory can be batch converted by using a wildcard (*) in the input term at the extreme right.

And in a batch file .bat, it is possible to call NConvert multiple times if required, and to include cmd.exe (enhanced 'DOS' in modern Windows) terms to allow more complex processing such as loops and more complex logic. Currently the only way to produce multiple output versions from a set of input files in a single operation.

In XnConvert (a stand-alone version of the batch convert tool in XnView MP), on the Actions > Image tab there is an ITPC-IIM/XMP option, which I think is what pnussbau is using now.
ceej
Posts: 5
Joined: Tue Nov 17, 2020 3:07 am

Re: Batch for IPTC Tags

Post by ceej »

I have exactly the same need and problem.
I want to use a file characteristic (e.g. filename) and place it into a metadata field.
But I want to do this for many files, not just one at a time.
The Ctl-I edit metadata feature lets me write static data to a selection of files.
But if I use the feature to Insert filename or folder or date or ... and have multiple files selected, then the value obtained from the first file in the list is used for *all* the files in the list.
I want file-specific values to be used for each file in the list.
Is this possible?
If not, it would be a *wonderful* thing to be added.
Thanks so much,
-ceej
User avatar
michel038
Posts: 551
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: Batch for IPTC Tags

Post by michel038 »

You can use transfer metadata feature of Xnviewmp ( tools,, metadata, ... )
Select files,
Choose target field , then source field... etc
ceej
Posts: 5
Joined: Tue Nov 17, 2020 3:07 am

Re: Batch for IPTC Tags

Post by ceej »

Hmm.. That is useful to know, thanks.
However, (in this particular need) I want to get the filename of each photo into the metadata (Caption is OK; pretty much anywhere is OK).
And I'd like the process to work in batch - that is, a selection of multiple photos.
Transfer seems to move a metadata value from one data item to another, although I have yet to figure out exactly how to make it work. (I think 'making it work' is made difficult by the different terms/identifiers used for the various metadata fields - what Win 10 file explorer uses and XnView and others).
Anyway, ...

OMG, I think I just got it!
Select photos.
Metadata|Transfer
Click [Add+]
Select target1 (pick from type, sub-type, e.g. Exif Copyright or Artist ..., IPTC Caption or Byline ...)
Select source1 (pick from dropdown, e.g. file data field [name, date, folder, ...], or ..., or other metadata field)
Repeat for additional targets.
Apply
Verify changes (now that I know where to look!)

I sure hope the guy who started this thread is seeing this update!

Hmmm, looks like the Transfer section/code/function was added separately afterward, rather than modify the Edit section/code at the top.
Maybe when ExifTool was incorporated? Really does not matter. Only that it is harder to figure out where you can do what.
Yeah, I don't find the word "transfer" in the 2019 User Guide that I found (thank you, also).

THANK YOU michel038 for responding and helping me out.
And to Pierre as well.
-ceej
ceej
Posts: 5
Joined: Tue Nov 17, 2020 3:07 am

Re: Batch for IPTC Tags

Post by ceej »

michel038 wrote: Tue Nov 17, 2020 9:27 am You can use transfer metadata feature of Xnviewmp ( tools,, metadata, ... )
Select files,
Choose target field , then source field... etc
Michael,
I just saw the links to your tutorial and used Chrome to see it in English (my French is far too old to follow more than 10%!).
I found your excellent write-up on Transfer. I'm sure that there are many other sections that I will find very useful.
Thanks again!
-ceej
Post Reply