Tag add/change works on JPG files but not MP4 files

Started by SailorGuy, January 13, 2016, 03:28:22 PM

Previous topic - Next topic

SailorGuy

I have anEXIFtool command string that adds/changes two tags 1) for a Windows-displayable comment and 2) the "date taken" based on the first 8-characters of the filename (yyyymmdd).

The command-string works fine on JPG files but not on MP4 files.  On MP4 files, no comment is added and the date taken is not changed.

The filenames are:

19920620-M&T_Honeymoon_Photo_Album-001.jpg
19920618-[DPDHi8]_Mark_Teresa_Wedding_Rehearsal_2Bluegrass_Music.mp4

Here is the command script:

EXIFtool -v2 -a -P -Overwrite_Original -args "-AllDates<${filename;s/-.*//} 12:34:56" ^
-XPComment="Scanned Photo"  *.jpg

EXIFtool -v2 -a -P -Overwrite_Original -args "-AllDates<${filename;s/-.*//} 12:34:56" ^
-XPComment="DPD Hi8"  *.mp4

I have included the trace log of the EXIFtool output that shows the JPG script working, and the MP4 script seemingly working, but nothing is changed on the MP4 file.

I have also included a snapshot of the MP4 file's current metadata.

Can anyone offer any insight into why the parameters don't work for MP4 files?

Thanks,

Sailor Guy




StarGeek

"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

SailorGuy

StarGeek, thanks for the prompt response.

I added "-ext JPG -ext MP4" to the command line - but still no success - no changes written to the MP4 file.

EXIFtool -ext JPG -ext MP4 -v2 -a -P -Overwrite_Original -args "-AllDates<${filename;s/-.*//} 12:34:56" ^
-XPComment="DPD Hi8" *.MP4

See "EXITtool_Trace_2.txt" for the command output.

Sailor Guy

StarGeek

Well, your output says that it's writing to the three tags defined by the AllDates shortcut.  What's the output from exiftool  -a -g1 -alldates 19920618-[DPDHi8]_Mark_Teresa_Wedding_Rehearsal_2Bluegrass_Music.mp4?

Just to clarify, the shortcut -AllDates only writes to three tags, DateTimeOriginal, CreateDate, and ModifyDate.

Also, it's easier if you just paste your output into the poste between [code][/code] tags so we can see it directly without having to download it and view it in another program.

Also, I just looked at your mp4 output from your first post.  What program are you using there.  It's possible that it isn't reading the XMP data added by Exiftool.  That means it could be a case of FAQ 3.
"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

SailorGuy

Interesting... See the attached screenshots in the MetaInfo_Info.PDF...  You'll see the different "behavior" of the comments and "date taken" between JPG and MP4.

The XMP dates *are* being changed in the MP4 file, but the comments aren't being successfully written to the MP4.

BTW, I shortened my filenames to save space on my screen prints.

The program I use to dump the metadata was a PowerShell script I found and adapted on a PowerShell forum.  I attached the script I modified.

I would be interested in finding a tool/utility that will display *all* defined metadata for a file (and optionally, all available tags even if they are blank).  MediaInfo is another utility I use, but it doesn't display all metadata values.

Sailor Guy


Phil Harvey

XPComment is not available in MP4 files.  See the QuickTime tags documentation for a complete list of available MP4 tags, plus an indication of which ones are writable by ExifTool.

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

SailorGuy

Phil and StarGeek,

Thanks for your input.  I looked through the QuickTime tags document but couldn't definitely identify which tags I need.

My goal with MP4 files is to write two values that will add a comment visible when displaying the Windows properties and that will change the date displayed in a Windows directory listing / file explorer view. 

I was successful doing it with JPG files of scanned photos and now want to do it with MP4 files of videos that have been captured / converted from various VHS tape, camcorder cartridges, and film sources.

My intent is for the comment to display a value of the original source of the MP4 file (like "Hi8," "VHS," "8mm film," etc.) and the date field to represent the actual date the MP4/JPG file was originally created (i.e. photos from 1962 or videos from 1975) - and not the Windows creation/modify date. I parse the actual creation date from the first 8 characters of the filename like 19920511 for May 11, 1992.

Any insight you can offer is greatly appreciated.

Also, any recommendations for a "metadata dump" utility that will display all tags and values from a file would be helpful.

Thanks,

Sailor Guy

Phil Harvey

I don't know if it is possible to do what you want.  Your best chance with ExifTool is to write an XMP tag (maybe XMP:Description), but I'm worried that Windows won't read this.

As for a metadata dump utility... why isn't ExifTool suitable?  It will display all metadata in a file.  It isn't possible to show all possible metadata as you suggested, because the possibilities are endless.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

Quote from: SailorGuy on January 14, 2016, 08:34:03 AM
My goal with MP4 files is to write two values that will add a comment visible when displaying the Windows properties and that will change the date displayed in a Windows directory listing / file explorer view. 

I was able to change the comment and get Windows 8.1 to show it on an mp4 file with Drax, so you might check that out for editing other fields.
"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

SailorGuy

StarGeek, thanks for the info on DRAX.  What is the comment tag that DRAX modified?

I'll do some experimentation this weekend with various tags and see what I can find out.

Thanks,

Sailor Guy

StarGeek

"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

SailorGuy

What would be the EXIFtool syntax for me to change the Quicktime comment tag?  I'm still learning my way around EXIFtool.

Thanks!

Sailor Guy

Phil Harvey

If you'll notice from the QuickTime tags documentation, the QuickTime Comment tags is not writable by ExifTool. :(

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