Movie metadata fails to display

Started by wywh, September 30, 2020, 12:27:04 PM

Previous topic - Next topic

wywh

Hello,

I experimented whether it is practical to save Descriptions and Keywords to movie files. I have an Excel sheet full of movie metadata and it would be nice to insert it to movies.

exiftool -m -P -overwrite_original_in_place -ItemList:Description='description' movie.m4v

exiftool -m -P -overwrite_original_in_place -ItemList:Keyword='keyword1,keyword2' movie.m4v


QuickTime Player's Get Info displays the Description, Author and Title in .m4v and Mojave and Catalina Photos.app 4.0 and 5.0 display the Description. Great, I'll just put the unsupported Keywords to Descriptions! But a big downer is that currently none of those tags are shown in .mp4 and .mov.

Anyway, what puzzled me was that while experimenting (by just adding and modifying Descriptions and Keywords to a bunch of .m4v files) I could somehow produce one .m4v where exiftool could successfully modify those tags but QuickTime Player and Photos.app no longer display them.

Final Cut Pro inserts Description and Author tags by default to exported .m4v. But I was surprised to find that with my rather strict Final Cut workflow in a few such very current random files QuickTime Player and Photos.app did not display them although the tags were there. I believe the movies were made with the same Final Cut version.

I unsuccessfully tried to create a new short sample file where the error could be seen but whatever I now did, the tags were displayed in QuickTime Player and Photos.app.

What could explain the failure to display those tags? Does the QuickTime:HandlerType=Metadata that seems to have been deleted in some step (and is also missing from all offending random Final Cut .m4v files) explain this? I tried to re-insert it but:

exiftool -QuickTime:HandlerType=Metadata modified.m4v
Warning: Sorry, QuickTime:HandlerType doesn't exist or isn't writable
Nothing to do.


For example, in this original .m4v QuickTime Player and Photos.app display the Description:

