duplicate tags output e.g. QuickTime:MediaDuration

Started by LookTouch Photo, March 24, 2023, 04:18:53 AM

Previous topic - Next topic

LookTouch Photo

Hi there

Phil, thanks for creating/maintaining this invaluable tool! And even more for the sustained support of the community.
For video files exiftool is reporting duplicate tags, but only for large ones. And because they all belog to the same family QuickTime I can not filter by family.
Platform: W10 22H2 19045.2728
exiftool 12.49

exiftool  -api LargeFileSupport=1 -G -file:basename -fileextension -imagesize -mediaduration -trackduration -filesize *.mp4

======== VID_20230323_151906.mp4
[File]          Base Name                       : VID_20230323_151906
[Composite]     File Extension                  : mp4
[Composite]     Image Size                      : 1920x1080
[QuickTime]     Media Duration                  : 22.97 s
[QuickTime]     Track Duration                  : 22.97 s
[File]          File Size                       : 58 MB
======== VID_20230323_152313.mp4
[File]          Base Name                       : VID_20230323_152313
[Composite]     File Extension                  : mp4
[Composite]     Image Size                      : 1920x1080
[QuickTime]     Media Duration                  : 0:04:38
[QuickTime]     Track Duration                  : 0:04:38
[File]          File Size                       : 696 MB
======== VID_20230323_155803.mp4
[File]          Base Name                       : VID_20230323_155803
[Composite]     File Extension                  : mp4
[Composite]     Image Size                      : 1920x1080
[QuickTime]     Media Duration                  : 0:28:24
[QuickTime]     Media Duration                  : 0:28:24
[QuickTime]     Track Duration                  : 0:28:24
[QuickTime]     Track Duration                  : 0:28:24
[File]          File Size                       : 4.3 GB
    3 image files read
Any way to remove the duplicates?

Thanks again!
OS Windows10

Phil Harvey

Can you post the -v2 output for VID_20230323_155803.mp4 ?

I would like to see the details about where these tags are stored.

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

LookTouch Photo

here it is

