News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

ExifTool on Mac

Started by suninmoon, April 13, 2023, 02:43:16 PM

Previous topic - Next topic

suninmoon

Hey all

A while back I posted this question about changing the date of a video file and you helped me immensely

https://exiftool.org/forum/index.php?topic=13937.0

I'm using a Mac now and need to do the same thing. I'm not as familiar with the terminal in Mac as I am with command prompt in Windows so I'm a bit lost. Will this command you originally game me work in macOS terminal?

exiftool -api QuickTimeUTC=1 -QuickTime:CreateDate='2022:01:01 12:00:00' movie.mp4

I did try in terminal but got back a cryptic

Last login: Thu Apr 13 14:26:41 on ttys000
joshua@Joshuas-Mac-mini ~ % cd ~/Desktop
joshua@Joshuas-Mac-mini Desktop % exiftool -api QuickTimeUTC=1 -QuickTime:CreateDate='2013:01:02 18:04:2'6 test.mp4
quote>

The file was on the desktop where I thought I was running the command. Can someone tell me what I did wrong?

Thanks
Josh

greybeard

Generally the difference is single and double quotes are switched but it looks like you have a typo in the date/time with the quote before the 6

Hubert

The

quote>
prompt in Terminal is a sure-fire sign you have a misplaced single quote in your original command. Typing ctrl+c will get you out of it.

suninmoon

I should have caught that, my apologies. Yes the command worked perfect after I corrected that typo.

I got advice on here about adding GPS as well so I'm assuming that it's only the single quotes that should be different from Windows. I'll give that a shot and let you know.

Thanks!

StarGeek

Double or single quotes should work on the Mac except when there is a dollar sign in the command.  That requires single quotes around it.

But IMO, it's a good habit to just use single quotes on Mac/Linux.
* 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).

suninmoon

Thank you. Single quotes worked ok on the GPS command.I just wish I could find a way use text expansion in the terminal app. Using cut and paste gets tedious :)

Phil Harvey

You can put your ExifTool options in a text file and use the -@ option to read this file rather than entering everything on the command line.

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

StarGeek

Some examples
C:\>type temp.txt
y:\!temp\Test3.jpg
y:\!temp\Test4.jpg
y:\!temp\Test5.jpg
C:\>exiftool -P -overwrite_original -DateTimeOriginal="2023:04:18 12:00:00" -@ temp.txt
    3 image files updated

C:\>exiftool -G1 -a -s -DateTimeOriginal -@ temp.txt
======== y:/!temp/Test3.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
======== y:/!temp/Test4.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
======== y:/!temp/Test5.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
    3 image files read

C:\>exiftool -echo "Additional file added on command line" -G1 -a -s -DateTimeOriginal -@ temp.txt y:\!temp\Test6.jpg
Additional file added on command line
======== y:/!temp/Test3.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
======== y:/!temp/Test4.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
======== y:/!temp/Test5.jpg
[ExifIFD]       DateTimeOriginal                : 2023:04:18 12:00:00
======== y:/!temp/Test6.jpg
    4 image files read
* 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).