Definitions for Keys:CameraLensModel and Keys:CameraFocalLength35mmEquivalent

Started by wywh, August 20, 2024, 12:06:35 PM

Previous topic - Next topic

wywh

Would it be possible to add definitions for Keys:CameraLensModel and Keys:CameraFocalLength35mmEquivalent?

exiftool -a -G1 -s -n -Keys:All source.mov
[Keys]          CameraLensModel                 : iPhone 12 mini back camera 4.2mm f/1.6
[Keys]          CameraFocalLength35mmEquivalent : 27

[Keys]          CreationDate                    : 2024:08:11 14:30:19+03:00
[Keys]          GPSCoordinates                  : 29.9792 31.1342 138.5
[Keys]          LocationName                    : Kirdāsah, Giza, Egypt
[Keys]          LocationAccuracyHorizontal      : 110.666667
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 12 mini
[Keys]          Software                        : 17.5.1
[Keys]          Title                           : Title
[Keys]          DisplayName                     : DisplayName
[Keys]          Description                     : Description
[Keys]          Keywords                        : Keyword 1,Keyword 2
[Keys]          UserRating                      : 4

exiftool -m -P -overwrite_original '-Keys:CameraLensModel=iPhone 12 mini back camera 4.2mm f/1.6' destination.mov
Warning: Tag 'Keys:CameraLensModel' is not defined
Nothing to do.

exiftool -m -P -overwrite_original '-Keys:CameraFocalLength35mmEquivalent=27' destination.mov
Warning: Tag 'Keys:CameraFocalLength35mmEquivalent' is not defined
Nothing to do.

- Matti

Phil Harvey

Hi Matti,

I would have to see the -v output to see the ID's for these tags.

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

wywh

I hope this helps:

exiftool -v 2024-0811-1430-19.mov
  ExifToolVersion = 12.92
  FileName = 2024-0811-1430-19.mov
  Directory = .
  FileSize = 131349215
  FileModifyDate = 1723375819
  FileAccessDate = 1724176623
  FileInodeChangeDate = 1724176632
  FilePermissions = 33152
  FileType = MOV
  FileTypeExtension = MOV
  MIMEType = video/quicktime
  FileType (SubDirectory) -->
  + [BinaryData directory, 12 bytes]
  | MajorBrand = qt 
  | MinorVersion =
  | CompatibleBrands = qt 
  Movie (SubDirectory) -->
  + [Movie directory]
  | MovieHeader (SubDirectory) -->
  | + [BinaryData directory, 100 bytes]
  | | MovieHeaderVersion = 0
  | | CreateDate = 3806220619
  | | ModifyDate = 3806220619
  | | TimeScale = 600
  | | Duration = 72751
  | | PreferredRate = 65536
  | | PreferredVolume = 256
  | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | PreviewTime = 0
  | | PreviewDuration = 0
  | | PosterTime = 0
  | | SelectionTime = 0
  | | SelectionDuration = 0
  | | CurrentTime = 0
  | | NextTrackID = 6
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 1
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 125829120
  | | | ImageHeight = 70778880
  | | TrackAperture (SubDirectory) -->
  | | + [TrackAperture directory]
  | | | CleanApertureDimensions = 0 1920 1080
  | | | ProductionApertureDimensions = 0 1920 1080
  | | | EncodedPixelsDimensions = 0 1920 1080
  | | Unknown_edts = .elst.../.
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 41 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = vide
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Video
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | VideoHeader (SubDirectory) -->
  | | | | + [BinaryData directory, 12 bytes]
  | | | | | GraphicsMode = 64
  | | | | | OpColor = 32768 32768 32768
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | VideoSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 288 bytes]
  | | | | | | CompressorID = hvc1
  | | | | | | VendorID =
  | | | | | | SourceImageWidth = 1920
  | | | | | | SourceImageHeight = 1080
  | | | | | | XResolution = 72
  | | | | | | YResolution = 72
  | | | | | | CompressorName = .HEVC
  | | | | | | BitDepth = 24
  | | | | | SampleGroupDescription = .tscl.....x
  | | | | | SampleGroupDescription = .sync....
  | | | | | SampleToGroup = sync.......................................................[snip]
  | | | | | VideoFrameRate = "...........................................+.........]...[snip]
  | | | | | CompositionTimeToSample = ....H............H............H............H.....[snip]
  | | | | | CompositionToDecodeTimelineMapping = 1....I../
  | | | | | SyncSampleTable = ~...F^v..........6.N.f.~.............&.>.V.n.............[snip]
  | | | | | IdependentAndDisposableSamples =  .................... ....................[snip]
  | | | | | SampleToChunk = ...........................................................[snip]
  | | | | | SampleSizes = ...m...YOpt.....V.Y...v.N.I>..}.SwUv.....M.j..{..dK.H...].EfZ[snip]
  | | | | | ChunkOffset = ...[.=5.h..3....&.9,..3..:.g@..F..M.wU..\.pd.{kO.q..y.B..c...[snip]
  | | Meta (SubDirectory) -->
  | | + [Meta directory]
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 26 bytes]
  | | | | HandlerClass =
  | | | | HandlerType = mdta
  | | | | HandlerVendorID =
  | | | | HandlerDescription =
  | | | Keys (SubDirectory) -->
  | | | + [Keys directory]
  | | | | Added ItemList Tag 1.1 = (mdta) camera.lens_model (Unknown)
  | | | | Added ItemList Tag 1.2 = (mdta) camera.focal_length.35mm_equivalent (Unknown)
  | | | | Added ItemList Tag 1.3 = (mdta) keywords
  | | | | Added ItemList Tag 1.4 = (mdta) rating.user
  | | | ItemList (SubDirectory) -->
  | | | + [ItemList directory]
  | | | | CameraLensModel-fin-FI = iPhone 12 mini back camera 4.2mm f/1.6
  | | | | CameraFocalLength35mmEquivalent-fin-FI = 27
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 2
  | | | TrackDuration = 72750
  | | | TrackLayer = 0
  | | | TrackVolume = 256
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.....@.
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 44100
  | | | | MediaDuration = 5349376
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 41 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = soun
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Audio
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | AudioHeader (SubDirectory) -->
  | | | | + [BinaryData directory, 8 bytes]
  | | | | | Balance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | AudioSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 60 bytes]
  | | | | | | AudioFormat = mp4a
  | | | | | | AudioVendorID =
  | | | | | | AudioChannels = 2
  | | | | | | AudioBitsPerSample = 16
  | | | | | | AudioSampleRate = 44100
  | | | | | + [AudioSampleDesc directory]
  | | | | | | Wave (SubDirectory) -->
  | | | | | | + [Wave directory]
  | | | | | | | PurchaseFileFormat = mp4a
  | | | | | | | Unknown_mp4a =
  | | | | | | | Unknown_esds = ....".....@.................
  | | | | | SampleGroupDescription = .roll....
  | | | | | SampleToGroup = roll..h.
  | | | | | TimeToSampleTable = ..h.
  | | | | | SampleToChunk = ..+........................................................[snip]
  | | | | | SampleSizes = .h..".?...................!....."............................[snip]
  | | | | | ChunkOffset = ..{...|.......?...O...&..,..3Z.:o.@..F..M..T.0\..d..k".q..y.m[snip]
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 3
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = .ekeys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | Warning = [minor] The ExtractEmbedded option may find more tags in the media data
  | | | | | TimeToSampleTable = ..../
  | | | | | SampleToChunk = ....
  | | | | | SampleSizes = ..
  | | | | | ChunkOffset = ....v
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 4
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = ...keys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | | Unknown_lidp = .
  | | | | | | Unknown_lidl = ......
  | | | | | TimeToSampleTable = %........W....d...q....W...........5.......x........(..[snip]
  | | | | | SampleToChunk = U..........................................................[snip]
  | | | | | SampleSizes = ...ddddddddddddd.dddddddddddddddddddddddddddddddddddddddddddd[snip]
  | | | | | ChunkOffset = V,.),.13Ju@..@..F..MuOT.@\.jd..k..q|..5e.aq....qE..n..@.dY..&[snip]
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 5
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = ..5keys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | TimeToSampleTable = "...........................................+.........][snip]
  | | | | | SampleToChunk = ...........................................................[snip]
  | | | | | SampleSizes = .............................................................[snip]
  | | | | | ChunkOffset = ...J.9......I&..,.]3N]:e.@..F..MzcT..\.~d.lk..q}Oy.......D..B[snip]
  | Meta (SubDirectory) -->
  | + [Meta directory]
  | | Handler (SubDirectory) -->
  | | + [BinaryData directory, 26 bytes]
  | | | HandlerClass =
  | | | HandlerType = mdta
  | | | HandlerVendorID =
  | | | HandlerDescription =
  | | Keys (SubDirectory) -->
  | | + [Keys directory]
  | | | Added ItemList Tag 2.1 = (mdta) location.accuracy.horizontal
  | | | Added ItemList Tag 2.2 = (mdta) location.ISO6709
  | | | Added ItemList Tag 2.3 = (mdta) make
  | | | Added ItemList Tag 2.4 = (mdta) model
  | | | Added ItemList Tag 2.5 = (mdta) software
  | | | Added ItemList Tag 2.6 = (mdta) creationdate
  | | | Added ItemList Tag 2.7 = (mdta) keywords
  | | | Added ItemList Tag 2.8 = (mdta) rating.user
  | | ItemList (SubDirectory) -->
  | | + [ItemList directory]
  | | | LocationAccuracyHorizontal = 110.666667
  | | | GPSCoordinates = +xx.xxxx+xxx.xxxx+xxx.xxx/
  | | | Make = Apple
  | | | Model = iPhone 12 mini
  | | | Software = 17.5.1
  | | | CreationDate = 2024-08-11T14:30:19+0300
  | | | Keywords = xx
  | | | UserRating = 4
  MediaDataSize = 131251956
  MediaDataOffset = 97259
  MediaData

