I need a sample mp4/mov file with exif tags

Started by Ahmed, December 23, 2022, 01:11:59 PM

Previous topic - Next topic

Ahmed

I did some search on the forum/google for a sample mp4/mov file with exif tags but I didn't find and I tried to do it myself using the exiftool but it didn't work, I was able to add exif in images but not video files.

The following commands works for me:
exiftool -exif:GPSLatitude=10  template.png
exiftool -exif:Artist="Ahmed"  template.png

but when I use the same commands with mp4/mov files I get output
exiftool -exif:GPSLatitude=10  sample.mp4
    0 image files updated
    1 image files unchanged

so any help with either a sample file or how can I add exif tags to a video file

Phil Harvey

There is no standard for adding Exif to MP4.

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

StarGeek

And because there isn't a standard for embedding EXIF data in a video file, different camera companies do it in different ways.  So it really isn't possible to create EXIF data in a video file.

There are some Quicktime tags which can be used and you can also use XMP tags.  For Artist you could use XMP:Creator and you GPS coordinates, you could set XMP:GPSlatitude, XMP:GPSLongitude,and XMP:GPSAltitude.  Unlike EXIF GPS tags, the reference direction is included in the XMP tags.
* 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).

wywh

#3
Attached are .mp4, .m4v and .mov movies with metadata macOS 13.1 Ventura Photos.app and QuickTime Player.app can read (no EXIF tags here *).

Keys is always preferred in those Apple's apps. Some tags have also a subtype which some older macOS versions have supported.

Google Photos today prefers Keys:CreationDate (in my computer .mp4 is -4 hours compared to .m4v and .mov which display the correct time) and UserData:GPSCoordinates (it can also use Keys:GPSCoordinates).

exiftool -a -G1 -s -n -api QuickTimeUTC=1 -api RequestAll=2 .
[ExifTool]      ExifToolVersion                 : 12.50
[System]        FileName                        : 2006-0606-1206-06.mp4
[Keys]          CreationDate                    : 2005:05:05 12:05:05+02:00
[UserData]      DateTimeOriginal                : 2004:04:04 12:04:04+02:00
[QuickTime]     CreateDate                      : 2003:03:03 12:03:03+02:00
[QuickTime]     ModifyDate                      : 2003:03:03 12:03:03+02:00
[Track1]        TrackCreateDate                 : 2003:03:03 12:03:03+02:00
[Track1]        TrackModifyDate                 : 2003:03:03 12:03:03+02:00
[Track1]        MediaCreateDate                 : 2003:03:03 12:03:03+02:00
[Track1]        MediaModifyDate                 : 2003:03:03 12:03:03+02:00
[System]        FileModifyDate                  : 2002:02:02 12:02:02+02:00
[MacOS]         FileCreateDate                  : 2001:01:01 12:01:01+02:00

[Keys]          GPSCoordinates                  : -36.6101 -66.91515 119.9
[UserData]      GPSCoordinates                  : 36.6101 -66.91515 119.9

[Keys]          DisplayName                     : Title_primary_Keys
[Keys]          Title                           : Title_secondary_Keys [displayed if the primary does not exist]
[Keys]          Description                     : Description_Keys
[Keys]          Author                          : Author_Keys
[Keys]          Keywords                        : Keyword1_Keys,Keyword2_Keys

[ItemList]      Title                           : Title_ItemList
[ItemList]      Description                     : Description_ItemList
[ItemList]      Author                          : Author_ItemList
[ItemList]      Author                          : Author_ItemList_ID-a9aut
[ItemList]      Keyword                         : Keyword1_ItemList,Keyword2_ItemList

[UserData]      Title                           : Title_UserData
[UserData]      Title                           : Title_UserData_ID-titl
[UserData]      ClipFileName                    : Title_ClipFileName_UserData
[UserData]      Description                     : Description_UserData
[UserData]      Author                          : Author_UserData

[Composite]     GPSAltitude                     : 119.9
[Composite]     GPSAltitudeRef                  : 0
[Composite]     GPSLatitude                     : -36.6101
[Composite]     GPSLongitude                    : -66.91515
[Composite]     GPSPosition                     : -36.6101 -66.91515

