ExifTool Forum

ExifTool => Newbies => Topic started by: suninmoon on April 13, 2023, 02:43:16 PM

Title: ExifTool on Mac
Post by: suninmoon on April 13, 2023, 02:43:16 PM
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
Title: Re: ExifTool on Mac
Post by: greybeard on April 13, 2023, 03:57:38 PM
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
Title: Re: ExifTool on Mac
Post by: Hubert on April 13, 2023, 04:51:10 PM
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.
Title: Re: ExifTool on Mac
Post by: suninmoon on April 13, 2023, 07:32:27 PM
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!
Title: Re: ExifTool on Mac
Post by: StarGeek on April 13, 2023, 11:47:57 PM
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.
Title: Re: ExifTool on Mac
Post by: suninmoon on April 17, 2023, 06:48:51 PM
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 :)
Title: Re: ExifTool on Mac
Post by: Phil Harvey on April 18, 2023, 06:35:43 AM
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
Title: Re: ExifTool on Mac
Post by: StarGeek on April 18, 2023, 10:30:07 AM
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