This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 50 - Pages: 4 [ Previous | 1 2 3 4 | Next ] - Last Post: 09-Nov-2019 23:51 Last Post By: RobM Threads: [ Previous | Next ]
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 13-Jul-2019 14:49   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
I suppose what's needed is a nice, friendly tool (i.e., not some obscure command line nonsense) that lets the user change the camera date, both for images and for videos.

Thanks to RobM for a reminder that jAlbum already includes such a tool for resetting the camera date - select an image or group of images, right-click, Adjust camera date. Can't be used on videos, however.

And the underlying "one hour off" problem needs to be addressed, in any case. I ran into that one-hour error even when using exiftool to change the video creation time - exiftool put the correct time into the video metadata, but jAlbum was still one hour off.
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 14-Jul-2019 12:00   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:

Given the above I doubt jAlbum is "simply using their API to extract the dates".

How do you come to that conclusion? Is DigiCam using the same Metadata-extractor library for instance? Here's the code I use to extract the date:
Directory dir;
if ((dir = metadata.getFirstDirectoryOfType(Mp4Directory.class)) != null) {
            return dir.getDate(Mp4Directory.TAG_CREATION_TIME);
        }
Not much room for bugs in the usage there.
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 14-Jul-2019 12:42   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
karlmistelberger wrote:

Given the above I doubt jAlbum is "simply using their API to extract the dates".

How do you come to that conclusion? Is DigiCam using the same Metadata-extractor library for instance? Here's the code I use to extract the date:

Directory dir;
if ((dir = metadata.getFirstDirectoryOfType(Mp4Directory.class)) != null) {
            return dir.getDate(Mp4Directory.TAG_CREATION_TIME);
        }
Not much room for bugs in the usage there.

There is always enough room for bugs to occur. Did you ever try standalone code doing nothing else but opening a video, reading the metadata and printing the date?

File jpegFile = new File("myImage.jpg");
Metadata metadata = ImageMetadataReader.readMetadata(imagePath);
for (Directory directory : metadata.getDirectories()) {
    for (Tag tag : directory.getTags()) {
        System.out.println(tag);
    }
}


https://github.com/drewnoakes/metadata-extractor/wiki/Getting-Started-(Java)
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 14-Jul-2019 12:57   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Now here's an interesting observation. I've been looking only at videos created while daylight saving time was in effect, and those are consistently one hour off. But then I grabbed one that was shot in January:

https://jgromit.jalbum.net/20190106_133118.mp4

Local time when recorded, 13:31 EST. UTC when shot, 18:31. As expected, exiftool shows 18:31 as the media creation time. And lo and behold, when I ask jAlbum to list metadata, it also shows as 18:31.

So who is not handling daylight saving time properly?