- Matti

Phil Harvey

Done.  ExifTool 12.93 is available with support for these tags.

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

wywh

Quote from: Phil Harvey on August 20, 2024, 02:55:06 PMExifTool 12.93 is available with support for these tags.

Somehow v12.93 still fails to insert those tags although they no longer are listed as (Unknown). I really need to insert them to re-encoded .m4v but it fails also to .mov:

exiftool -m -P -overwrite_original '-Keys:CameraLensModel=iPhone 12 mini back camera 4.2mm f/1.6' movie.mov
Warning: Tag 'Keys:CameraLensModel' is not defined
Nothing to do.

exiftool -m -P -overwrite_original '-Keys:CameraFocalLength35mmEquivalent=27' movie.mov
Warning: Tag 'Keys:CameraFocalLength35mmEquivalent' is not defined
Nothing to do.

exiftool -v iphone.mov
  ExifToolVersion = 12.93
  FileName = iphone.mov
  Directory = .
  FileSize = 131349215
  FileModifyDate = 1723375819
  FileAccessDate = 1724184330
  FileInodeChangeDate = 1724184329
  FilePermissions = 33152
  FileType = MOV
  FileTypeExtension = MOV
  MIMEType = video/quicktime
  FileType (SubDirectory) -->
  + [BinaryData directory, 12 bytes]
  | MajorBrand = qt 
  | MinorVersion =
  | CompatibleBrands = qt 
  Movie (SubDirectory) -->
  + [Movie directory]
  | MovieHeader (SubDirectory) -->
  | + [BinaryData directory, 100 bytes]
  | | MovieHeaderVersion = 0
  | | CreateDate = 3806220619
  | | ModifyDate = 3806220619
  | | TimeScale = 600
  | | Duration = 72751
  | | PreferredRate = 65536
  | | PreferredVolume = 256
  | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | PreviewTime = 0
  | | PreviewDuration = 0
  | | PosterTime = 0
  | | SelectionTime = 0
  | | SelectionDuration = 0
  | | CurrentTime = 0
  | | NextTrackID = 6
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 1
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 125829120
  | | | ImageHeight = 70778880
  | | TrackAperture (SubDirectory) -->
  | | + [TrackAperture directory]
  | | | CleanApertureDimensions = 0 1920 1080
  | | | ProductionApertureDimensions = 0 1920 1080
  | | | EncodedPixelsDimensions = 0 1920 1080
  | | Unknown_edts = .elst.../.
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 41 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = vide
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Video
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | VideoHeader (SubDirectory) -->
  | | | | + [BinaryData directory, 12 bytes]
  | | | | | GraphicsMode = 64
  | | | | | OpColor = 32768 32768 32768
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | VideoSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 288 bytes]
  | | | | | | CompressorID = hvc1
  | | | | | | VendorID =
  | | | | | | SourceImageWidth = 1920
  | | | | | | SourceImageHeight = 1080
  | | | | | | XResolution = 72
  | | | | | | YResolution = 72
  | | | | | | CompressorName = .HEVC
  | | | | | | BitDepth = 24
  | | | | | SampleGroupDescription = .tscl.....x
  | | | | | SampleGroupDescription = .sync....
  | | | | | SampleToGroup = sync.......................................................[snip]
  | | | | | VideoFrameRate = "...........................................+.........]...[snip]
  | | | | | CompositionTimeToSample = ....H............H............H............H.....[snip]
  | | | | | CompositionToDecodeTimelineMapping = 1....I../
  | | | | | SyncSampleTable = ~...F^v..........6.N.f.~.............&.>.V.n.............[snip]
  | | | | | IdependentAndDisposableSamples =  .................... ....................[snip]
  | | | | | SampleToChunk = ...........................................................[snip]
  | | | | | SampleSizes = ...m...YOpt.....V.Y...v.N.I>..}.SwUv.....M.j..{..dK.H...].EfZ[snip]
  | | | | | ChunkOffset = ...[.=5.h..3....&.9,..3..:.g@..F..M.wU..\.pd.{kO.q..y.B..c...[snip]
  | | Meta (SubDirectory) -->
  | | + [Meta directory]
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 26 bytes]
  | | | | HandlerClass =
  | | | | HandlerType = mdta
  | | | | HandlerVendorID =
  | | | | HandlerDescription =
  | | | Keys (SubDirectory) -->
  | | | + [Keys directory]
  | | | | Added ItemList Tag 1.1 = (mdta) camera.lens_model
  | | | | Added ItemList Tag 1.2 = (mdta) camera.focal_length.35mm_equivalent
  | | | | Added ItemList Tag 1.3 = (mdta) keywords
  | | | | Added ItemList Tag 1.4 = (mdta) rating.user
  | | | ItemList (SubDirectory) -->
  | | | + [ItemList directory]
  | | | | LensModel-fin-FI = iPhone 12 mini back camera 4.2mm f/1.6
  | | | | FocalLengthIn35mmFormat-fin-FI = 27
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 2
  | | | TrackDuration = 72750
  | | | TrackLayer = 0
  | | | TrackVolume = 256
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.....@.
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 44100
  | | | | MediaDuration = 5349376
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 41 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = soun
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Audio
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | AudioHeader (SubDirectory) -->
  | | | | + [BinaryData directory, 8 bytes]
  | | | | | Balance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | AudioSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 60 bytes]
  | | | | | | AudioFormat = mp4a
  | | | | | | AudioVendorID =
  | | | | | | AudioChannels = 2
  | | | | | | AudioBitsPerSample = 16
  | | | | | | AudioSampleRate = 44100
  | | | | | + [AudioSampleDesc directory]
  | | | | | | Wave (SubDirectory) -->
  | | | | | | + [Wave directory]
  | | | | | | | PurchaseFileFormat = mp4a
  | | | | | | | Unknown_mp4a =
  | | | | | | | Unknown_esds = ....".....@.................
  | | | | | SampleGroupDescription = .roll....
  | | | | | SampleToGroup = roll..h.
  | | | | | TimeToSampleTable = ..h.
  | | | | | SampleToChunk = ..+........................................................[snip]
  | | | | | SampleSizes = .h..".?...................!....."............................[snip]
  | | | | | ChunkOffset = ..{...|.......?...O...&..,..3Z.:o.@..F..M..T.0\..d..k".q..y.m[snip]
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 3
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = .ekeys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | Warning = [minor] The ExtractEmbedded option may find more tags in the media data
  | | | | | TimeToSampleTable = ..../
  | | | | | SampleToChunk = ....
  | | | | | SampleSizes = ..
  | | | | | ChunkOffset = ....v
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 4
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = ...keys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | | Unknown_lidp = .
  | | | | | | Unknown_lidl = ......
  | | | | | TimeToSampleTable = %........W....d...q....W...........5.......x........(..[snip]
  | | | | | SampleToChunk = U..........................................................[snip]
  | | | | | SampleSizes = ...ddddddddddddd.dddddddddddddddddddddddddddddddddddddddddddd[snip]
  | | | | | ChunkOffset = V,.),.13Ju@..@..F..MuOT.@\.jd..k..q|..5e.aq....qE..n..@.dY..&[snip]
  | Track (SubDirectory) -->
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | TrackCreateDate = 3806220619
  | | | TrackModifyDate = 3806220619
  | | | TrackID = 5
  | | | TrackDuration = 72751
  | | | TrackLayer = 0
  | | | TrackVolume = 0
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | ImageWidth = 0
  | | | ImageHeight = 0
  | | Unknown_edts = .elst.../.
  | | TrackRef (SubDirectory) -->
  | | + [TrackRef directory]
  | | | ContentDescribes = 1
  | | | Unknown_cdep = .
  | | Media (SubDirectory) -->
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | MediaCreateDate = 3806220619
  | | | | MediaModifyDate = 3806220619
  | | | | MediaTimeScale = 600
  | | | | MediaDuration = 72751
  | | | | MediaLanguageCode = 21956
  | | | Handler (SubDirectory) -->
  | | | + [BinaryData directory, 44 bytes]
  | | | | HandlerClass = mhlr
  | | | | HandlerType = meta
  | | | | HandlerVendorID = appl
  | | | | HandlerDescription = .Core Media Metadata
  | | | MediaInfo (SubDirectory) -->
  | | | + [MediaInfo directory]
  | | | | GenMediaHeader (SubDirectory) -->
  | | | | + [GenMediaHeader directory]
  | | | | | GenMediaInfo (SubDirectory) -->
  | | | | | + [BinaryData directory, 16 bytes]
  | | | | | | GenMediaVersion = 0
  | | | | | | GenFlags = 0 0 0
  | | | | | | GenGraphicsMode = 64
  | | | | | | GenOpColor = 32768 32768 32768
  | | | | | | GenBalance = 0
  | | | | Handler (SubDirectory) -->
  | | | | + [BinaryData directory, 48 bytes]
  | | | | | HandlerClass = dhlr
  | | | | | HandlerType = alis
  | | | | | HandlerVendorID = appl
  | | | | | HandlerDescription = .Core Media Data Handler
  | | | | DataInfo (SubDirectory) -->
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | + [DataRef directory]
  | | | | | | Unknown_alis = .
  | | | | SampleTable (SubDirectory) -->
  | | | | + [SampleTable directory]
  | | | | | MetaSampleDesc (SubDirectory) -->
  | | | | | + [BinaryData directory, 24 bytes]
  | | | | | | MetaFormat = mebx
  | | | | | | MetaType = ..5keys
  | | | | | + [MetaSampleDesc directory]
  | | | | | | Keys (SubDirectory) -->
  | | | | | TimeToSampleTable = "...........................................+.........][snip]
  | | | | | SampleToChunk = ...........................................................[snip]
  | | | | | SampleSizes = .............................................................[snip]
  | | | | | ChunkOffset = ...J.9......I&..,.]3N]:e.@..F..MzcT..\.~d.lk..q}Oy.......D..B[snip]
  | Meta (SubDirectory) -->
  | + [Meta directory]
  | | Handler (SubDirectory) -->
  | | + [BinaryData directory, 26 bytes]
  | | | HandlerClass =
  | | | HandlerType = mdta
  | | | HandlerVendorID =
  | | | HandlerDescription =
  | | Keys (SubDirectory) -->
  | | + [Keys directory]
  | | | Added ItemList Tag 2.1 = (mdta) location.accuracy.horizontal
  | | | Added ItemList Tag 2.2 = (mdta) location.ISO6709
  | | | Added ItemList Tag 2.3 = (mdta) make
  | | | Added ItemList Tag 2.4 = (mdta) model
  | | | Added ItemList Tag 2.5 = (mdta) software
  | | | Added ItemList Tag 2.6 = (mdta) creationdate
  | | | Added ItemList Tag 2.7 = (mdta) keywords
  | | | Added ItemList Tag 2.8 = (mdta) rating.user
  | | ItemList (SubDirectory) -->
  | | + [ItemList directory]
  | | | LocationAccuracyHorizontal = 110.666667
  | | | GPSCoordinates = +xx.xxxx+xxx.xxxx+xxx.xxx/
  | | | Make = Apple
  | | | Model = iPhone 12 mini
  | | | Software = 17.5.1
  | | | CreationDate = 2024-08-11T14:30:19+0300
  | | | Keywords = xx
  | | | UserRating = 4
  MediaDataSize = 131251956
  MediaDataOffset = 97259
  MediaData

