Sony MTS files in lightroom - tagsfromfiles problem

Started by sebm, December 12, 2022, 06:17:49 AM

Previous topic - Next topic

sebm

Hi -
I have a bunch of video files and I'm trying to do bulk renames and sorts inside lightroom but lightroom is bad at getting metadata and totally misses DATETIMEORIGINAL and also GPSDATETIME and FILEMODIFYDATE. What I want to do is get them into a field it can see like DATECREATED; albeit via an XMP file. But when I run this:

exiftool -tagfromfile -DATETIMEORIGINAL>DATECREATED *.mts

It tells me DATETIMEORIGINAL does not exist for -tagsfromfile option.

Weirdly the whole cam has a five month offset even in GPS fields which makes no sense but I can fix that far more easily.

Any tips? Will it work if I force an XMP file?


StarGeek

Exiftool cannot edit mts files.  See the Supported File Types table.

But with regards to your command, the -TagsFromFile option requires a second parameter, which would be the name of the file to copy from.  In this example, it is trying to read a filename called "-DATETIMEORIGINAL", which obviously fails.  Additionally, the tag copy operation needs to be quoted, as the greater/less than symbols have special meaning for the command line.

I don't know what you mean by "force an XMP file" unless you mean to create a sidecar file.  You could do that with this (see Metadata Sidecar Files example #13)
exiftool -ext mts -tagsfromfile @ -srcfile %d%f.xmp "-DateCreated<DateTimeOriginal" -r /path/to/files/

But that entirely depends upon whatever other programs you're using has the ability read sidecar files.
* 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).

sebm

Thanks so much for the help.

Few more Qs if OK.
Is this copying all tags or just some?

Is there a way to copy everything but modify the dates at the same time?

Also is there a way to paste the date into the IPTC date created? Lightroom can read XMP files and it says it's reading one, but it's not picking that date field up.

If that doesn't work - how would I paste into the EXIF date time field? Do I need a modifier to let it work?

Thanks so much. It's a world of pain the tagging but I'll get there.

StarGeek

Quote from: sebm on December 13, 2022, 06:22:40 AMIs this copying all tags or just some?

The command I listed only copies the DateTimeOriginal into the DateCreated tag in the XMP sidecar, which is what you seemed to be trying for in your first post.

There isn't much overlap in names between what an MTS file can hold and the XMP tags.  I don't recall there being too many tags available for an MTS file in the first place.  So if there were other tags in the MTS file, odds are you would have to manually decide where to place them in an XMP sidecar.

QuoteIs there a way to copy everything but modify the dates at the same time?

You could either use the GlobalTimeShift option if you are shifting times for all tags you are copying or for individual tags, you could use the ShiftTime helper function.


QuoteAlso is there a way to paste the date into the IPTC date created? Lightroom can read XMP files and it says it's reading one, but it's not picking that date field up.

In what kind of file?  IPTC IIM tags cannot be embedded in a video file nor an XMP sidecar.  IPTC IIM is not the same as IPTC Core/Ext, which are XMP tags.  So again, you would have to decide where you want to copy the data.

QuoteIf that doesn't work - how would I paste into the EXIF date time field? Do I need a modifier to let it work?

It all depends upon what you are actually trying to do and if the file type supports the desired tag.  Remember, EXIF, IPTC, and XMP are all different groups and not everything transfers.  And this is going to be different than what an mts file can hold and different again from what a MP4/Mov file can hold.  See the above linked Supported file type table and the Tag Names pages.

The basic command will be "-DestinationTAG<SourceTAG" There's not much more I can offer with knowing exactly what you are trying to do.
* 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).

sebm

Thanks Stargeek and apologies for the delay. I went on holiday and am just getting back into this.

It's probably more effective to pick up the Windows modified date as that seems to be the only correct date for some reason. Not sure how but everything else is five months out in the Date Time Original (thus my question).