exiftool -api LargeFileSupport=1 -G -file:basename -fileextension -imagesize -mediaduration -trackduration -filesize  VID_20230323_155803.mp4 -v2

  ExifToolVersion = 12.49
  Now = 2023:03:25 10:10:26+01:00
  NewGUID = 2023032510102600269824DA9D180210
  FileSequence = 0
  FileName = VID_20230323_155803.mp4
  BaseName = VID_20230323_155803
  Directory = .
  FilePath = E:\DevelopData\LPR\Platescans\raw data\VID_20230323_155803.mp4
  FileSize = 4301616510
  FileModifyDate = 1679585188
  FileAccessDate = 1679735388.77997
  FileCreateDate = 1679585188
  FilePermissions = 33206
  FileAttributes = 32768 0 32
  FileDeviceNumber = 0
  FileInodeNumber = 0
  FileHardLinks = 1
  FileUserID = 0
  FileGroupID = 0
  FileDeviceID = 0
  FileBlockSize =
  FileBlockCount =
  FileType = MP4
  FileTypeExtension = MP4
  MIMEType = video/mp4
  FileType (SubDirectory) -->
  - Tag 'ftyp' (16 bytes)
  + [BinaryData directory, 16 bytes]
  | MajorBrand = mp42
  | - Tag 0x0000 (4 bytes, undef[4])
  | MinorVersion =
  | - Tag 0x0001 (4 bytes, undef[4])
  | CompatibleBrands = isommp42
  | - Tag 0x0002 (8 bytes, undef[8])
  Free = 000000000000000000000000000000000000000000000000000000000000000000000000000000[snip]
  - Tag 'free' (405202 bytes)
  MediaDataSize = 4300253779
  MediaDataOffset = 405250
  MediaData
  - Tag 'mdat' at offset 0x62f02 (4300253779 bytes)
  Movie (SubDirectory) -->
  - Tag 'moov' (957473 bytes)
  + [Movie directory]
  | MovieHeader (SubDirectory) -->
  | - Tag 'mvhd' (100 bytes)
  | + [BinaryData directory, 100 bytes]
  | | MovieHeaderVersion = 0
  | | - Tag 0x0000 (1 bytes, int8u[1])
  | | CreateDate = 3762429988
  | | - Tag 0x0001 (4 bytes, int32u[1])
  | | ModifyDate = 3762429988
  | | - Tag 0x0002 (4 bytes, int32u[1])
  | | TimeScale = 10000
  | | - Tag 0x0003 (4 bytes, int32u[1])
  | | Duration = 17039947
  | | - Tag 0x0004 (4 bytes, int32u[1])
  | | PreferredRate = 65536
  | | - Tag 0x0005 (4 bytes, int32u[1])
  | | PreferredVolume = 256
  | | - Tag 0x0006 (2 bytes, int16u[1])
  | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | - Tag 0x0009 (36 bytes, fixed32s[9])
  | | PreviewTime = 0
  | | - Tag 0x0012 (4 bytes, int32u[1])
  | | PreviewDuration = 0
  | | - Tag 0x0013 (4 bytes, int32u[1])
  | | PosterTime = 0
  | | - Tag 0x0014 (4 bytes, int32u[1])
  | | SelectionTime = 0
  | | - Tag 0x0015 (4 bytes, int32u[1])
  | | SelectionDuration = 0
  | | - Tag 0x0016 (4 bytes, int32u[1])
  | | CurrentTime = 0
  | | - Tag 0x0017 (4 bytes, int32u[1])
  | | NextTrackID = 3
  | | - Tag 0x0018 (4 bytes, int32u[1])
  | UserData (SubDirectory) -->
  | - Tag 'udta' (30 bytes)
  | + [UserData directory]
  | | GPSCoordinates = ...+47.4105+008.2239/
  | | - Tag '\xa9xyz' (22 bytes)
  | Meta (SubDirectory) -->
  | - Tag 'meta' (169 bytes)
  | + [Meta directory]
  | | Handler (SubDirectory) -->
  | | - Tag 'hdlr' (25 bytes)
  | | + [BinaryData directory, 25 bytes]
  | | | HandlerClass =
  | | | - Tag 0x0004 (4 bytes, undef[4])
  | | | HandlerType = mdta
  | | | - Tag 0x0008 (4 bytes, undef[4])
  | | | HandlerVendorID =
  | | | - Tag 0x000c (4 bytes, undef[4])
  | | | HandlerDescription =
  | | | - Tag 0x0018 (1 bytes, string[1])
  | | Keys (SubDirectory) -->
  | | - Tag 'keys' (66 bytes)
  | | + [Keys directory]
  | | | Added ItemList Tag 1.1 = (mdta) com.android.version
  | | | Added ItemList Tag 1.2 = (mdta) android.capture.fps (Unknown)
  | | ItemList (SubDirectory) -->
  | | - Tag 'ilst' (54 bytes)
  | | + [ItemList directory]
  | | | AndroidVersion = 12
  | | | - Tag '1.1', Type='data', Flags=0x1, Lang=0x0000 (2 bytes)
  | | | AndroidCaptureFps = 30
  | | | - Tag '1.2', Type='data', Flags=0x17, Lang=0x0000 (4 bytes, float)
  | Track (SubDirectory) -->
  | - Tag 'trak' (623569 bytes)
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | - Tag 'tkhd' (84 bytes)
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | - Tag 0x0000 (1 bytes, int8u[1])
  | | | TrackCreateDate = 3762429988
  | | | - Tag 0x0001 (4 bytes, int32u[1])
  | | | TrackModifyDate = 3762429988
  | | | - Tag 0x0002 (4 bytes, int32u[1])
  | | | TrackID = 1
  | | | - Tag 0x0003 (4 bytes, int32u[1])
  | | | TrackDuration = 17039833
  | | | - Tag 0x0005 (4 bytes, int32u[1])
  | | | TrackLayer = 0
  | | | - Tag 0x0008 (2 bytes, int16u[1])
  | | | TrackVolume = 0
  | | | - Tag 0x0009 (2 bytes, int16u[1])
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | - Tag 0x000a (36 bytes, fixed32s[9])
  | | | ImageWidth = 125829120
  | | | - Tag 0x0013 (4 bytes, int32u[1])
  | | | ImageHeight = 70778880
  | | | - Tag 0x0014 (4 bytes, int32u[1])
  | | Unknown_edts = .elst........
  | | - Tag 'edts' (28 bytes)
  | | Media (SubDirectory) -->
  | | - Tag 'mdia' (623433 bytes)
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | - Tag 'mdhd' (24 bytes)
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | - Tag 0x0000 (4 bytes, int32u[1])
  | | | | MediaCreateDate = 3762429988
  | | | | - Tag 0x0001 (4 bytes, int32u[1])
  | | | | MediaModifyDate = 3762429988
  | | | | - Tag 0x0002 (4 bytes, int32u[1])
  | | | | MediaTimeScale = 90000
  | | | | - Tag 0x0003 (4 bytes, int32u[1])
  | | | | MediaDuration = 153358501
  | | | | - Tag 0x0004 (4 bytes, int32u[1])
  | | | | MediaLanguageCode = 0
  | | | | - Tag 0x0005 (2 bytes, int16u[1])
  | | | Handler (SubDirectory) -->
  | | | - Tag 'hdlr' (36 bytes)
  | | | + [BinaryData directory, 36 bytes]
  | | | | HandlerClass =
  | | | | - Tag 0x0004 (4 bytes, undef[4])
  | | | | HandlerType = vide
  | | | | - Tag 0x0008 (4 bytes, undef[4])
  | | | | HandlerVendorID =
  | | | | - Tag 0x000c (4 bytes, undef[4])
  | | | | HandlerDescription = VideoHandle
  | | | | - Tag 0x0018 (12 bytes, string[12])
  | | | MediaInfo (SubDirectory) -->
  | | | - Tag 'minf' (623349 bytes)
  | | | + [MediaInfo directory]
  | | | | VideoHeader (SubDirectory) -->
  | | | | - Tag 'vmhd' (12 bytes)
  | | | | + [BinaryData directory, 12 bytes]
  | | | | | GraphicsMode = 0
  | | | | | - Tag 0x0002 (2 bytes, int16u[1])
  | | | | | OpColor = 0 0 0
  | | | | | - Tag 0x0003 (6 bytes, int16u[3])
  | | | | DataInfo (SubDirectory) -->
  | | | | - Tag 'dinf' (28 bytes)
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | - Tag 'dref' (20 bytes)
  | | | | | + [DataRef directory]
  | | | | | | URL = .
  | | | | | | - Tag 'url ' (4 bytes, undef)
  | | | | SampleTable (SubDirectory) -->
  | | | | - Tag 'stbl' (623285 bytes)
  | | | | + [SampleTable directory]
  | | | | | VideoSampleDesc (SubDirectory) -->
  | | | | | - Tag 'stsd' (157 bytes)
  | | | | | + [BinaryData directory, 94 bytes]
  | | | | | | CompressorID = avc1
  | | | | | | - Tag 0x0002 (4 bytes, string[4])
  | | | | | | VendorID =
  | | | | | | - Tag 0x000a (4 bytes, string[4])
  | | | | | | SourceImageWidth = 1920
  | | | | | | - Tag 0x0010 (2 bytes, int16u[1])
  | | | | | | SourceImageHeight = 1080
  | | | | | | - Tag 0x0011 (2 bytes, int16u[1])
  | | | | | | XResolution = 72
  | | | | | | - Tag 0x0012 (4 bytes, fixed32u[1])
  | | | | | | YResolution = 72
  | | | | | | - Tag 0x0014 (4 bytes, fixed32u[1])
  | | | | | | CompressorName =
  | | | | | | - Tag 0x0019 (32 bytes, string[32])
  | | | | | | BitDepth = 24
  | | | | | | - Tag 0x0029 (2 bytes, int16u[1])
  | | | | | + [VideoSampleDesc directory]
  | | | | | | AVCConfiguration = .d....gd........V.....BS...h....
  | | | | | | - Tag 'avcC' (36 bytes)
  | | | | | | ColorRepresentation (SubDirectory) -->
  | | | | | | - Tag 'colr' (11 bytes)
  | | | | | | + [BinaryData directory, 11 bytes]
  | | | | | | | ColorProfiles = nclx
  | | | | | | | - Tag 0x0000 (4 bytes, undef[4])
  | | | | | | | ColorPrimaries = 1
  | | | | | | | - Tag 0x0004 (2 bytes, int16u[1])
  | | | | | | | TransferCharacteristics = 1
  | | | | | | | - Tag 0x0006 (2 bytes, int16u[1])
  | | | | | | | MatrixCoefficients = 1
  | | | | | | | - Tag 0x0008 (2 bytes, int16u[1])
  | | | | | VideoFrameRate = vx..\....U....T....S....T....W....Q....U....S....U....T...[snip]
  | | | | | - Tag 'stts' (242632 bytes, undef)
  | | | | | CompositionTimeToSample = H...=..=.....=.....=.....=.....=.....=.....=.....[snip]
  | | | | | - Tag 'ctts' (149048 bytes)
  | | | | | SyncSampleTable = ....;Xu.......#.@.].z...........(.E.b.............-.J.g..[snip]
  | | | | | - Tag 'stss' (7084 bytes)
  | | | | | SampleSizes = .L.GP.."cw.%O..BV..L../Ou.."tb'..O..=@..LE..vB..R?...Ev..[..6[snip]
  | | | | | - Tag 'stsz' (205116 bytes)
  | | | | | SampleToChunk = ...!..... ..... ..... ...." .#..$..%..* .+..5 .6..7 .8..: .[snip]
  | | | | | - Tag 'stsc' (5984 bytes)
  | | | | | ChunkOffset64 = .r..+...5.@Fe.U.7g.3z.?.... ..X........"l.)a..U|..|........[snip]
  | | | | | - Tag 'co64' (13208 bytes)
  | Track (SubDirectory) -->
  | - Tag 'trak' (333551 bytes)
  | + [Track directory]
  | | TrackHeader (SubDirectory) -->
  | | - Tag 'tkhd' (84 bytes)
  | | + [BinaryData directory, 84 bytes]
  | | | TrackHeaderVersion = 0
  | | | - Tag 0x0000 (1 bytes, int8u[1])
  | | | TrackCreateDate = 3762429988
  | | | - Tag 0x0001 (4 bytes, int32u[1])
  | | | TrackModifyDate = 3762429988
  | | | - Tag 0x0002 (4 bytes, int32u[1])
  | | | TrackID = 2
  | | | - Tag 0x0003 (4 bytes, int32u[1])
  | | | TrackDuration = 17039947
  | | | - Tag 0x0005 (4 bytes, int32u[1])
  | | | TrackLayer = 0
  | | | - Tag 0x0008 (2 bytes, int16u[1])
  | | | TrackVolume = 256
  | | | - Tag 0x0009 (2 bytes, int16u[1])
  | | | MatrixStructure = 1 0 0 0 1 0 0 0 16384
  | | | - Tag 0x000a (36 bytes, fixed32s[9])
  | | | ImageWidth = 0
  | | | - Tag 0x0013 (4 bytes, int32u[1])
  | | | ImageHeight = 0
  | | | - Tag 0x0014 (4 bytes, int32u[1])
  | | Media (SubDirectory) -->
  | | - Tag 'mdia' (333451 bytes)
  | | + [Media directory]
  | | | MediaHeader (SubDirectory) -->
  | | | - Tag 'mdhd' (24 bytes)
  | | | + [BinaryData directory, 24 bytes]
  | | | | MediaHeaderVersion = 0
  | | | | - Tag 0x0000 (4 bytes, int32u[1])
  | | | | MediaCreateDate = 3762429988
  | | | | - Tag 0x0001 (4 bytes, int32u[1])
  | | | | MediaModifyDate = 3762429988
  | | | | - Tag 0x0002 (4 bytes, int32u[1])
  | | | | MediaTimeScale = 48000
  | | | | - Tag 0x0003 (4 bytes, int32u[1])
  | | | | MediaDuration = 81791746
  | | | | - Tag 0x0004 (4 bytes, int32u[1])
  | | | | MediaLanguageCode = 0
  | | | | - Tag 0x0005 (2 bytes, int16u[1])
  | | | Handler (SubDirectory) -->
  | | | - Tag 'hdlr' (36 bytes)
  | | | + [BinaryData directory, 36 bytes]
  | | | | HandlerClass =
  | | | | - Tag 0x0004 (4 bytes, undef[4])
  | | | | HandlerType = soun
  | | | | - Tag 0x0008 (4 bytes, undef[4])
  | | | | HandlerVendorID =
  | | | | - Tag 0x000c (4 bytes, undef[4])
  | | | | HandlerDescription = SoundHandle
  | | | | - Tag 0x0018 (12 bytes, string[12])
  | | | MediaInfo (SubDirectory) -->
  | | | - Tag 'minf' (333367 bytes)
  | | | + [MediaInfo directory]
  | | | | AudioHeader (SubDirectory) -->
  | | | | - Tag 'smhd' (8 bytes)
  | | | | + [BinaryData directory, 8 bytes]
  | | | | | Balance = 0
  | | | | | - Tag 0x0002 (2 bytes, fixed16s[1])
  | | | | DataInfo (SubDirectory) -->
  | | | | - Tag 'dinf' (28 bytes)
  | | | | + [DataInfo directory]
  | | | | | DataRef (SubDirectory) -->
  | | | | | - Tag 'dref' (20 bytes)
  | | | | | + [DataRef directory]
  | | | | | | URL = .
  | | | | | | - Tag 'url ' (4 bytes, undef)
  | | | | SampleTable (SubDirectory) -->
  | | | | - Tag 'stbl' (333307 bytes)
  | | | | + [SampleTable directory]
  | | | | | AudioSampleDesc (SubDirectory) -->
  | | | | | - Tag 'stsd' (83 bytes)
  | | | | | + [BinaryData directory, 44 bytes]
  | | | | | | AudioFormat = mp4a
  | | | | | | - Tag 0x0004 (4 bytes, undef[4])
  | | | | | | AudioVendorID =
  | | | | | | - Tag 0x0014 (4 bytes, undef[4])
  | | | | | | AudioChannels = 2
  | | | | | | - Tag 0x0018 (2 bytes, int16u[1])
  | | | | | | AudioBitsPerSample = 16
  | | | | | | - Tag 0x001a (2 bytes, int16u[1])
  | | | | | | AudioSampleRate = 48000
  | | | | | | - Tag 0x0020 (4 bytes, fixed32u[1])
  | | | | | + [AudioSampleDesc directory]
  | | | | | | Unknown_esds = ....@.............
  | | | | | | - Tag 'esds' (31 bytes)
  | | | | | TimeToSampleTable = ..8..
  | | | | | - Tag 'stts' (16 bytes)
  | | | | | SampleSizes = .8......................................................).N..[snip]
  | | | | | - Tag 'stsz' (319516 bytes)
  | | | | | SampleToChunk = ..1../.....
  | | | | | - Tag 'stsc' (44 bytes)
  | | | | | ChunkOffset64 = .../..!.5Y@F..U.7gD3z.?.)..JQ.3Z....J....l.)...U...|....p..[snip]
  | | | | | - Tag 'co64' (13608 bytes)
  | Unknown_titl = oppo_0
  | - Tag 'titl' (6 bytes)
  ProcessingTime = 0.076673
[File]          Base Name                       : VID_20230323_155803
[Composite]     File Extension                  : mp4
[Composite]     Image Size                      : 1920x1080
[QuickTime]     Media Duration                  : 0:28:24
[QuickTime]     Media Duration                  : 0:28:24
[QuickTime]     Track Duration                  : 0:28:24
[QuickTime]     Track Duration                  : 0:28:24
[File]          File Size                       : 4.3 GB

OS Windows10

LookTouch Photo

I just realized: the first two files were recorded in "timelapse" mode, the last one as "video".
OS Windows10

Phil Harvey

OK.  This is absolutely normal.  The video has multiple tracks, each with its own metadata.  For example, from one of my samples here:

> exiftool a.mp4 -handlertype -mediaduration -G1
[Track1]        Handler Type                    : Video Track
[Track2]        Handler Type                    : Audio Track
[Track1]        Media Duration                  : 15.32 s
[Track2]        Media Duration                  : 15.32 s

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