- Matti

Phil Harvey

Hi Matti.  You're using the wrong tag names.  Look at the ExifTool -s output for the correct ones or check the QuickTime Keys tag name documentation.

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

wywh

Quote from: Phil Harvey on August 20, 2024, 04:17:19 PMYou're using the wrong tag names

Oh doh! I did not notice that updating to v12.93 slightly changed the tag names:

exiftool -ver
12.92
exiftool -a -G1 -s -n -Keys:All 2024-0811-1430-19.mov
[Keys]          CameraLensModel                 : iPhone 12 mini back camera 4.2mm f/1.6
[Keys]          CameraFocalLength35mmEquivalent : 27

exiftool -ver
12.93
exiftool -a -G1 -s -n -Keys:All 2024-0811-1430-19.mov
[Keys]          LensModel                       : iPhone 12 mini back camera 4.2mm f/1.6
[Keys]          FocalLengthIn35mmFormat         : 27

-> But those tags seem to go to incorrect places and Photos.app does not read them like it does in iPhone movies:

exiftool -m -P -overwrite_original '-Keys:LensModel=iPhone 12 mini back camera 4.2mm f/1.6' test.mov
exiftool -m -P -overwrite_original '-Keys:FocalLengthIn35mmFormat=27' test.mov

exiftool -a -G5 -s -n -Keys:All test.mov
[MOV-Movie-Meta-Keys] LensModel                 : iPhone 12 mini back camera 4.2mm f/1.6
[MOV-Movie-Meta-Keys] FocalLengthIn35mmFormat   : 27