exiftool -a -G1:7 -s -n -api QuickTimeUTC=1 -api RequestAll=2 .
[ExifTool:ID-ExifToolVersion] ExifToolVersion   : 12.50
[System:ID-FileName] FileName                   : 2006-0606-1206-06.mp4
[Keys:ID-creationdate] CreationDate             : 2005:05:05 12:05:05+02:00
[UserData:ID-date] DateTimeOriginal             : 2004:04:04 12:04:04+02:00
[QuickTime:ID-1] CreateDate                     : 2003:03:03 12:03:03+02:00
[QuickTime:ID-2] ModifyDate                     : 2003:03:03 12:03:03+02:00
[Track1:ID-1]   TrackCreateDate                 : 2003:03:03 12:03:03+02:00
[Track1:ID-1]   MediaCreateDate                 : 2003:03:03 12:03:03+02:00
[Track1:ID-2]   TrackModifyDate                 : 2003:03:03 12:03:03+02:00
[Track1:ID-2]   MediaModifyDate                 : 2003:03:03 12:03:03+02:00
[System:ID-FileModifyDate] FileModifyDate       : 2002:02:02 12:02:02+02:00
[MacOS:ID-FileCreateDate] FileCreateDate        : 2001:01:01 12:01:01+02:00

[Keys:ID-location2eISO6709] GPSCoordinates      : -36.6101 -66.91515 119.9
[UserData:ID-a9xyz] GPSCoordinates              : 36.6101 -66.91515 119.9

[Keys:ID-displayname] DisplayName               : Title_primary_Keys
[Keys:ID-title] Title                           : Title_secondary_Keys [displayed if the primary does not exist]
[Keys:ID-description] Description               : Description_Keys
[Keys:ID-author] Author                         : Author_Keys
[Keys:ID-keywords] Keywords                     : Keyword1_Keys,Keyword2_Keys

[ItemList:ID-a9nam] Title                       : Title_ItemList
[ItemList:ID-a9des] Description                 : Description_ItemList
[ItemList:ID-auth] Author                       : Author_ItemList
[ItemList:ID-a9aut] Author                      : Author_ItemList_ID-a9aut
[ItemList:ID-keyw] Keyword                      : Keyword1_ItemList,Keyword2_ItemList

[UserData:ID-a9nam] Title                       : Title_UserData
[UserData:ID-titl] Title                        : Title_UserData_ID-titl
[UserData:ID-clfn] ClipFileName                 : Title_ClipFileName_UserData
[UserData:ID-dscp] Description                  : Description_UserData
[UserData:ID-auth] Author                       : Author_UserData

[Composite:ID-QuickTime-GPSAltitude] GPSAltitude: 119.9
[Composite:ID-QuickTime-GPSAltitudeRef] GPSAltitudeRef: 0
[Composite:ID-QuickTime-GPSLatitude] GPSLatitude: -36.6101
[Composite:ID-QuickTime-GPSLongitude] GPSLongitude: -66.91515
[Composite:ID-Exif-GPSPosition] GPSPosition     : -36.6101 -66.91515

*There is no standard for embedding EXIF data in a movie but that has not stopped a lot of camera makers from forcing it into the file. If that kind of EXIF is inside an embedded ThumbnailImage (like in some Canon models), it might be edited or deleted if some app erroneously grabs it. The maker notes in most Canon movies are stored inside the ThumbnailImage, which is writable, so you can do something like this (it is 3 commands: the first to extract the thumbnail, the second to add metadata to the thumbnail, and the third to write the thumbnail back into the video):

exiftool -ThumbnailImage -b movie.mov | exiftool -Time:All='2020:01:01 12:00:00' -timezone='+02:00' -wm w - | exiftool -ThumbnailImage'<=-' movie.mov
I ignore that date tag because none of my current apps use it. But you can delete it with:

exiftool -m -P -overwrite_original_in_place -wm w -Canon:ThumbnailImage= movie.mov
Canon 6D inserts these kind of tags to its movies but only Keys can readily edited with exiftool:

exiftool -a -G1 -s -api QuickTimeUTC=1 -Time:All 2020-0101-1200-00_canon6d.mov
[Keys]          LocationDate                    : 2015:08:08 13:03:06+03:00
[IFD0]          ModifyDate                      : 2015:08:08 13:02:57
[ExifIFD]       DateTimeOriginal                : 2015:08:08 13:02:57
[ExifIFD]       CreateDate                      : 2015:08:08 13:02:57
[Canon]         TimeZone                        : +03:00
[Canon]         TimeZoneCity                    : Cairo
[Canon]         DaylightSavings                 : On

- Matti