ExifTool Forum

General => Metadata => Topic started by: peho on April 11, 2019, 02:04:50 PM

Title: Metadata MP4 to only corresponding JPG
Post by: peho on April 11, 2019, 02:04:50 PM
ACDSee can't handle MP4 metadata, so I'm creating a jpg-file from video and would like to copy gps and date info from MP4 to that JPG for all MP4 in a directory.

After a lot of trial and error I have this working:
exiftool -ext JPG -tagsfromfile "%d%f.mp4" "-gps*>exif:all" "-filename>datetimeoriginal" "-filename>datetimedigitized" "-gpslatituderef=N" "-gpslongituderef=E" .

It's doing its job, but it is also changing all other jpg's in the directory. I can't see any changes, but file size is changed and all jpg's are updated according to exiftool output.
How can I get only the JPG with the same name as a MP4 to be processed?
Title: Re: Metadata MP4 to only corresponding JPG
Post by: StarGeek on April 11, 2019, 02:27:12 PM
You are directly setting GPSLatitudeRef and GPSLongitudeRef for every jpg file in the directory.  The other tags aren't changing because there isn't a MP4 file for the TagsFromFile option to copy from, but the Ref tags are still being updated.

Try using
"-GPSLatitudeRef<GPSLatitude" "-GPSLongitudeRef<GPSLongitude"
after TagsFromFile instead of setting them directly.
Title: Re: Metadata MP4 to only corresponding JPG
Post by: peho on April 11, 2019, 02:50:29 PM
Thanks for responding.
Yes, great, that worked.
When ref didn't copy w/o to specify it, I didn't thought it was possible to copy...
Title: Re: Metadata MP4 to only corresponding JPG
Post by: StarGeek on April 11, 2019, 07:49:38 PM
I'm pretty sure the reason it wouldn't copy is because there isn't one.  The MP4 file keeps the reference direction with the Lat/Long data.