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 ]
davidekholm

Posts: 3,550
Registered: 18-Oct-2002
Re: Creation time on videos
Posted: 27-Aug-2019 17:18   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
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.


Wonderful, so v12.2 is breaking stuff that worked in v2.11 :-(
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 27-Aug-2019 17:25   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
It's worse than I thought. The projects with missing thumbnails can't even be opened. Console dump:
jAlbum 18.4 system console running Groovy (Groovy JAlbum Script Engine)
This section captures debug prints sent to System.out and System.err
The top section evaluates expressions.
Press Ctrl+E to evaluate an expression. (Evaluates selected text if selection is active)
You have access to the basic jAlbum implicit objects such as engine and window
 
Sample expressions:
4*(3+2); // Basic calculations
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) System.out.println(ao); // Iterate over selected objects
window.messageBox("You can interact with any Java object");
Skin loading: 0.2s
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class com.drew.imaging.jpeg.JpegMetadataReader
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:147)
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:125)
	at com.drew.imaging.ImageMetadataReader.readMetadata(ImageMetadataReader.java:205)
	at se.datadosen.jalbum.AlbumObjectMetadata.<init>(AlbumObjectMetadata.java:39)
	at se.datadosen.jalbum.AlbumObjectMetadata.getInstance(AlbumObjectMetadata.java:26)
	at se.datadosen.jalbum.AlbumObjectImpl.getMetadata(AlbumObjectImpl.java:1236)
	at se.datadosen.jalbum.AlbumObjectImpl.readEmbeddedThumbnail(AlbumObjectImpl.java:1919)
	at se.datadosen.jalbum.AlbumObjectImpl.doGetRepresentingIcon(AlbumObjectImpl.java:1883)
	at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:1785)
	at se.datadosen.jalbum.AlbumObjectImpl.getRepresentingIcon(AlbumObjectImpl.java:1739)
	at se.datadosen.jalbum.JThumbnailChooser.renderImage(JThumbnailChooser.java:137)
	at se.datadosen.jalbum.JThumbnailChooser.setAlbumObject(JThumbnailChooser.java:115)
	at se.datadosen.jalbum.JGeneralSettingsPanel.setAlbumObject(JGeneralSettingsPanel.java:118)
	at se.datadosen.jalbum.JSettingsWindow.setAlbumObject(JSettingsWindow.java:760)
	at se.datadosen.explorer.JAlbumExplorer.setRootFolder(JAlbumExplorer.java:3599)
	at se.datadosen.jalbum.JAlbumFrame.initView(JAlbumFrame.java:2254)
	at se.datadosen.jalbum.JAlbumFrame.engine2UI(JAlbumFrame.java:2093)
	at se.datadosen.jalbum.JAlbumFrame.engine2UI(JAlbumFrame.java:2056)
	at se.datadosen.jalbum.JAlbumFrame.doLoadProject(JAlbumFrame.java:1812)
	at se.datadosen.jalbum.JAlbumFrame.loadProject(JAlbumFrame.java:1745)
	at se.datadosen.jalbum.JAlbumManager$JAlbumButton.actionPerformed(JAlbumManager.java:1067)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
	at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Unknown Source)
	at java.desktop/java.awt.Container.processEvent(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Skin loading: 0.247s
Tried some workarounds, like opening the jalbum-settings.jap file directly, but no joy.

ETA: Unable to create a new project, either. Back to the -old version!
sburke

Posts: 17
Registered: 18-Sep-2019
Re: Creation time on videos
Posted: 05-Nov-2019 17:54   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
The problem of displaying the (local) date/time a video was shot seems intractable. Well, I certainly can't tract it. Here's options I have considered (some requiring re-writing metadata, which I don't mind doing):

1. Use the UTC date in the QuickTime:CreateDate field (which cannot include a time offset). The consequence of this would be either:
(a) The date gets adjusted by the metadata-extractor before display to the local time of the computer on which the process is running (equivalent I think to what you would get if you ran exiftool with the -api QuickTimeUTC flag). The date/time will then be what you would have seen on your watch if you were sitting in the same location as your computer at the time the video was shot (possibly in a completely different time zone).
(b) Avoid date adjustment, either by a change in the metadata-extractor or by using a different process - for example a tool like RobM's (see https://jalbum.net/forum/thread.jspa?threadID=54566&tstart=0) which uses ffmpeg to read the metadata. The date/time will then be what you would have seen on your watch if you were sitting on the Greenwich Meridian when the video was shot (possibly in a completely different time zone).
Neither of these give the desired result.
(c) Extract and manipulate the date using a tool to work out what the local (to the camera) time was when the video was shot. I can actually do this in Python if the GPS coordinates are present in the metadata, but I wouldn't know how to design a jAlbum tool to do it, and it doesn't solve the problem for non-geotagged videos. (This incidentally is how Google Photos works, I think. Problems arise when Google Photos makes wrong assumptions about the time zone for non-geotagged videos.)

2. Store instead the local date/time in QuickTime:CreateDate. Then use a tool to read the date (unless the metadata-extractor can be persuaded not to adjust the date). This is against the recommended usage of the QuickTime:CreateDate field, would require re-writing the field if the camera (correctly) used UTC when writing it, and would make the data incorrect when read in other systems.

3. Many of my iPhone videos have a QuickTime:CreationDate field, which is different from QuickTime:CreateDate, and which stores a time offset. This actually gives me everything I need to work out the camera-local shooting date! (In the examples I looked at, I saw that the times recorded in the two fields (when adjusted to UTC) were usually identical, though sometimes CreationDate was a little earlier than Create Date.) The big problem with this is that I haven't found a tool to write this metadata, so I can't get this procedure to work with videos that don't already have the field, or even with videos that did have the field but were then processed (eg compressed).

4. Find some other field and write into it the camera-local date/time (or the UTC time with time zone offset), and use that field in jAlbum. For example the XMP-exif:DateTimeOriginal tag would seem suitable. However I have yet to find a tag which is appropriate and which can be read by either the metadata extractor or (using a tool) by ffmpeg.

Anyone have any better ideas?
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 06-Nov-2019 09:23   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
Anyone have any better ideas?

Sure. Don't rely on the built in tools of jAlbum. metadata-extractor is lame when it comes to video creation time. As already pointed out above exiftool is battle hardened and deals with all idiosyncrasies of video metadata.

jAlbum lends well to the toolbox paradigm. Use all features that work well. Use external tools if it gets annoying.

Everything comes to him who knows how to wait.
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 06-Nov-2019 16:23   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
Anyone have any better ideas?

Just some quick observations....

First, the mangling of the date is a known problem in metadata-extractor. There's a fix, but so far, it has appeared only in an unreleased beta version, and David is understandably reluctant to incorporate a beta into jAlbum. In short, m-e is trying to "localize" the date to your time zone, which simply can't be done. Which brings us to....

Second, there is no industry standard for recording the local time when the video was taken. The videos coming from my Android phone contain only UTC time, with no indication of the local time zone. If you know where you were when you shot it, of course, you can work out the proper timestamp, but no tool can do that (not even exiftool - the required information is simply not present in the video). My Nikon, on the other hand, records whatever timestamp is present in the camera, something that I have to remember to set myself when I travel more than one time zone away from home.

Third, the most reliable timestamp is often, oddly, the file name. My phone knows what the local time is, and uses that to name the mp4. But of course, people do things like renaming files (for convenience), so you end up with MaryBirthday01.mp4, which jAlbum can't use to determine the timestamp.

Fourth, file creation dates aren't of much use, either, because they often get changed when you simply copy the file from one device to another.

My hope is that m-e will eventually crank out an official release that has the fix. Then, it would perhaps be possible for jAlbum to give us a tool to go in and change the timestamp to match what we actually know about the local time where the video was taken. There are third-party tools out there that will do this, so if jAlbum can at least get the fixed m-e, it will be workable.
sburke

Posts: 17
Registered: 18-Sep-2019
Re: Creation time on videos
Posted: 06-Nov-2019 20:06   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
This is actually a two-part problem: (a) storing the information in the metadata, and (b) getting it out for jAlbum (using either the m-e or an external tool).

Problem (a) is giving me most difficulty. As jGromit says, there is no standard and anyway the information might simply not exist in the metadata. So you need to allow for changing the metadata. My preference would be to do this before sending the files to jAlbum because it is then available for other software, and because you have greater flexibility in the software you can use to update the metadata.

Which field to use? I’d like for simplicity to have the same field used in all my video files, even if that means potentially having to update the metadata of all the files.

The only field that is supposed to contain the needed information is QuickTime:CreationDate but this is a non-starter because it is not writable. I don’t want to use QuickTime:CreateDate (my option 2 and I think jGromit’s plan) because this is supposed to contain the UTC date (I don't want to solve one problem by 'corrupting' the metadata for other systems).

So my plan (encouraged by karlmistelberger) is my option 4 - use XMP-exif:DateTimeOriginal, even though this means I need to figure out how to write a jAlbum tool to extract the data using exiftool.

Being new to jAlbum and unfamiliar with Java, this should be fun ...
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 06-Nov-2019 20:21   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
You might want to take a deep breath, let it out slowly, and relax until the m-e dust settles, rather than expending a lot of effort pursuing a "solution" that proves ultimately to be unnecessary.

I certainly can't speak for everyone, but for my own purposes (family album), I'm scooping up videos from multiple sources. I rename the files in a consistent way, like vid2019-11-06.mp4. That has all the precision I need (1:00pm or 2:00pm - who cares?), and if I want to show the date, I just enter it as part of the comment (caption).
sburke

Posts: 17
Registered: 18-Sep-2019
Re: Creation time on videos
Posted: 06-Nov-2019 21:31   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
But changes to m-e won't help me, unless I use the CreateDate field, which I don't want to do, or unless it suddenly starts extracting XMP tags, which seems very unlikely.
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 06-Nov-2019 22:05   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
This is actually a two-part problem: (a) storing the information in the metadata, and (b) getting it out for jAlbum (using either the m-e or an external tool).
...
So my plan (encouraged by karlmistelberger) is my option 4 - use XMP-exif:DateTimeOriginal, even though this means I need to figure out how to write a jAlbum tool to extract the data using exiftool.

You may use ExifTool Date/Time Shift Module and modify the time values in the original videos such as jAlbum gets it right.
sburke

Posts: 17
Registered: 18-Sep-2019
Re: Creation time on videos
Posted: 06-Nov-2019 22:23   in response to: karlmistelberger in response to: karlmistelberger
 
  Click to reply to this thread Reply
The time values in the original videos aren't wrong (just UTC not local), so I don't want to change them. I want to write additional values (which is not a problem), but these would not be readable by jAlbum, which is why I need a tool.
karlmistelberger

Posts: 504
Registered: 5-Dec-2013
Re: Creation time on videos
Posted: 07-Nov-2019 19:39   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
The time values in the original videos aren't wrong (just UTC not local), so I don't want to change them. I want to write additional values (which is not a problem), but these would not be readable by jAlbum, which is why I need a tool.

Extracting metadata is great fun. Actually you don't need all those fancy tools:

https://www.youtube.com/watch?v=ulYxlUl9GTo

The same holds for convincing jAlbum application getting it right.
RobM

Posts: 3,065
Registered: 4-Aug-2006
Re: Creation time on videos
Posted: 07-Nov-2019 23:46   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
The time values in the original videos aren't wrong (just UTC not local), so I don't want to change them. I want to write additional values (which is not a problem), but these would not be readable by jAlbum, which is why I need a tool.
Having read this thread through, it seems there is no way extracting the correct information unless the correct date/time is known. So. why not just manually override the orignalDate variable for each video?

This can be done in jAlbum's edit mode, by entering in the 'Variables' panel:
under 'Name" enter originalDate
under Value enter the correct date/time information.
Then add ${originalDate} to the comments/title field as required.
sburke

Posts: 17
Registered: 18-Sep-2019
Re: Creation time on videos
Posted: 09-Nov-2019 00:27   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Many thanks for the various pragmatic suggestions which I can see provide a way to get a display of correct date/time for videos in jAlbum.

I have a confession: this is not my sole aim. What I really want is for my entire collection of image/video files to contain an adequate set of metadata, and for this metadata to be stored in as standard and 'correct' a manner as possible and thus more likely to be usable not only by jAlbum but also by other software (eg Google Photos). (And to be more likely useable in the future when the files are inherited by my offspring, who admittedly show no sign of ever being interested.)

Before coming across jAlbum I had already written software which can make bulk changes to the metadata in my files, so regarding video creation times there will be few files which will require individual editing (the others will have GPS data, or I will be able to assume a time zone, enabling automated calculation of the local creation time).

The useful earlier posts have convinced me there is no existing standard metadata field for local creation time, so I am having to invent my own 'standard'.

That just leaves the problem of reading it in jAlbum, but having looked into this a little more, and with the inspiration of RobM's tool referenced above, I am quite looking forward to playing around with jAlbum/exiftool.
RobM

Posts: 3,065
Registered: 4-Aug-2006
Re: Creation time on videos
Posted: 09-Nov-2019 12:21   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
That just leaves the problem of reading it in jAlbum, but having looked into this a little more, and with the inspiration of RobM's tool referenced above, I am quite looking forward to playing around with jAlbum/exiftool.
There are other tools that will show you how to process all videos in a project, rather than a selected video. video from images is one that uses ffmpeg too. That is somewhat a lengthy script but I commented on it enough to, hopefully, give me a chance of understanding what I did ;)
jGromit

Posts: 7,260
Registered: 31-Jan-2006
Re: Creation time on videos
Posted: 09-Nov-2019 13:44   in response to: sburke in response to: sburke
 
  Click to reply to this thread Reply
sburke wrote:
The useful earlier posts have convinced me there is no existing standard metadata field for local creation time, so I am having to invent my own 'standard'.

Can you give us a (small) sample video that includes metadata using your own "standard?" And what's the field called?

That just leaves the problem of reading it in jAlbum....

That's where things get murky, indeed. First, it appears that the current version of metadata-extractor (ME) isn't pulling xmp fields from videos (no problem with JPG's). You might want to chime in on the ME github site, where a question about that surfaced recently:

https://github.com/drewnoakes/metadata-extractor/issues/434

Then, even if ME can pull that field, what will jAlbum do with it? The jAlbum core isn't open-source, so you wouldn't be able, for example, to modify jAlbum to use that xmp field as the originalDate variable (for sorting album objects). And asking David to modify the core to accommodate a home-brewed metadata field would be a bit much.

If ME can extract the field, getting a skin to display that field is the easier part of the problem. In most of my skins, for example, you can use any metadata field that ME can extract, and include it in the caption for the image (see, for example, https://jgromit.com/neptune/man/neptune_metadata.html). A bit trickier in Laza's skins, and with others, it might require some code-hacking.
Legend
Forum admins
Helpful Answer
Correct Answer

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