exiftool -a -G1 -s original.m4v
[ExifTool]      ExifToolVersion                 : 12.00
[System]        FileName                        : original.m4v
[System]        Directory                       : .
[System]        FileSize                        : 96 MB
[System]        FileModifyDate                  : 2020:08:05 11:01:24+03:00
[System]        FileAccessDate                  : 2020:09:29 16:51:03+03:00
[System]        FileInodeChangeDate             : 2020:09:30 18:22:14+03:00
[System]        FilePermissions                 : rw-r--r--
[File]          FileType                        : M4V
[File]          FileTypeExtension               : m4v
[File]          MIMEType                        : video/x-m4v
[QuickTime]     MajorBrand                      : Apple iTunes Video (.M4V) Video
[QuickTime]     MinorVersion                    : 0.0.1
[QuickTime]     CompatibleBrands                : M4V , M4A , mp42, isom
[QuickTime]     MovieHeaderVersion              : 0
[QuickTime]     CreateDate                      : 2020:08:05 08:01:24
[QuickTime]     ModifyDate                      : 2020:08:05 08:01:24
[QuickTime]     TimeScale                       : 25000
[QuickTime]     Duration                        : 0:01:18
[QuickTime]     PreferredRate                   : 1
[QuickTime]     PreferredVolume                 : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     PreviewTime                     : 0 s
[QuickTime]     PreviewDuration                 : 0 s
[QuickTime]     PosterTime                      : 0 s
[QuickTime]     SelectionTime                   : 0 s
[QuickTime]     SelectionDuration               : 0 s
[QuickTime]     CurrentTime                     : 0 s
[QuickTime]     NextTrackID                     : 5
[QuickTime]     HandlerType                     : Metadata
[QuickTime]     MediaDataSize                   : 100282773
[QuickTime]     MediaDataOffset                 : 46951
[Track1]        TrackHeaderVersion              : 0
[Track1]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track1]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track1]        TrackID                         : 1
[Track1]        TrackDuration                   : 0:01:18
[Track1]        TrackLayer                      : 0
[Track1]        TrackVolume                     : 100.00%
[Track1]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track1]        MediaHeaderVersion              : 0
[Track1]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track1]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track1]        MediaTimeScale                  : 48000
[Track1]        MediaDuration                   : 0:01:18
[Track1]        MediaLanguageCode               : eng
[Track1]        HandlerType                     : Audio Track
[Track1]        HandlerDescription              : Core Media Audio
[Track1]        Balance                         : 0
[Track1]        AudioFormat                     : mp4a
[Track1]        AudioChannels                   : 2
[Track1]        AudioBitsPerSample              : 16
[Track1]        AudioSampleRate                 : 48000
[Track2]        TrackHeaderVersion              : 0
[Track2]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track2]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track2]        TrackID                         : 2
[Track2]        TrackDuration                   : 0:01:18
[Track2]        TrackLayer                      : 0
[Track2]        TrackVolume                     : 0.00%
[Track2]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track2]        ImageWidth                      : 1920
[Track2]        ImageHeight                     : 1080
[Track2]        ChapterListTrackID              : 3 4
[Track2]        MediaHeaderVersion              : 0
[Track2]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track2]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track2]        MediaTimeScale                  : 25000
[Track2]        MediaDuration                   : 0:01:18
[Track2]        MediaLanguageCode               : und
[Track2]        HandlerType                     : Video Track
[Track2]        HandlerDescription              : Core Media Video
[Track2]        GraphicsMode                    : srcCopy
[Track2]        OpColor                         : 0 0 0
[Track2]        CompressorID                    : avc1
[Track2]        SourceImageWidth                : 1920
[Track2]        SourceImageHeight               : 1080
[Track2]        XResolution                     : 72
[Track2]        YResolution                     : 72
[Track2]        BitDepth                        : 24
[Track2]        ColorRepresentation             : nclx 1 1 1
[Track2]        VideoFieldOrder                 : Progressive; 0
[Track2]        PixelAspectRatio                : 1:1
[Track2]        VideoFrameRate                  : 25
[Track3]        TrackHeaderVersion              : 0
[Track3]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track3]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track3]        TrackID                         : 3
[Track3]        TrackDuration                   : 0:01:18
[Track3]        TrackLayer                      : 0
[Track3]        TrackVolume                     : 0.00%
[Track3]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track3]        ImageWidth                      : 1920
[Track3]        ImageHeight                     : 1080
[Track3]        MediaHeaderVersion              : 0
[Track3]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track3]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track3]        MediaTimeScale                  : 25
[Track3]        MediaDuration                   : 0:01:18
[Track3]        MediaLanguageCode               : eng
[Track3]        HandlerType                     : Text
[Track3]        HandlerDescription              : Core Media Text
[Track3]        OtherFormat                     : text
[Track3]        Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
[Track4]        TrackHeaderVersion              : 0
[Track4]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track4]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track4]        TrackID                         : 4
[Track4]        TrackDuration                   : 0:01:18
[Track4]        TrackLayer                      : 0
[Track4]        TrackVolume                     : 0.00%
[Track4]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track4]        ImageWidth                      : 1920
[Track4]        ImageHeight                     : 1080
[Track4]        MediaHeaderVersion              : 0
[Track4]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track4]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track4]        MediaTimeScale                  : 25
[Track4]        MediaDuration                   : 0:01:18
[Track4]        MediaLanguageCode               : und
[Track4]        HandlerType                     : Video Track
[Track4]        HandlerDescription              : Core Media Video
[Track4]        GraphicsMode                    : srcCopy
[Track4]        OpColor                         : 0 0 0
[Track4]        CompressorID                    : jpeg
[Track4]        SourceImageWidth                : 1920
[Track4]        SourceImageHeight               : 1080
[Track4]        XResolution                     : 72
[Track4]        YResolution                     : 72
[Track4]        BitDepth                        : 24
[Track4]        VideoFieldOrder                 : Progressive; 0
[Track4]        VideoFrameRate                  : 0.039
[ItemList]      Description                     : This video is about 2020-0805-1101-24
[ItemList]      Author                          : matti
[Composite]     ImageSize                       : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     AvgBitrate                      : 10.3 Mbps
[Composite]     Rotation                        : 0


Below is the modified .m4v where QuickTime Player and Photos.app fail to display the Description (even before I added GPS data):

exiftool -a -G1 -s modified.m4v
[ExifTool]      ExifToolVersion                 : 12.00
[System]        FileName                        : modified.m4v
[System]        Directory                       : .
[System]        FileSize                        : 96 MB
[System]        FileModifyDate                  : 2020:08:05 11:01:24+03:00
[System]        FileAccessDate                  : 2020:09:30 19:04:55+03:00
[System]        FileInodeChangeDate             : 2020:09:30 19:04:55+03:00
[System]        FilePermissions                 : rw-r--r--
[File]          FileType                        : M4V
[File]          FileTypeExtension               : m4v
[File]          MIMEType                        : video/x-m4v
[QuickTime]     MajorBrand                      : Apple iTunes Video (.M4V) Video
[QuickTime]     MinorVersion                    : 0.0.1
[QuickTime]     CompatibleBrands                : M4V , M4A , mp42, isom
[QuickTime]     MovieHeaderVersion              : 0
[QuickTime]     CreateDate                      : 2020:08:05 08:01:24
[QuickTime]     ModifyDate                      : 2020:08:05 08:01:24
[QuickTime]     TimeScale                       : 25000
[QuickTime]     Duration                        : 0:01:18
[QuickTime]     PreferredRate                   : 1
[QuickTime]     PreferredVolume                 : 100.00%
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     PreviewTime                     : 0 s
[QuickTime]     PreviewDuration                 : 0 s
[QuickTime]     PosterTime                      : 0 s
[QuickTime]     SelectionTime                   : 0 s
[QuickTime]     SelectionDuration               : 0 s
[QuickTime]     CurrentTime                     : 0 s
[QuickTime]     NextTrackID                     : 5
[QuickTime]     HandlerType                     : Metadata Tags
[QuickTime]     MediaDataSize                   : 100282773
[QuickTime]     MediaDataOffset                 : 47141
[Track1]        TrackHeaderVersion              : 0
[Track1]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track1]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track1]        TrackID                         : 1
[Track1]        TrackDuration                   : 0:01:18
[Track1]        TrackLayer                      : 0
[Track1]        TrackVolume                     : 100.00%
[Track1]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track1]        MediaHeaderVersion              : 0
[Track1]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track1]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track1]        MediaTimeScale                  : 48000
[Track1]        MediaDuration                   : 0:01:18
[Track1]        MediaLanguageCode               : eng
[Track1]        HandlerType                     : Audio Track
[Track1]        HandlerDescription              : Core Media Audio
[Track1]        Balance                         : 0
[Track1]        AudioFormat                     : mp4a
[Track1]        AudioChannels                   : 2
[Track1]        AudioBitsPerSample              : 16
[Track1]        AudioSampleRate                 : 48000
[Track2]        TrackHeaderVersion              : 0
[Track2]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track2]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track2]        TrackID                         : 2
[Track2]        TrackDuration                   : 0:01:18
[Track2]        TrackLayer                      : 0
[Track2]        TrackVolume                     : 0.00%
[Track2]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track2]        ImageWidth                      : 1920
[Track2]        ImageHeight                     : 1080
[Track2]        ChapterListTrackID              : 3 4
[Track2]        MediaHeaderVersion              : 0
[Track2]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track2]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track2]        MediaTimeScale                  : 25000
[Track2]        MediaDuration                   : 0:01:18
[Track2]        MediaLanguageCode               : und
[Track2]        HandlerType                     : Video Track
[Track2]        HandlerDescription              : Core Media Video
[Track2]        GraphicsMode                    : srcCopy
[Track2]        OpColor                         : 0 0 0
[Track2]        CompressorID                    : avc1
[Track2]        SourceImageWidth                : 1920
[Track2]        SourceImageHeight               : 1080
[Track2]        XResolution                     : 72
[Track2]        YResolution                     : 72
[Track2]        BitDepth                        : 24
[Track2]        ColorRepresentation             : nclx 1 1 1
[Track2]        VideoFieldOrder                 : Progressive; 0
[Track2]        PixelAspectRatio                : 1:1
[Track2]        VideoFrameRate                  : 25
[Track3]        TrackHeaderVersion              : 0
[Track3]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track3]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track3]        TrackID                         : 3
[Track3]        TrackDuration                   : 0:01:18
[Track3]        TrackLayer                      : 0
[Track3]        TrackVolume                     : 0.00%
[Track3]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track3]        ImageWidth                      : 1920
[Track3]        ImageHeight                     : 1080
[Track3]        MediaHeaderVersion              : 0
[Track3]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track3]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track3]        MediaTimeScale                  : 25
[Track3]        MediaDuration                   : 0:01:18
[Track3]        MediaLanguageCode               : eng
[Track3]        HandlerType                     : Text
[Track3]        HandlerDescription              : Core Media Text
[Track3]        OtherFormat                     : text
[Track3]        Warning                         : [minor] The ExtractEmbedded option may find more tags in the media data
[Track4]        TrackHeaderVersion              : 0
[Track4]        TrackCreateDate                 : 2020:08:05 08:01:24
[Track4]        TrackModifyDate                 : 2020:08:05 08:01:24
[Track4]        TrackID                         : 4
[Track4]        TrackDuration                   : 0:01:18
[Track4]        TrackLayer                      : 0
[Track4]        TrackVolume                     : 0.00%
[Track4]        MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[Track4]        ImageWidth                      : 1920
[Track4]        ImageHeight                     : 1080
[Track4]        MediaHeaderVersion              : 0
[Track4]        MediaCreateDate                 : 2020:08:05 08:01:24
[Track4]        MediaModifyDate                 : 2020:08:05 08:01:24
[Track4]        MediaTimeScale                  : 25
[Track4]        MediaDuration                   : 0:01:18
[Track4]        MediaLanguageCode               : und
[Track4]        HandlerType                     : Video Track
[Track4]        HandlerDescription              : Core Media Video
[Track4]        GraphicsMode                    : srcCopy
[Track4]        OpColor                         : 0 0 0
[Track4]        CompressorID                    : jpeg
[Track4]        SourceImageWidth                : 1920
[Track4]        SourceImageHeight               : 1080
[Track4]        XResolution                     : 72
[Track4]        YResolution                     : 72
[Track4]        BitDepth                        : 24
[Track4]        VideoFieldOrder                 : Progressive; 0
[Track4]        VideoFrameRate                  : 0.039
[ItemList]      Description                     : This video is about 2020-0805-1101-24
[ItemList]      Author                          : matti
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Title                           : title
[Keys]          GPSCoordinates                  : 29 deg 58' 36.84" N, 31 deg 8' 6.36" E, 50.5 m Above Sea Level
[Composite]     ImageSize                       : 1920x1080
[Composite]     Megapixels                      : 2.1
[Composite]     AvgBitrate                      : 10.3 Mbps
[Composite]     GPSAltitude                     : 50.5 m
[Composite]     GPSAltitudeRef                  : Above Sea Level
[Composite]     GPSLatitude                     : 29 deg 58' 36.84" N
[Composite]     GPSLongitude                    : 31 deg 8' 6.36" E
[Composite]     Rotation                        : 0
[Composite]     GPSPosition                     : 29 deg 58' 36.84" N, 31 deg 8' 6.36" E


