Writing with tag wildcard to iPhone mp4/MOV

Started by ajmicek, August 12, 2016, 10:36:24 PM

Previous topic - Next topic

ajmicek

I recently ran this successfully:

exiftool -gps* IMG_1078.MOV
GPS Coordinates                 : 54 deg 54' 16.20" N, 82 deg 55' 51.60" W, 297.376 m Above Sea Level
GPS Altitude                    : 297.376 m
GPS Altitude Ref                : Above Sea Level
GPS Latitude                    : 54 deg 54' 16.20" N
GPS Longitude                   : 82 deg 55' 51.60" W
GPS Position                    : 54 deg 54' 16.20" N, 82 deg 55' 51.60" W


^ That output is expected for wildcard matching. Perfect! Brilliant, even. I really think exiftool is quite amazing. But then this:

exiftool -gps*= IMG_1078.MOV
    0 image files updated
    1 image files unchanged


This is the first I have run into this asymmetrical situation, where something can be read, but not set. This is an iPhone video, so MOV extension, mp4 container, AVC video. My guess is GPS data is encoded in the video stream and therefore is not easily changed by exiftool?
I've automated recompression of these videos in my app, and I know that location data (and most other metadata) is stripped from recompressed videos.

Would love to hear any thoughts!

ajmicek

Sorry, sorry! I just saw a relevant topic posted almost literally today. (Didn't see it since I was searching the forum archives!)
Moderator, you may delete this topic...

Phil Harvey

For everyone's reference, I think this is the thread from today.

You wouldn't have found anything about writing videos in the archives because this ability was added after the old forum posts were archived.

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

ajmicek

Thank you, yes that is the thread. If anyone's looking for a workaround solution:

ffmpeg -i test.MOV -codec:audio copy -codec:video copy test_lessmetadata.MOV

That strips GPS and some other tags from iPhone videos without reencoding the video file. Good enough for me.
I do wonder whether Apple's tags were designed this way intentionally: if a *.MOV video is transcoded or the streams are copied, most likely the software doing it isn't aware of Apple's tags and they disappear...

I do run exiftool on the original file prior to doing the above, and save the output to a file, just so I will have access to any other tags if needed in the future.