In the iPhone just those two Keys tags are in slightly different place than all other Keys tags (MOV vs MOV-Movie-Meta-Keys):

exiftool -a -G5 -s -n -Keys:All iphone.mov
[MOV-Movie-Meta-Keys] LocationAccuracyHorizontal: 110.666667
[MOV-Movie-Meta-Keys] GPSCoordinates            : xx.xxxx xx.xxxx xx.xxx
[MOV-Movie-Meta-Keys] Make                      : Apple
[MOV-Movie-Meta-Keys] Model                     : iPhone 12 mini
[MOV-Movie-Meta-Keys] Software                  : 17.5.1
[MOV-Movie-Meta-Keys] CreationDate              : 2024:08:11 14:30:19+03:00
[MOV-Movie-Meta-Keys] Keywords                  : xx
[MOV-Movie-Meta-Keys] UserRating                : 4
[MOV]           LensModel                       : iPhone 12 mini back camera 4.2mm f/1.6
[MOV]           FocalLengthIn35mmFormat         : 27

Those two tags seem to appear in iOS/iPadOS 17.

- Matti

Phil Harvey

Movie metadata is a real pain.  Could you send me a sample so I can take a look?  philharvey66 at gmail.com

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

Phil Harvey

I got your sample.  I see this:

> exiftool IMG_0619.MOV "-lensmodel*" -G5
[MOV-Movie-Track-Meta-Keys] Lens Model (und-FI) : iPad Air (5th generation) back camera 3mm f/1.8
[MOV]           Lens Model                      : iPad Air (5th generation) back camera 3mm f/1.8

The LensModel information is unfortunately stored at the track level, while ExifTool can create only top-level metadata in MOV videos.