(Edited to remove speculation about TAG_CREATION_TIME. That can't be relevant - tags like Mp4 video.Creation Time are off by an hour when daylight saving time is involved.)

Edited by: jGromit on 15-Jul-2019 10:31 - fixed link
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 14-Jul-2019 18:36   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
karlmistelberger wrote:
davidekholm wrote:
karlmistelberger wrote:

Given the above I doubt jAlbum is "simply using their API to extract the dates".

How do you come to that conclusion? Is DigiCam using the same Metadata-extractor library for instance? Here's the code I use to extract the date:

Directory dir;
if ((dir = metadata.getFirstDirectoryOfType(Mp4Directory.class)) != null) {
            return dir.getDate(Mp4Directory.TAG_CREATION_TIME);
        }
Not much room for bugs in the usage there.

There is always enough room for bugs to occur. Did you ever try standalone code doing nothing else but opening a video, reading the metadata and printing the date?

File jpegFile = new File("myImage.jpg");
Metadata metadata = ImageMetadataReader.readMetadata(imagePath);
for (Directory directory : metadata.getDirectories()) {
    for (Tag tag : directory.getTags()) {
        System.out.println(tag);
    }
}

https://github.com/drewnoakes/metadata-extractor/wiki/Getting-Started-(Java)


No difference. Here's the output using jGromit's bear video:
[MP4] Major Brand - MP4 v2 [ISO 14496-14]
[MP4] Minor Version - 0
[MP4] Compatible Brands - [MP4  Base Media v1 [IS0 14496-12:2003], MP4 v2 [ISO 14496-14]]
[MP4] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4] Duration - 8830
[MP4] Media Time Scale - 1000
[MP4] Duration in Seconds - 00:00:09
[MP4] Transformation Matrix - 65536 0 0 0 65536 0 0 0 1073741824
[MP4] Preferred Rate - 1
[MP4] Preferred Volume - 1
[MP4] Next Track ID - 3
[MP4] Rotation - 0
[MP4 Video] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Video] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Video] ISO 639-2 Language Code - ```
[MP4 Video] Opcolor - 0 0 0
[MP4 Video] Graphics Mode - Copy
[MP4 Video] Compression Type - H.264
[MP4 Video] Width - 1920 pixels
[MP4 Video] Height - 1080 pixels
[MP4 Video] Depth - 24-bit color
[MP4 Video] Horizontal Resolution - 72
[MP4 Video] Vertical Resolution - 72
[MP4 Video] Frame Rate - 25,445
[MP4 Sound] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Sound] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Sound] ISO 639-2 Language Code - ```
[MP4 Sound] Balance - 0
[MP4 Sound] Format - MPEG-4, Advanced Audio Coding (AAC)
[MP4 Sound] Number of Channels - 2
[MP4 Sound] Sample Size - 16
[MP4 Sound] Sample Rate - 48000
[File Type] Detected File Type Name - MP4
[File Type] Detected File Type Long Name - MPEG-4 Part 14
[File Type] Detected MIME Type - video/mp4
[File Type] Expected File Name Extension - mp4
[File] File Name - 20180610_153638.mp4
[File] File Size - 18763595 bytes
[File] File Modified Date - Wed Jul 10 20:21:14 +02:00 2019
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 14-Jul-2019 19:29   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That CEST marking in the timestamps is very suspicious. Who's deciding that CEST is even relevant? EDT would be relevant. UTC would be relevant.
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 14-Jul-2019 20:11   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
karlmistelberger wrote:
davidekholm wrote:
karlmistelberger wrote:

Given the above I doubt jAlbum is "simply using their API to extract the dates".

How do you come to that conclusion? Is DigiCam using the same Metadata-extractor library for instance? Here's the code I use to extract the date:

Directory dir;
if ((dir = metadata.getFirstDirectoryOfType(Mp4Directory.class)) != null) {
            return dir.getDate(Mp4Directory.TAG_CREATION_TIME);
        }
Not much room for bugs in the usage there.

There is always enough room for bugs to occur. Did you ever try standalone code doing nothing else but opening a video, reading the metadata and printing the date?

File jpegFile = new File("myImage.jpg");
Metadata metadata = ImageMetadataReader.readMetadata(imagePath);
for (Directory directory : metadata.getDirectories()) {
    for (Tag tag : directory.getTags()) {
        System.out.println(tag);
    }
}

https://github.com/drewnoakes/metadata-extractor/wiki/Getting-Started-(Java)

No difference. Here's the output using jGromit's bear video:

[MP4] Major Brand - MP4 v2 [ISO 14496-14]
[MP4] Minor Version - 0
[MP4] Compatible Brands - [MP4  Base Media v1 [IS0 14496-12:2003], MP4 v2 [ISO 14496-14]]
[MP4] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4] Duration - 8830
[MP4] Media Time Scale - 1000
[MP4] Duration in Seconds - 00:00:09
[MP4] Transformation Matrix - 65536 0 0 0 65536 0 0 0 1073741824
[MP4] Preferred Rate - 1
[MP4] Preferred Volume - 1
[MP4] Next Track ID - 3
[MP4] Rotation - 0
[MP4 Video] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Video] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Video] ISO 639-2 Language Code - ```
[MP4 Video] Opcolor - 0 0 0
[MP4 Video] Graphics Mode - Copy
[MP4 Video] Compression Type - H.264
[MP4 Video] Width - 1920 pixels
[MP4 Video] Height - 1080 pixels
[MP4 Video] Depth - 24-bit color
[MP4 Video] Horizontal Resolution - 72
[MP4 Video] Vertical Resolution - 72
[MP4 Video] Frame Rate - 25,445
[MP4 Sound] Creation Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Sound] Modification Time - Sun Jun 10 20:36:49 CEST 2018
[MP4 Sound] ISO 639-2 Language Code - ```
[MP4 Sound] Balance - 0
[MP4 Sound] Format - MPEG-4, Advanced Audio Coding (AAC)
[MP4 Sound] Number of Channels - 2
[MP4 Sound] Sample Size - 16
[MP4 Sound] Sample Rate - 48000
[File Type] Detected File Type Name - MP4
[File Type] Detected File Type Long Name - MPEG-4 Part 14
[File Type] Detected MIME Type - video/mp4
[File Type] Expected File Name Extension - mp4
[File] File Name - 20180610_153638.mp4
[File] File Size - 18763595 bytes
[File] File Modified Date - Wed Jul 10 20:21:14 +02:00 2019