- Matti

Phil Harvey

#1
Interesting.  Yes, ExifTool doesn't write HanderType.  Something changed the top level HandlerType from "Metadata" (mdir) to "Metadata Tags" (mdta).  What could have done this?  I didn't even know this was significant.

Just out of interest, could you attach the -v3 output for each of these files?

- Phil

Edit:  I wonder if adding the Keys metadata is causing this effect?  ExifTool will create a Meta object with an mdta handler when writing Keys information if it didn't exist.
...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 September 30, 2020, 12:42:41 PM
Just out of interest, could you attach the -v3 output for each of these files?

Like this (attached zipped exiftool -v3 output for original.m4v and the offending modified.m4v that fails to display Description and Title)?

- Matti

Phil Harvey

Yes.

Try deleting Keys:all in the modified file to see if that changes things.

- 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

#4
After...

exiftool -Keys:all= modified.m4v

...the Description still fails to display in QuickTime Player and Photos.app 4.0 despite existing ItemList:Description (GPS location did disappear with Keys:GPSCoordinates as expected). 'QuickTime:HandlerType=Metadata Tags' as before.

The problem occurred before adding -Keys:GPSCoordinates and many Final Cut .m4v with this problem don't have Keys but I might have adjusted their QuickTime dates.

Phil Harvey

