Importing / add metadata to .mp4 and .mov files from .csv file

Started by lrinderknecht, May 09, 2020, 10:41:50 AM

Previous topic - Next topic

lrinderknecht

Hi - my hard drive crashed and I lost my photo library which also contained video files for the last 20 years.  Luckily, I had everything uploaded to Zenfolio.  I was able to download the image files and import them back into photos (mac os x) and retain all the metadata (title, keywords, description).  However, all the metadata attached to video files is lost when I download them.  I CAN however download a csv file with the video metadata from each zenfolio gallery.

The downloaded csv file contains the following columns:

File Name
Title
Caption
Copyright
Alt Attribute
Keywords
Zenfolio Photo ID [DO NOT EDIT]

All I care about is the 'Title' 'Caption' and 'Keywords' (although in mac os x photos, I believe 'Caption' is called 'Description' so I do not know if that will cause a problem)

Anyway, I would like to use the ExifTool to take the metadata in the csv and add it back to the video files.  I am completely new to this tool and not very technical :(. I am hoping that some kind soul out there will walk me through the process (if it is possible) so that I don't have to manually add 20 years of metadata back to my video files :( :(

Thank you!



StarGeek

I'd suggest doing this.  You might want to test it out first on a single file before doing all the files.
  • Open the CSV in a spreadsheet like Excel or LibreOffice.  The latter is free.
  • Copy the "File Name", "Title", "Caption", and "Keywords" to a new spreadsheet
  • Rename the "File Name" column to "SourceFile", the "Caption" column to "Description", and the "Keywords" column to "Quicktime:Keywords"
  • Save this as a new CSV spreadsheet.  Make sure it is a CSV and that it is comma separated.  There is usually an option to use a different separator but it must be a comma in this case.
Now, the next step assumes that all the MP4/Mov files are in the same directory.  If not, we can work around that.

Open a Terminal window.  Type cd and a space after that.  Drag the directory containing the video files onto the terminal.  This will end up looking something like cd /path/to/videos/.  Press enter.

Now, the next step will actually write the data back into the files.  Type this, including the dot but with no trailing spaces at the end
exiftool . -csv=
and then drag the new CSV onto the terminal.  The result should look something like (no space between -csv= and /path
exiftool . -csv=/path/to/FILE.CSV

Exiftool will then start copying the data into the files.

This operation will create backup files with _original added to the end so you can revert if need be.  Once you're sure everything is correct you can delete them or use the -delete_Original option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

lrinderknecht

Thank you so much.  I have followed your instructions.  Here is what terminal shows me:

lisa@Lisas-iMac ~ % cd       
lisa@Lisas-iMac ~ % /Users/lisa/Downloads/movies
zsh: permission denied: /Users/lisa/Downloads/movies
lisa@Lisas-iMac ~ % exiftool . -csv=/Users/lisa/Downloads/tags.csv
    1 directories scanned
    0 image files read
lisa@Lisas-iMac ~ %

StarGeek

cd (space), then drag/drop.  Not cd (enter) drag/drop
You should end up with
cd /Users/lisa/Downloads/movies
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

lrinderknecht

Thank You!  It was successful from an exiftool standpoint, but when I import the movies into my photos video library, the metadata (that I can see in the finder now), isn't imported (see attachment).  Do you think this is a limitation of photos?  So weird...


lrinderknecht

I found this that someone posted on another thread:

"on import Mac OS Photos will only recognize the Iptc tag, it will not recognize keywords in the XMP tag for some reason"

Do you think I need to rename the column in my csv file so that I am attaching the keywords to the tag that Mac OS photos will recognize?

StarGeek

It would seem to me that Photos just won't read the info in a video.  IPTC is a image metadata group and can't be added to videos.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

lrinderknecht