Setting multiple tags to the same value in one command

Started by camner, February 08, 2017, 02:39:47 PM

Previous topic - Next topic

Phil Harvey

You need commas at the ends of the lines that you added.

- 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 ($).

Clindor

#16
Quote from: Phil Harvey on February 26, 2020, 01:20:38 PM
You need commas at the ends of the lines that you added.

- Phil

Oh.. what is a shame is that StarGeek already corrected it for me in his previous post  ^^'
Thank you.

Last question on this matter if I may (but not least): The command can now be executed.
But it modified the type of the file on which the Command has been applied in the process.
The extension for this file is now "MOV_original" instead of "MOV". Why did it happen?

Needless to say that now the file cannot be recognized by VLC or be read..  :'(

Phil Harvey

After running the command on FILE, the file with name FILE should be updated, and the original is preserved as FILE_original.  Add -overwrite_original to the command if you don't want to save the original.

- 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 ($).

Clindor

Quote from: Phil Harvey on February 26, 2020, 02:01:16 PM
After running the command on FILE, the file with name FILE should be updated, and the original is preserved as FILE_original.  Add -overwrite_original to the command if you don't want to save the original.

- Phil

Will it modify the file in any other way than replacing the 4 Tags' wrong values with the value I'm interesting in?

Clindor

#19
Actually there are different elements that make me think I might be using the wrong tool for what I need:

Why is there any need to overwrite the whole video file while I only need 4 tags to be affected by one good value coming from a fifth tag ?

By applying the command ExifTool "-MyVideoCreateTimeStamps<${CreationDate}" "-overwrite_original" "FILE", then the Command Exiftool -s "FILE" to list all the MetaData, I first thought the Command just erased one of the 4 affected tags (CreationDate), then I realized it was placed in a totally different spot than usual in the list..

Can you just change the values of 4 tags (by a common value) without having to copy the entire file or overwriting it?

What I really wanted is the instruction -MyVideoCreateTimeStamps<${CreationDate} to replace the four instructions -FileCreateDate<${CreationDate}, -CreateDate<${CreationDate}, -TrackCreateDate<${CreationDate}, -MediaCreateDate<${CreationDate}, but if that's not possible, I think I'd gladly put those 4 instructions in my command instead  :) rather than having to copy or overwrite each of my Video files (which can take quite some time when it comes to video, in addition to modifying the structure/organization of the MetaData which is also unwanted in my case...)

Phil Harvey

Sorry, there is no way to do what you are asking with ExifTool.

- 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 ($).

Clindor

Alright, thank you for this clarification.

I'll put the 4 instructions instead of one in my "super-command" then.  :)

Phil Harvey

Sorry, I was responding to this (before you edited your post and asked the last question):

QuoteCan you just change the values of 4 tags (by a common value) without having to copy the entire file or overwriting it?

To which the answer was no.

But To answer this:

QuoteWhat I really wanted is the instruction -MyVideoCreateTimeStamps<${CreationDate}

Yes, this should work.

- 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 ($).

Clindor

Yes, I AM sorry actually, because I'm the one editing a lot ^^' My apologies

What I meant is that by putting the 4 instructions in one command:
ExifTool "-FileCreateDate<${CreationDate}" "-CreateDate<${CreationDate}" "-TrackCreateDate<${CreationDate}" "-MediaCreateDate<${CreationDate}" FILE
..there will be no overwriting or copying of the whole file (just values being replaced in the MetaData).

I thought that with ExifTool "-MyVideoCreateTimeStamps<${CreationDate}" FILE could do the exact same with a shorter command  :) .. but that is no big deal  ;D I was just trying to optimize the whole thing here

StarGeek

Using the four separate tag copies is exactly the same as using the shortcut.

ExifTool will always create a new file and replace the old one with the new file.  Exiftool never edits "in place".  Which, if you think about it, is a bad idea in the first place.  If there's a power failure or some other interruption during the write, the whole file could be corrupted.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Clindor

OMG, I have never noticed that!... Why is ExifTool making a copy when I put 4 instructions at the time, and apparently NO copy when I ask for only ONE modification at the time?? :-o

StarGeek

FileModifyDate and FileCreateDate will not create a new file because those tags are part of the underlying OS.  Changing those doesn't edit the original file, it just edits the entries in the file system data for that file.  The same way that renaming a file doesn't change the file itself.

All of the other tags will require exiftool to create a new file.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Clindor


Clindor

Regarding the "-overwrite_original" option, did I put it on the right spot inside the command?:

Quote from: Clindor on February 26, 2020, 02:58:54 PM
ExifTool "-MyVideoCreateTimeStamps<${CreationDate}" "-overwrite_original" "FILE"

StarGeek

It can be almost anywhere in the command.  Just as long as it doesn't break up an option that requires a second parameter, like the -d (dateFormat) option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).