Hmmm.  Well, I don't have any other clever ideas.  The thing to do would be to take baby steps in your workflow (ie. change one tag at a time) and check with QuickTime Player at each step to see exactly what causes the problem.  Unfortunately I don't have time to do this myself right now.

- 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

#6
I can trigger the error in the attached zipped .m4v with the following workflow.

Original tags. QuickTime Player displays Title, Author and Description and Mojave Photos.app 4.0 displays Description:

[QuickTime]     HandlerType                     : Metadata
[ItemList]      Description                     : description
[ItemList]      Author                          : author
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Title                           : title


OK, let's change the Author:

exiftool -m -P -overwrite_original_in_place -ItemList:Author='author2' movie.m4v

(Changing them all has a similar effect):

exiftool -m -P -overwrite_original_in_place -ItemList:Description='description2' -ItemList:Author='author2' -ItemList:Keyword='keyword3,keyword4' -ItemList:Title='title' movie.m4v

So either command has this kind of effect by duplicating the the Author tag:

[QuickTime]     HandlerType                     : Metadata
[ItemList]      Description                     : description2
[ItemList]      Author                          : author2
[ItemList]      Keyword                         : keyword3,keyword4
[ItemList]      Title                           : title
[ItemList]      Author                          : author2


Why did I get Author in two lines? It works just fine in QuickTime Player and Photos.app but let's be pedantic and start over and nuke them all with:

exiftool -m -P -overwrite_original_in_place -ItemList:Description= -ItemList:Author= -ItemList:Keyword= -ItemList:Title= movie.m4v

OK, ItemList items vanished but also the QuickTime:HandlerType is gone. Let's reset them to their original state:

exiftool -m -P -overwrite_original_in_place -ItemList:Description='description' -ItemList:Author='author' -ItemList:Keyword='keyword1,keyword2' -ItemList:Title='title' movie.m4v

[ItemList]      Author                          : author
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Description                     : description
[ItemList]      Title                           : title


OK, all ItemList items are back but QuickTime:HandlerType=Metadata is still missing and QuickTime Player and Photos.app display none of those tags.

How can get the QuickTime Player and Photos.app display those tags again?

I could not trigger a situation where QuickTime:HandlerType= was changed from 'Metadata' to 'Metadata Tags' which also seems to cause a failure to display the tags.

(AFAIR originally I got a similar duplicated Author when copying & pasting text from a LibreOffice sheet to the 'description'  tag. Then also return \n was pasted and the command was semi-accidentally executed right away but I could not trigger the duplicated Author with just a pasted return).

- Matti

Phil Harvey

Hi Matti,

Thanks for looking into this.  When I get some time I'll try to reproduce the steps you took and analyze the files along the way.  It looks like there may be something that ExifTool could be doing for better compatibility with the QuickTime Player.

- 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

FWIW for some strange reason unlike other similar tags, ItemList:Author behaves differently besides duplicating itself. If it is deleted and re-inserted, QuickTime Player does not display it again no matter what (attached QuickTime Player's Get Info original vs edited movie. Keywords display is not supported.):

Original:

[ItemList]      Description                     : description
[ItemList]      Author                          : author
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Title                           : title

Delete Author:

exiftool -m -P -overwrite_original_in_place -ItemList:Author= movie.m4v
[ItemList]      Description                     : description
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Title                           : title

Re-insert Author:

exiftool -m -P -overwrite_original_in_place -ItemList:Author=author movie.m4v
[ItemList]      Description                     : description
[ItemList]      Keyword                         : keyword1,keyword2
[ItemList]      Title                           : title
[ItemList]      Author                          : author

-> QuickTime Player does not display Author.


And if all those four ItemList tags are deleted and re-inserted, then QuickTime:HandlerType=Metadata is permanently deleted and then QuickTime Player does not display none of those tags.

- Matti