The metadata path "[MOV]" is actually wrong -- I'll fix this.  This default-languge LensModel tag doesn't actually exist in the file.  It is a synthesized tag used for convenience only since otherwise you would have to specify LensModel-und-FI.  I should change the reported metadata path for this and make it either the same as the actual tag, or something like "Synthesized", I'm not sure which is better. [Edit: I've gone with the former.]

- Phil

Edit: This could be intentional by Apple.  The tags written to the video track are associated only with the camera optics, so it is true they aren't related to other tracks.  The distinction is fine, and one could easily see the bright young programmers at Apple putting the metadata there and totally ignoring the inconvenience that this would cause for everyone else.
...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 ($).

wywh

In exiftool 12.93 it is possible to copy LensModel and FocalLengthIn35mmFormat to a .mov as a block (?) like this:

exiftool -m -tagsFromFile IMG_0619.MOV -All test.mov                   

exiftool -a -G5 -s '-Model*' '-LensModel*' '-FocalLengthIn35mmFormat*' .

======== ./IMG_0619.MOV
[MOV-Movie-Meta-Keys] Model                     : iPad Air (5th generation)
[MOV-Movie-Track-Meta-Keys] LensModel-und-FI    : iPad Air (5th generation) back camera 3mm f/1.8
[MOV-Movie-Track-Meta-Keys] FocalLengthIn35mmFormat-und-FI: 30 mm
[MOV]           LensModel                       : iPad Air (5th generation) back camera 3mm f/1.8
[MOV]           FocalLengthIn35mmFormat         : 30 mm

======== ./test.mov
[MOV-Movie-UserData] Model                      : iPad Air (5th generation)
[MOV-Movie-UserData-XMP] Model                  : iPad Air (5th generation)
[MOV-Movie-Meta-Keys] LensModel-und-FI          : iPad Air (5th generation) back camera 3mm f/1.8
[MOV-Movie-UserData-XMP] LensModel              : iPad Air (5th generation) back camera 3mm f/1.8
[MOV-Movie-Meta-Keys] FocalLengthIn35mmFormat-und-FI: 30 mm
[MOV-Movie-UserData-XMP] FocalLengthIn35mmFormat: 30 mm
[MOV]           LensModel                       : iPad Air (5th generation) back camera 3mm f/1.8
[MOV]           FocalLengthIn35mmFormat         : 30 mm

But macOS Sonoma 14.6.1 Photos.app does not import those LensModel and FocalLengthIn35mmFormat tags. BTW Photos.app prefers Keys and imports UserData in a much more limited manner and ignores all XMP. Somehow tagsFromFile does not copy Keys:CreationDate so QuickTime:CreateDate that is +1 second is used instead. This tagsFromFile command also writes GPS to XMP which Photos.app ignores. (screen captures from Photos.app ):

Screenshot 2024-08-22 at 14.55.51 GMT+3.png
Screenshot 2024-08-22 at 14.56.01 GMT+3.png

> The tags written to the video track are associated only with the
> camera optics, so it is true they aren't related to other tracks

So maybe Apple thinks the user might change the lens during one movie shot so it writes that info at the track level?

- Matti

Phil Harvey

