Metadata MP4 to only corresponding JPG

Started by peho, April 11, 2019, 02:04:50 PM

Previous topic - Next topic

peho

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?

StarGeek

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

peho

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...

StarGeek

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.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype