Requesting advise for properly building my media library

Started by Muyah, August 12, 2015, 12:15:33 PM

Previous topic - Next topic

Muyah

I've been trying to wrap my head around the technicalities of metadata for quite some time now but it's so convoluted at times that I would really appreciate it if someone could advise me on my personal situation.

My objective

With the release of Photos for OSX I figured it would be a good time to sort my photo/video library once and for all. I have quite a large number of photos and videos from years ago with wrong or even absent metadata. I started out by using A Better Finder Attributes which worked alright for photos (thank you EXIF) but quickly realized that videos were going to be difficult. I could change creation dates but the changes would not show up in e.g. Windows because they relate to the file system instead of the file. What I would like is to create a library that has its metadata interpreted exactly the same by whatever system I decide to feed it to. When I say metadata I basically mean date/time.

My question

I understand different systems use different standards of metadata (XMP, IPTC etc.). Could someone more knowledgeable on this matter than me advise me on what I should be doing? Should I, for instance, be executing some command to change every single date-related entry to the same value? Is there a more subtle approach which could achieve my objective? I'm a perfectionist so I'd like to do this as neatly as possible. All of the videos I'm trying to sort are either .MP4 or .MOV and all photos are .JPEG.

I realize what I'm asking is very broad. Even pointers into the right direction would be greatly appreciated. I'm happy to clarify my intentions and provide examples if needed.

Phil Harvey

For still images, the standard EXIF date/time tags are well supported, so I would recommend these.

MOV/MP4 videos are not covered by the EXIF standard, and ExifTool has only rudimentary write support for these.  ExifTool supports writing XMP to MOV/MP4, but unfortunately XMP isn't well supported by other applications.  The native MOV/MP4 metadata situation is a bit of a free-for-all, which is why ExifTool doesn't yet support writing this.  However, reading the native date/time tags is likely better supported by other apps.

So I don't think I can offer a solution which will live up to your expectations.  Maybe the best thing would be to find some other app to write the MOV/MP4 native date/time metadata.

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

Muyah

I'm afraid you're it Phil. At least, I haven't found any app on the web that is able to do more than ExifTool.

Luckily the vast majority of my videos contain metadata. I only have a few MP4s that had to be recovered from a wiped disk which have been stripped of everything, I guess even ExifTool won't be of much help there. The only problem with the rest of my videos, however, is that they need a time shift. I understand exiftool -a -s -G1 -time:all FILE shows me all the dates/times of an MP4. It gives me this:

[System]        FileModifyDate                  : 2014:06:16 20:51:14+02:00
[System]        FileAccessDate                  : 2015:08:15 00:17:19+02:00
[System]        FileInodeChangeDate             : 2015:08:15 00:17:14+02:00
[QuickTime]     CreateDate                      : 2014:06:09 17:55:59
[QuickTime]     ModifyDate                      : 2014:06:09 17:55:59
[Track1]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track1]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track1]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track1]        MediaModifyDate                 : 2014:06:09 17:55:59
[Track2]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track2]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track2]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track2]        MediaModifyDate                 : 2014:06:09 17:55:59
[Track3]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track3]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track3]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track3]        MediaModifyDate                 : 2014:06:09 17:55:59


And as far as I know ExifTool is able to change all of these. Do you have a command that let's me shift all of these values at once by a certain number of hours? Except perhaps the system ones, I'm not sure if there's much purpose to changing those.

Phil Harvey

ExifTool should change all of the date/time tags except the QuickTime ones.  The command looks like this to add 2 hours:

exiftool -time:all+=2 DIR

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

Muyah

Thank you!

Also, I've seen you say that about QuickTime tags before so you might be happy to know that ExifTool is actually able to change them all. Here's an example from a GoPro MP4 just using your command to add 2 hours:

Original output:

[System]        FileModifyDate                  : 2014:06:16 20:51:14+02:00
[System]        FileAccessDate                  : 2015:08:16 21:44:48+02:00
[System]        FileInodeChangeDate             : 2015:08:16 21:38:12+02:00
[QuickTime]     CreateDate                      : 2014:06:09 17:55:59
[QuickTime]     ModifyDate                      : 2014:06:09 17:55:59
[Track1]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track1]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track1]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track1]        MediaModifyDate                 : 2014:06:09 17:55:59
[Track2]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track2]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track2]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track2]        MediaModifyDate                 : 2014:06:09 17:55:59
[Track3]        TrackCreateDate                 : 2014:06:09 17:55:59
[Track3]        TrackModifyDate                 : 2014:06:09 17:55:59
[Track3]        MediaCreateDate                 : 2014:06:09 17:55:59
[Track3]        MediaModifyDate                 : 2014:06:09 17:55:59


After time shift:

[System]        FileModifyDate                  : 2015:08:16 21:46:45+02:00
[System]        FileAccessDate                  : 2015:08:16 21:46:48+02:00
[System]        FileInodeChangeDate             : 2015:08:16 21:46:45+02:00
[QuickTime]     CreateDate                      : 2014:06:09 19:55:59
[QuickTime]     ModifyDate                      : 2014:06:09 19:55:59
[Track1]        TrackCreateDate                 : 2014:06:09 19:55:59
[Track1]        TrackModifyDate                 : 2014:06:09 19:55:59
[Track1]        MediaCreateDate                 : 2014:06:09 19:55:59
[Track1]        MediaModifyDate                 : 2014:06:09 19:55:59
[Track2]        TrackCreateDate                 : 2014:06:09 19:55:59
[Track2]        TrackModifyDate                 : 2014:06:09 19:55:59
[Track2]        MediaCreateDate                 : 2014:06:09 19:55:59
[Track2]        MediaModifyDate                 : 2014:06:09 19:55:59
[Track3]        TrackCreateDate                 : 2014:06:09 19:55:59
[Track3]        TrackModifyDate                 : 2014:06:09 19:55:59
[Track3]        MediaCreateDate                 : 2014:06:09 19:55:59
[Track3]        MediaModifyDate                 : 2014:06:09 19:55:59

Phil Harvey

Ah, great.  Yes, it depends on where the tags are stored.  It will change them in the movie header, but not in the MetaData or UserData sections.  It looks like we got lucky. :)

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

Muyah

I've been doing laps around the FAQ and Google and have tried some improvisations with command lines without any luck. Can you tell me if there's a way to change all the dates/times to that of a specific tag (e.g. FileModifyDate)?

I thought I could just change the command you gave me earlier to exiftool -time:all<FileModifyDate and tried several variations thereof but no dice.

Phil Harvey

Unfortunately, that's not the way it works.  From the -tagsFromFile documentation:

            A destination group and/or tag name of "All" or "*"
            writes to the same family 1 group and/or tag name as the source.


so "-time:all<filemodifydate" won't do what you want.

However, you are in luck!:

            8) With the redirection feature, copying a tag directly (ie.
            "'-DSTTAG<SRCTAG'") is not the same as interpolating its value
            inside a string (ie. "'-DSTTAG<$SRCTAG'") for shortcut tags or tag
            names containing wildcards.  [...]


and "-time:all<$filemodifydate" should do this.

(This is an interesting exploitation of the subtle difference between these two ways of copying tags.)

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

Muyah

Ah that makes sense. The command worked but it seems to have deposited a whole bunch of XMP date/time tags into the file as well. Could you tell me how to prevent that from happening?

Hayo Baan

Sure, instead of time:all specify the exact tags you want to change/set  :)
Hayo Baan – Photography
Web: www.hayobaan.nl

Muyah

Well, yeah..  :P I was trying to avoid that since the tags I want to change aren't the same for all my videos but I guess I'll just adjust the command for each batch.

Phil Harvey

If you want to change existing tags and not add new ones, add -wm w to your command.

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