I'm dropping the ability to write these tags in 12.94 since it seems they weren't being written to the correct location. :(

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

wywh

Quote from: wywh on August 22, 2024, 08:24:02 AMSo maybe Apple thinks the user might change the lens during one movie shot so it writes that info at the track level?

That does not seem to be the case.

iPhone 13 Pro has Telephoto (9 mm, 77 mm equivalent) ƒ/2.8, Wide (5.7 mm, 26 mm equivalent) ƒ/1.5, and Ultra Wide (1.6 mm, 13 mm equivalent) ƒ/1.8 lenses.

My son took a movie while on-the-fly switching Wide -> Telephoto -> Wide -> Ultra Wide lenses during the same shot.

But macOS Sonoma 14.6.1 Photos.app Info reports only "Apple iPhone 13 Pro" and "Wide Camera - 26 mm ƒ1.5" lens for that movie (exiftool displays it as 27 mm equivalent).

Also exiftool v12.94 reports only one lens:

exiftool -a -G1 -s -n -ee -Keys:All '-*lens*' '-*focal*' IMG_9851.MOV
[Keys]          LocationAccuracyHorizontal      : 35.000000
[Keys]          GPSCoordinates                  : xx.xxxx xx.xxxx xx.xxx
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 13 Pro
[Keys]          Software                        : 17.5.1
[Keys]          CreationDate                    : 2024:08:28 20:16:37+03:00
[Track1]        CameraLensModel-fin-FI          : iPhone 13 Pro back camera 5.7mm f/1.5
[Track1]        CameraLensModel                 : iPhone 13 Pro back camera 5.7mm f/1.5
[Track1]        CameraFocalLength35mmEquivalent-fin-FI: 27
[Track1]        CameraFocalLength35mmEquivalent : 27

exiftool -a -G5 -s -n -ee -Keys:All '-*lens*' '-*focal*' IMG_9851.MOV
[MOV-Movie-Meta-Keys] LocationAccuracyHorizontal: 35.000000
[MOV-Movie-Meta-Keys] GPSCoordinates            : xx.xxxx xx.xxxx xx.xxx
[MOV-Movie-Meta-Keys] Make                      : Apple
[MOV-Movie-Meta-Keys] Model                     : iPhone 13 Pro
[MOV-Movie-Meta-Keys] Software                  : 17.5.1
[MOV-Movie-Meta-Keys] CreationDate              : 2024:08:28 20:16:37+03:00
[MOV-Movie-Track-Meta-Keys] CameraLensModel-fin-FI: iPhone 13 Pro back camera 5.7mm f/1.5
[MOV-Movie-Track-Meta-Keys] CameraLensModel     : iPhone 13 Pro back camera 5.7mm f/1.5
[MOV-Movie-Track-Meta-Keys] CameraFocalLength35mmEquivalent-fin-FI: 27
[MOV-Movie-Track-Meta-Keys] CameraFocalLength35mmEquivalent: 27

I guess it is not possible to copy or write that lens info at the track level:

exiftool -m -overwrite_original -api LargeFileSupport=1 '-Track1:CameraLensModel=iPhone 13 Pro back camera 5.7mm f/1.5' test.mov
Warning: Tag 'Track1:CameraLensModel' is not defined
Nothing to do.

A suboptimal workaround might be to write lens info to Keys in re-encoded movies although Photos.app does not read it. And as you said, unlike v12.93, v12.94 no longer supports that and it might be a good choice:

exiftool -m -P -overwrite_original -Keys:LensModel='iPhone 13 Pro back camera 5.7mm f/1.5' -Keys:FocalLengthIn35mmFormat=27 test.mov
Warning: Sorry, Keys:LensModel doesn't exist or isn't writable
Warning: Sorry, Keys:FocalLengthIn35mmFormat doesn't exist or isn't writable
Nothing to do.

- Matti

Phil Harvey

Hi Matti,

The Track metadata is not timed, so lens changes can't be accommodated by this metadata.

And yes, ExifTool currently only creates top-level metadata.  Adding the ability to create Track-level metadata would be possible, but I worry that things are already confusing enough for users due to the 3 possible top-level locations for video metadata.  This would multiply it by the number of tracks, and also put the onus on the user to determine which of the tracks to write (to do this properly, ExifTool should probably be modified to use track names such as AudioTrack/VideoTrack... instead of Track1/Track2... but this would introduce a level of backward incompatibility).

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

wywh

Quote from: wywh on August 30, 2024, 06:58:05 AMA suboptimal workaround might be to write lens info to Keys in re-encoded movies although Photos.app does not read it.

One workaround to save lens info in re-encoded movies is to copy it to XMP although none of my apps display it. A simple ffmpeg re-wrap as an example:

ffmpeg -i IMG_9851.MOV -c copy output.mov

exiftool -m -overwrite_original -api QuickTimeUTC=1 -api LargeFileSupport=1 -tagsFromFile IMG_9851.MOV -All:All '-XMP-exifEX:LensModel<CameraLensModel' '-XMP-exifEX:LensInfo<CameraFocalLength35mmEquivalent' '-FileCreateDate<QuickTime:CreateDate' '-FileModifyDate<QuickTime:CreateDate' output.mov

exiftool -a -G1 -s -n -api QuickTimeUTC=1 -FileCreateDate -FileModifyDate -QuickTime:CreateDate -Keys:All '-*lens*' '-*focal*' .
======== ./IMG_9851.MOV
[MacOS]         FileCreateDate                  : 2024:08:28 20:16:37+03:00
[System]        FileModifyDate                  : 2024:08:28 20:16:37+03:00
[QuickTime]     CreateDate                      : 2024:08:28 20:16:37+03:00
[Keys]          CreationDate                    : 2024:08:28 20:16:37+03:00
[Keys]          GPSCoordinates                  : 29.9792 31.1342 138.5
[Keys]          LocationAccuracyHorizontal      : 35.000000
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 13 Pro
[Keys]          Software                        : 17.5.1
[Track1]        CameraLensModel-fin-FI          : iPhone 13 Pro back camera 5.7mm f/1.5
[Track1]        CameraLensModel                 : iPhone 13 Pro back camera 5.7mm f/1.5
[Track1]        CameraFocalLength35mmEquivalent-fin-FI: 27
[Track1]        CameraFocalLength35mmEquivalent : 27
======== ./output.mov
[MacOS]         FileCreateDate                  : 2024:08:28 20:16:37+03:00
[System]        FileModifyDate                  : 2024:08:28 20:16:37+03:00
[QuickTime]     CreateDate                      : 2024:08:28 20:16:37+03:00
[Keys]          CreationDate                    : 2024:08:28 20:16:37+03:00
[Keys]          GPSCoordinates                  : 29.9792 31.1342 138.5
[Keys]          LocationAccuracyHorizontal      : 35.000000
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 13 Pro
[Keys]          Software                        : 17.5.1
[Keys]          MajorBrand                      : Apple QuickTime (.MOV/QT)
[Keys]          CompatibleBrands                : qt
[Keys]          MinorVersion                    : 0.0.0
[XMP-exifEX]    LensModel                       : iPhone 13 Pro back camera 5.7mm f/1.5
[XMP-exifEX]    LensInfo                        : 27

- Matti

wright96d

+1 request for track level metadata. Just released this on github without realizing everything ran through it was missing lens info.

gsparx

Is there no mechanism to be able to retain these keys in a way that is recognized by Photos.app / iCloud photos? I'm trimming MOV videos shot on an iPhone in an automated fashion, and I would like to be able to retain all metadata including the lens information if possible.

Saving to the XMP-exifEX tags retains the info of course, but I would like to have Photos.app display it.

StarGeek

Using this command will copy the Keys tags mentioned here
exiftool -TagsFromFile source.mp4 -All:All target.mp4

But if the data you want to keep is actually EXIF data (use the command in FAQ #3 to see the group it belongs to), then no. The best you can do is copy it to the XMP tags. EXIF data is non-standard in a video file and every company forces it into the file in different ways.

But it's doubtful that the photo app would be reading EXIF data in the first place because it is non-standard. Wywh would know more about it than I would.
"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

wywh

Quote from: gsparx on January 12, 2025, 04:58:52 PMIs there no mechanism to be able to retain these keys in a way that is recognized by Photos.app / iCloud photos?

You can copy almost all iPhone movie metadata to re-encoded movies in a format Photos.app can read with the exiftool command below. That track-level lens info is an exception so I have copied it to XMP for now.

I just tested and macOS 15 Sequoia QuickTime Player can trim and Photos.app can also edit and re-encode iPhone movies to H.265/264 so that lens info and all other metadata is preserved (Keys:CreationDate and other Keys are preserved -- QuickTime:CreateDate is the trim/edit date. Apple's apps prefer reading date from Keys or UserData anyway. GPS is otherwise preserved but altitude is reset to zero in the re-encoded movie).

exiftool -m -overwrite_original -api QuickTimeUTC=1 -api LargeFileSupport=1 -tagsFromFile input.mov -All:All '-FileCreateDate<Keys:CreationDate' '-FileModifyDate<Keys:CreationDate' output.mp4
ffmpeg v4-7 and ffmpeg-related GUIs do not properly copy movie metadata so it is best not to even try to preserve movie metadata with ffmpeg.

https://trac.ffmpeg.org/ticket/4209#comment:26
https://exiftool.org/forum/index.php?topic=15418.msg82847#msg82847

- Matti

gsparx

Quote from: wywh on January 13, 2025, 04:08:07 AMffmpeg v4-7 and ffmpeg-related GUIs do not properly copy movie metadata so it is best not to even try to preserve movie metadata with ffmpeg.

Unfortunately that's exactly what I'm trying to do :o Automate trimming a video with ffmpeg based on audio thresholds (calculated in a previous step) and time offsets

Something like:

ffmpeg -ss <start_time_s> -i input.mov -t <duration_s> -avoid_negative_ts disabled -map 0:0 -c:0 copy -tag:0 hvc1 -map 0:1 -c:1 copy -map_metadata 0 -movflags use_metadata_tags -movflags +faststart -default_mode infer_no_subs -ignore_unknown -y output.mov

and then recovering the mangled metadata with exiftool (by copying it from the input.mov) before importing it back to Photos.app.

It's working pretty well aside from the missing lens info like I mentioned. I'm storing it in XMP for now like wywh suggested (thanks for that).

If anyone is trying to do something similar, I did just discover `avconvert` which is a binary that ships with MacOS that does retain all metadata from an input.mov shot on an iPhone when trimming. My hunch is that this is the same or similar code that Quicktime is using for its trim functionality, but it's callable via command line.

I couldn't find any official documentation for it other than the manpage. It has a passthrough preset which is perfect for my goal.

For example to accomplish the same as the ffmpeg trim above

avconvert --start <start_time_s> --duration <duration_s> --source input.mov --output output.mov --replace --disableMetadataFilter --preset PresetPassthrough

The output.mov retains all of the metadata including the track specific metadata (including the lense info) and it's properly recognized by Photos.app.

It does seem slower than the ffmpeg trim command, so it may be doing an actual re-encode as opposed to the ffmpeg command which is just splitting on iframes and muxing.

wywh

Quote from: gsparx on January 15, 2025, 01:55:57 AM`avconvert` which is a binary that ships with MacOS that does retain all metadata from an input.mov shot on an iPhone when trimming. My hunch is that this is the same or similar code that Quicktime is using for its trim functionality, but it's callable via command line.
Thanks for the info about /usr/bin/avconvert! Like QuickTime Player and Photos.app it can preserve also Lens info in its output. I did a quick test:

With iPhone 16 Pro ProRes & PCM .mov as an input, and that trim command to .mov it correctly preserves Keys tags as well as Lens info in the Track data. Keys:CreationDate is the original, and QuickTime:CreateDate is the trim date.

With another .m4v with extra added Keys tags as an input, and .mp4 as trim output it converts Keys to UserData tags (Author, Description, LocationInformation) which Apple's apps can also read. But with .mp4 output it ignores some Keys tags (Make, Model). (avconvert refuses .mp4 output for that iPhone 16 Pro ProRes & PCM .mov because "specified file extension:mp4 not valid with preset:PresetPassthrough").

FWIW you can fix movie metadata from ffmpeg output with the exiftool command below. But copying tags from the original with tagsFromFile is a better fix because otherwise ffmpeg converts some movie tags with unexpected results.

exiftool -m -overwrite_original -api LargeFileSupport=1 -Keys:All= -tagsFromFile @ -Keys:All output.mov
- Matti

StarGeek

Quote from: gsparx on January 15, 2025, 01:55:57 AMIt does seem slower than the ffmpeg trim command, so it may be doing an actual re-encode as opposed to the ffmpeg command which is just splitting on iframes and muxing.

Yes, if it is anything slower than the ffmpeg command, then it is a lossy conversion. It's up to you to decide if keeping the metadata is more important than the video 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

wywh

I compared avconvert and ffmpeg passthrough with a 7.4 GB HD input .mp4.

Both output with not much CPU/GPU activity the same file size as input, with essentially the same bitrate and other MediaInfo details. So also avconvert seems to do a non-lossy passthrough without re-encoding. ffmpeg is a lot faster, though:

64 seconds (same without --disableMetadataFilter):

avconvert -s input.mp4 --disableMetadataFilter -p PresetPassthrough -o output.mov
30 seconds with .mp4 output:

avconvert -s input.mp4 -p PresetPassthrough -o output.mp4
8 seconds with ffmpeg 4:

ffmpeg -i input.mp4 -c copy output.mp4
With .mov output avconvert seems to convert essentially all metadata with --disableMetadataFilter. avconvert -h: "Disable the metadata filter. Use with caution. This will allow privacy sensitive source metadata to be preserved in the output file." Without that option GPSCoordinates and all other Keys tags except CreationDate, Make, Model, Software, and track data Lens info are omitted from the output.

Annoyingly with .mp4 output --disableMetadataFilter converts a few Keys to UserData tags (DateTimeOriginal, Author, DisplayName as Title, Description, LocationInformation) which Apple's apps can also read, though. With .m4v output it converts a few Keys as UserData (LocationInformation) and ItemList (ContentCreateDate, Author, DisplayName as Title, Title, Make as UserData_mak). Apple's apps read ItemList tags in a more limited manner. I wonder why Apple does not use only Keys tags which its apps more widely support.

- Matti

StarGeek

Quote from: wywh on January 15, 2025, 12:54:43 PMSo also avconvert seems to do a non-lossy passthrough without re-encoding. ffmpeg is a lot faster

Good to know
"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

Phil Harvey

ExifTool 13.13 will have the ability to write LensModel and FocalLengthIn35mmFormat to the video track.  I've introduced a new family 1 group name called "VideoKeys" to facilitate writing of Keys-type metadata to the video track.  Currently only these 2 tags are supported for writing.

- Phil

Edit: I found a few more VideoKeys tags in my samples, and will add write support for these as well:  CameraIdentifier, FrameReadoutTime and CaptureMode.

Edit2: I'll also define an AudioKeys group to allow tags to be written to the Audio track.
...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 ($).

gsparx

Quote from: Phil Harvey on January 16, 2025, 04:04:48 PMExifTool 13.13 will have the ability to write LensModel and FocalLengthIn35mmFormat to the video track.  I've introduced a new family 1 group name called "VideoKeys" to facilitate writing of Keys-type metadata to the video track.  Currently only these 2 tags are supported for writing.

Great to hear. Thank you!

Will that include CameraFocalLength35mmEquivalent and CameraLensModel as well? Or are those the same keys you mentioned?

[Keys]          Model                          : iPhone 15 Pro
[Keys]          Software                        : 18.2
[Keys]          CreationDate                    : 2025:01:09 18:34:09-08:00
[Track1]        CameraLensModel-und-US          : iPhone 15 Pro back camera 6.765mm f/1.78
[Track1]        CameraLensModel                : iPhone 15 Pro back camera 6.765mm f/1.78
[Track1]        CameraFocalLength35mmEquivalent-und-US: 27
[Track1]        CameraFocalLength35mmEquivalent : 27

Phil Harvey

Those are the same tags that I mentioned.  I'm using the names I mentioned to improve interoperability with EXIF.

ExifTool 13.13 will report them with the tag names that I used.  I plan to release this version on Monday.

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

wywh

Quote from: Phil Harvey on January 16, 2025, 04:04:48 PMExifTool 13.13 will have the ability to write LensModel and FocalLengthIn35mmFormat to the video track

Thanks, also Lens metadata can now be copied to re-encoded movies the same way they were in the originals.

For example copy all metadata including Lens info from one movie to another and set file dates (all Track*Date, Media*Date, Keys might not be updated if they do not exist in the source). Some Keys and XMP (via -Geolocate) tags were added to the source.mov, destination.mp4 had essentially no metadata.

exiftool -m -overwrite_original -api QuickTimeUTC=1 -api LargeFileSupport=1 -tagsFromFile source.mov -All:All '-FileCreateDate<QuickTime:CreateDate' '-FileModifyDate<QuickTime:CreateDate' destination.mp4

exiftool -a -G1 -s -n -api QuickTimeUTC=1 destination.mp4
[ExifTool]      ExifToolVersion                 : 13.13
[MacOS]         FileCreateDate                  : 2024:08:11 14:30:19+03:00
[System]        FileModifyDate                  : 2024:08:11 14:30:19+03:00
[QuickTime]     CreateDate                      : 2024:08:11 14:30:19+03:00
[Keys]          CreationDate                    : 2024:08:11 14:30:19+03:00
[Keys]          GPSCoordinates                  : 29.9792 31.1342 138.5
[Keys]          LocationName                    : Kirdāsah, Giza, Egypt
[Keys]          LocationAccuracyHorizontal      : 110.666667
[Keys]          Make                            : Apple
[Keys]          Model                           : iPhone 12 mini
[Keys]          Software                        : 17.5.1
[Keys]          Author                          : Author
[Keys]          Title                           : Title
[Keys]          DisplayName                     : DisplayName
[Keys]          Description                     : Description
[Keys]          Keywords                        : Keyword 1,Keyword 2
[Keys]          UserRating                      : 4
[VideoKeys]     LensModel                       : iPhone 12 mini back camera 4.2mm f/1.6
[VideoKeys]     LensModel-fin-FI                : iPhone 12 mini back camera 4.2mm f/1.6
[VideoKeys]     FocalLengthIn35mmFormat         : 27
[VideoKeys]     FocalLengthIn35mmFormat-fin-FI  : 27
[XMP-iptcCore]  CountryCode                     : EG
[XMP-photoshop] City                            : Kirdāsah
[XMP-photoshop] Country                         : Egypt
[XMP-photoshop] State                           : Giza

Or maybe store info from multiple cameras to an edited movie although XMP might be a better place for this:

exiftool -m -P -overwrite_original '-VideoKeys:LensModel=RF35mm F1.8 MACRO IS STM, iPhone 16 Pro back camera 6.765mm f/1.78' '-VideoKeys:FocalLengthIn35mmFormat=35, 25' '-Keys:Make=Canon, Apple' '-Keys:Model=Canon EOS R6, iPhone 16 Pro' '-Keys:Software=1.5.1, 18.2' '-XMP-exifEX:LensModel=RF35mm F1.8 MACRO IS STM, iPhone 16 Pro back camera 6.765mm f/1.78' '-XMP-exifEX:LensInfo=35, 25' multicamera.m4v

exiftool -a -G1 -s -Keys:All -VideoKeys:All -XMP:All multicamera.m4v
[Keys]          Make                            : Canon, Apple
[Keys]          Model                           : Canon EOS R6, iPhone 16 Pro
[Keys]          Software                        : 1.5.1, 18.2
[VideoKeys]     LensModel                       : RF35mm F1.8 MACRO IS STM, iPhone 16 Pro back camera 6.765mm f/1.78
[VideoKeys]     FocalLengthIn35mmFormat         : 35, 25
[XMP-exifEX]    LensModel                       : RF35mm F1.8 MACRO IS STM, iPhone 16 Pro back camera 6.765mm f/1.78
[XMP-exifEX]    LensInfo                        : 35 25

macOS 15 Sequoia Photos.app can display also that Lens info (Photos.app displays at least that Lens as "Wide Camera — 26 mm ƒ1.6". If I put Canon Keys Make/Model tags to the mix then Photos.app would display the same Lens info as exiftool above):

Photos.jpg

- Matti

gsparx

Quote from: Phil Harvey on January 18, 2025, 09:13:38 PMThose are the same tags that I mentioned.  I'm using the names I mentioned to improve interoperability with EXIF.

ExifTool 13.13 will report them with the tag names that I used.  I plan to release this version on Monday.

- Phil

Amazing. Tested out the new update and I can now retain lens information after trimming with ffmpeg. Thank you so much for making that change!

Phil Harvey

Great.

Note that I found a small bug in 13.13:  If writing both Audio/Video tags and ItemList tags in the same command, the ItemList tags may not be written if no Audio/Video or ItemList tags previously existed in the file.

This will be fixed in 13.14.

- Phil

Edit: 13.14 is now available
...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 ($).

wright96d

Quote from: Phil Harvey on January 16, 2025, 04:04:48 PMExifTool 13.13 will have the ability to write LensModel and FocalLengthIn35mmFormat to the video track.

Thanks a billion!