Recent Posts

Pages: [1] 2 3 ... 10
1
Newbies / Re: Setting multiple tags to the same value in one command
« Last post by StarGeek on Today at 12:04:11 PM »
First, don't add dashes to the names in a config file.  Second, you need to put it all in one section.  The second section will override the first one.

This is the sample shortcut section in the example.config file.
Code: [Select]
%Image::ExifTool::UserDefined::Shortcuts = (
MyShortcut => ['exif:createdate','exposuretime','aperture'],
MyAlias => 'FocalLengthIn35mmFormat',
);

From there, you just want to add your new shortcut commands between the parens
Code: [Select]
%Image::ExifTool::UserDefined::Shortcuts = (
MyShortcut => ['exif:createdate','exposuretime','aperture'],
MyAlias => 'FocalLengthIn35mmFormat',
MyVideoCreationTimeStamps => ['FileCreateDate', 'CreateDate', 'TrackCreateDate', 'MediaCreateDate'],
MyVideoModificationTimeStamps => ['FileModifyDate', 'ModifyDate', 'TrackModifyDate', 'MediaModifyDate'],
);
2
Newbies / Re: Setting multiple tags to the same value in one command
« Last post by Clindor on Today at 11:49:08 AM »
So.. I basically trying to do the same thing on my side. Lots of my Time Stamps regarding my video files are wrong.

So I created with Notepad a file named ".ExifTool_config" for which I removed the extension and placed where the ExifTool.exe program is.
Inside this file I created two Shortcuts I presumed (one for all the Date of Creation tags with wrong values, the other for all the Date of Modification tags with wrong values). Following is what I wrote inside the file:

%Image::ExifTool::UserDefined::Shortcuts = (MyVideoCreationTimeStamps => ['-FileCreateDate', '-CreateDate', '-TrackCreateDate', '-MediaCreateDate']);
%Image::ExifTool::UserDefined::Shortcuts = (MyVideoModificationTimeStamps => ['-FileModifyDate', '-ModifyDate', '-TrackModifyDate', '-MediaModifyDate']);

Then I execute this Command to make a test on the Date of Modification tags:

ExifTool "-MyVideoCreationTimeStamps<${CreationDate}"  "FILE"

I got the usual error message "No writable tags set" in the output with no modification.

Is it because I tried to create two shortcuts MyVideoCreationTimeStamps and MyVideoModificationTimeStamps and it is not a possible task?
3
You got it!! I'm not fully understanding the command or how it works.. but it WORKS!  ;D ;D ;D

So thank you, the result really is the one expected  :)

EDIT: Oh you simplified it! Now it's clear  :)
4
Ah.  The 2 hour shift is in the opposite direction to the duration.  OK, try this:

exiftool "-FileModifyDate<${CreationDate;ShiftTime('0:0:'.$self->GetValue('Duration','ValueConv'));ShiftTime('-2')}Z" FILE

There may be an easier way, but this was the obvious thing to try.  (Also, I have removed the unnecessary "Image::ExifTool::" since this is the default namespace anyway, and used the new simplified method of calling ShiftTime.)

- Phil
5
(Thank you for the tip with the "" instead of “”! I think there were other errors on my end, but I might as well put extra care on this specific matter)

Hum.. Unfortunately this arranged command doesn't work the way it is supposed to...  :-\ Instead of correct rectifying the 2 hours late, the execution of this command adds 2 extra hours late..

So I put "-2" instead of "2" in your command Phil, unfortunately this time neither the rectification of the time difference, or the calculation with the duration happens

So I don't know..
6
Your combined command won't work because the second assignment will override the first.  Instead, try this:

exiftool "-FileModifyDate<${CreationDate;Image::ExifTool::ShiftTime($_,'2:0:'.$self->GetValue('Duration','ValueConv'),+1)}Z" FILE

Also, if things are working intermittently for you, it is likely you are cutting and pasting commands and using fancy quotation marks (like “” in your combined command instead of "").

- Phil
7
I re-tried it several times this morning and after several inconclusive tests ... it finally WORKED!
So thanks a lot Phil!!  :D (I don't know what I did wrong the other times  :-\ but whatever..)

If I may ask an extra question: because it was a video made during a trip, there also is a time difference regarding the hours (the result displayed is 2 hours late compared to the "real" time the video was made on location) that can easily be rectified with the instruction:

“-FileModifyDate-=02:00”

So by putting the 2 instructions together I might get the correct result:

ExifTool "-FileModifyDate<${CreationDate;Image::ExifTool::ShiftTime($_,'0:0:'.$self->GetValue('Duration','ValueConv'),+1)}Z" “-FileModifyDate-=02:00” FILE

And it DOES work.. But is there a way to combine the 2 instructions into one? (or is it more safe to keep them separated?)
8
See FAQ 13

- Phil
9
Newbies / Re: Adding a custom attribute instead of a custom tag
« Last post by Phil Harvey on Today at 06:54:07 AM »
Yes.  -api XMPShorthand is now -api Compact=Shorthand, but the old option still works.

- Phil
10
A-Ha! Bingo!

Sorry, i've read i think carefully docs and manpage, but i've totally missed that.

In hindsight, the line in -TAG section of the manpage:
Code: [Select]
A "#" may be appended to the tag name to disable the print conversion on a per-tag basis (see the -n option).  This may also be used when writing or copying tags.
looks relevant.

Thanks.
Pages: [1] 2 3 ... 10