Main Menu

Video-Files

Started by DimitriJunker, May 04, 2016, 07:37:15 AM

Previous topic - Next topic

DimitriJunker

Hi,

I manly use ExifTool with Geosetter, it works fine for pictures but not so for my videos.:

1) mts Files from a Canon Legria HFM306
Geo Setter tells me, that there is no time Stamp, but
exiftool.exe -ext mts -o %d%f.xmp -r "Sourcedir"
creates xmp files with DateTimeOriginal, but I had problems with daylight saving time, but this was some time ago, so maybe its already solved. But any idea why Geosetter, which uses ExifTool shows this error?

2) mp4 Files from my Samsung Galaxy S4

neither Geosetter nor
exiftool.exe -ext mts -o %d%f.xmp -r "Sourcedir"
gets the DateTimeOriginal.
But mediainfo shows me a coding date, which could be used as DateTimeOriginal, it is even in UTC
Could ExifTool use this information for the xmp?

Or is there any way to use the modification date of the File as source for DateTimeOriginal?
If I find no way to solve this problems I'll write something by my self which combines the information of Exiftool, Mediainfo and FileDate
Dimitri

Phil Harvey

Hi Dimitri,

Quote from: DimitriJunker on May 04, 2016, 07:37:15 AM
But any idea why Geosetter, which uses ExifTool shows this error?

Yes.  Read the second paragraph of this post.

QuoteBut mediainfo shows me a coding date, which could be used as DateTimeOriginal, it is even in UTC
Could ExifTool use this information for the xmp?

If ExifTool extracts CodingDate, then you could do this: (see edit below)

exiftool -ext mts -o %d%f.xmp "-DateTimeOriginal<CodingDate" "-xmp:all<all" -r "Sourcedir"

But note that this writes XMP-exif:DateTimeOriginal, which is not the best location for this information.  Instead, you should probably write XMP-photoshop:DateCreated

exiftool -ext mts -o %d%f.xmp "-XMP-photoshop:DateCreated<CodingDate" "-xmp:all<all" "XMP-photoshop:DateCreated<DateTimeOriginal" -r "Sourcedir"

QuoteOr is there any way to use the modification date of the File as source for DateTimeOriginal?

Yes.  Add "-DateTimeOriginal<FileModifyDate"  (or from FileCreateDate if you are on Windows, or from MDItemContentCreationDate if you are on Mac).

- Phil

Edit:  I just looked at the available M2TS and H264 tags, and CodingDate doesn't appear to be extracted, so you might be out of luck here.
...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 ($).

DimitriJunker

#2
QuoteInstead, you should probably write XMP-photoshop:DateCreated
No, this is not a good idea, since GeoSetter doesn't cares about  DateCreated.

So I tried:
exiftool.exe -ext mp4 -o %d%f.xmp -r "-DateTimeOriginal<FileModifyDate" srcdir
It has to be FileModifyDate, because this is the only one which doesn't change when you copy the files from the SD Card to your PC. The result is almost what I want, only the timezone is wrong. The Clip was made at 10:50:38 at UTC+9, but ExifTool assuumes, that the Time is UTC and moves it to my local Timezone, so I get:
<exif:DateTimeOriginal>2016-02-15T11:50:38+01:00</exif:DateTimeOriginal>
But this can be changed in Geosetter.
This would be an advantage if you could add CodingDate to a new version which has the timeZone.

I just tried again to create xmp-Files from mts. The error with daylightsaving is still there, but I don't know if it is an error from the camera or from exiftool.

Phil Harvey

Quote from: DimitriJunker on May 04, 2016, 07:54:26 PM

exiftool.exe -ext mp4 -o %d%f.xmp -r "-DateTimeOriginal<FileModifyDate" srcdir
It has to be FileModifyDate, because this is the only one which doesn't change when you copy the files from the SD Card to your PC. The result is almost what I want, only the timezone is wrong.

Is the time zone for FileModifyDate wrong?  What times are shown by these two commands?:

1. exiftool -filemodifydate FILE
2. dir FILE

QuoteThis would be an advantage if you could add CodingDate to a new version which has the timeZone.

I don't think I have ever seen this CodingDate tag.  I don't know how it is stored.

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

DimitriJunker

Hi
QuoteIs the time zone for FileModifyDate wrong?

Ok I have mp4-file taken in Palau(UTC+9) at 14:34:40. If I ask Windows (right click properties) it tells me that time without a timezone. If I use the dir command it tells me 15:34 exif tools tells me 15:34:42+01:00. So it is confusing.

The reason why geosetter cant find the Date of mts files is, that it uses its own routines to read the exif information but exiftools for writing them, don't ask me why.
QuoteI don't think I have ever seen this CodingDate tag.  I don't know how it is stored.
As I said, mediainfo shows it. And it is opensource, so if you want...