This is a fine bug. :-) Tell the folks at https://github.com/drewnoakes/metadata-extractor/issues/408 Include the video, the code and the output.

Adding time zone information to the output is misleading, as the video does not contain it.
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 14-Jul-2019 22:48   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
I've linked the bear video in my Github post and included an API use sample. Need to wait for response now, but still nothing.
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 15-Jul-2019 15:10   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
This is what exiftool extracts:
ExifTool Version Number         : 10.15</div>
...
<div class="jive-quote">Media Create Date               : 2018:06:10 19:36:49
How am I supposed to get 15:36 out of the metadata of that file?

exiftool is battle hardened and readily deals with idiosyncrasies of real cameras which use either

local time (nonstandard):

karl@erlangen:/home/Albums/Sample Portfolio> exiftool -S -MediaCreateDate 20180610_153638.mp4
MediaCreateDate: 2018:06:10 19:36:49
karl@erlangen:/home/Albums/Sample Portfolio>  

or

UTC (standard):

karl@erlangen:/home/Albums/Sample Portfolio> exiftool -S -api QuickTimeUTC -MediaCreateDate 20180610_153638.mp4
MediaCreateDate: 2018:06:10 21:36:49+02:00
karl@erlangen:/home/Albums/Sample Portfolio> 


As nonstandard behavior is far more common than standard behavior exiftool defaults to nonstandard behavior.
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 26-Aug-2019 17:55   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Creation times on MP4's are still available only for UTC, but in jAlbum 18.4, the metadata-extractor is still trying to "adjust" that to your local time zone. Since there's no time zone information in the video file itself, that's a pointless exercise.

I thought this one had been fixed in metadata-extractor?
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 27-Aug-2019 14:46   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Creation times on MP4's are still available only for UTC, but in jAlbum 18.4, the metadata-extractor is still trying to "adjust" that to your local time zone. Since there's no time zone information in the video file itself, that's a pointless exercise.

I thought this one had been fixed in metadata-extractor?


No, still no update of it since July. Please request a fix for it on their GitHub page. It's good to show that I'm not the only one caring about these fixes.
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 27-Aug-2019 15:31   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
On github, this one is shown as fixed and closed.

Of course, when I'm testing, I'm testing with whatever version of M-E is in jAlbum.

https://github.com/drewnoakes/metadata-extractor/issues/408
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 27-Aug-2019 15:34   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
But the last official release (v12.2) was released several days before the closing of that issue. I guess we should await the next official release.
davidekholm

Posts: 3,559
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 27-Aug-2019 15:37   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
If you wish to test v12.2 with jAlbum, just get it here and dump it inside jAlbum's "lib" folder. Change the name of the old version so you change the file extension from .jar to, for instance, ".jar-disabled"
jGromit

Posts: 7,351
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 27-Aug-2019 15:56   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
No, still no joy with 12.2, so unless you want to start wading in and grabbing various "commit" versions....

BTW, one very interesting side effect of swapping out that library - when I launched jAlbum, most of my project thumbnails were missing. Tried a couple of launches. Once I reverted to the 2.11 jar, the thumbnails all reappeared. I wouldn't have thought those were related.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums