Author Topic: Video-Files  (Read 2121 times)

DimitriJunker

  • Newbie
  • *
  • Posts: 3
Video-Files
« on: May 04, 2016, 07:37:15 AM »
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

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15115
    • ExifTool Home Page
Re: Video-Files
« Reply #1 on: May 04, 2016, 07:55:43 AM »
Hi Dimitri,

But any idea why Geosetter, which uses ExifTool shows this error?

Yes.  Read the second paragraph of this post.

Quote
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?

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"

Quote
Or 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DimitriJunker

  • Newbie
  • *
  • Posts: 3
Re: Video-Files
« Reply #2 on: May 04, 2016, 07:54:26 PM »
Quote
   Instead, you should probably write XMP-photoshop:DateCreated
No, this is not a good idea, since GeoSetter doesn't cares about  DateCreated.

So I tried:
Code: [Select]
exiftool.exe -ext mp4 -o %d%f.xmp -r "-DateTimeOriginal<FileModifyDate" srcdirIt 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:
Code: [Select]
<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.
« Last Edit: May 05, 2016, 06:15:16 AM by DimitriJunker »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 15115
    • ExifTool Home Page
Re: Video-Files
« Reply #3 on: May 05, 2016, 07:30:27 AM »

Code: [Select]
exiftool.exe -ext mp4 -o %d%f.xmp -r "-DateTimeOriginal<FileModifyDate" srcdirIt 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

Quote
This 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, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

DimitriJunker

  • Newbie
  • *
  • Posts: 3
Re: Video-Files
« Reply #4 on: May 05, 2016, 08:26:12 AM »
Hi
Quote
Is 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.
Quote
I 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...