REQUEST FOR COMMENT: Change Date & Time

Started by Mario, April 04, 2019, 09:58:35 PM

Previous topic - Next topic

Mario

I have several problems with the old "Change EXIF Date & Time" command in IMatch.
It operates directly on the file (via ExifTool), lacks some features I would like etc.

So I decided to put a replacement for it on my to-do list for IMatch 2020.
Implemented as a new app, I wanted something that

- Updates the database and lets the changes flush to the file during normal write-back

- Modifies XMP created and/or subject created.
This means that EXIF and IPTC are updated during write-back in the same way as when the user changes these values in the MD Panel

- Allows to change other tags as well (for special cases)

- Supports date/time shift via offset
- Setting a fixed (absolute) date and time (with time zone)
- Allows to fill the target tag from a variable (great for video files or other file formats without defined date and time tags)
- Allows to change the time zone if needed

The new app is named, eh, "Change Date and Time".
It will show up in the App panel, but IMatch will also offer it as a command in the menu and maybe as a command for date/time tags in the MD Panel (so users find it).

The key is simplicity without scarifying features for users who need to solve tricky date/time or time-zone issues in their files.
Here is a first screen shot of the current state of the app. Like all apps planned for IMatch 2020 this will take some time to ripe and fine-tune.

Let me know what you think. Which problems you have with dates and times.

PLEASE DO NOT HIJACK this thread for unrelated issues, as it happens sometimes.
If you have questions not clearly related to my question above, please open a separate thread.

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier


jch2103

Excellent; should be very helpful.

I have one particular issue I've run into with video files; I'm not sure if this tool will help or not. My Nikon Z6 records video files (in either .mov or .mp4 containers) and the original files contain quite a bit of metadata, including original date/time. All good.

My issue arises when I edit the videos (currently with Shotcut or Davinci Resolve): the output files (not surprisingly) don't contain any metadata, including original date/time. I'd like a simple way to copy some metadata (particularly original date/time) from the originals to the output files. (The output files frequently combine several source videos, but I'm content just using the original date/time from the earliest source file so I'm not concerned about complicating details.) Because video metadata is such a mess, doing this currently involves copying metadata between original and derived video files via metadata panels using several metadata tags.

Will this app handle my situation? Which variables would handle this?
John

BanjoTom

Looks like a great solution to this longstanding issue!  Thanks, Mario!   :)
— Tom, in Lexington, Kentucky, USA

ubacher

Quote....copy some metadata (particularly original date/time) from the originals to the output files.

Would not versioning do this copying for you? Have you tried?

Mario

QuoteWill this app handle my situation? Which variables would handle this?

No. This app is for fixing broken timestamps. It does not copy metadata from source video files to other files in your database.

1. Please contact the support of your software vendor and ask them why they delete the metadata in your files when you produce new files.
If they don't respond or give you canned answers, don't buy/use their products anymore. Else you are responsible for the metadata mess you are in.

2. You can copy metadata between files in IMatch using Ctrl+C and then Ctrl+Shift+V (Copy Attributes).
This allows you easily to copy metadata from your original files to the copies without metadata produced by your software.
IMatch can help you to a certain extent but cannot undo entirely what your chosen software and workflow damages.

3. You could also use versioning if both your original files (with metadata) and the versions you have produced from them (without metadata) are in your database.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Quote from: Mario on April 05, 2019, 12:26:00 AM
QuoteWill this app handle my situation? Which variables would handle this?

No. This app is for fixing broken timestamps. It does not copy metadata from source video files to other files in your database.

1. Please contact the support of your software vendor and ask them why they delete the metadata in your files when you produce new files.
If they don't respond or give you canned answers, don't buy/use their products anymore. Else you are responsible for the metadata mess you are in.

2. You can copy metadata between files in IMatch using Ctrl+C and then Ctrl+Shift+V (Copy Attributes).
This allows you easily to copy metadata from your original files to the copies without metadata produced by your software.
IMatch can help you to a certain extent but cannot undo entirely what your chosen software and workflow damages.

3. You could also use versioning if both your original files (with metadata) and the versions you have produced from them (without metadata) are in your database.

'The app is for broken timestamps.' Right. But may the app still work in my situation as a way to paste in a date/time from another file and have the app propagate the date/time properly to appropriate metadata tags in the target file?

1. It's video. I don't think they really care, although I need to try some other video editing apps that may behave better w/ metadata. (Adobe Photoshop just sets date/times to the instant of output file creation or a time six hours later than that (UTC!) and loses the original dates...).
2. That's what I'm doing currently. Just looking for more efficient ways to do the copying. I'm also trying a metadata template to copy data added to one tag in the target file to other tags in the same file; I ran into an odd issue that I may post separately.
3. I'll look into this (thank you Mario and ubacher). I'm fairly new to dealing with video so haven't set up much of a standard workflow/naming convention for this yet...
John

JohnZeman

This looks like a nice improvement to me as well.
It's always been a little confusing as to the best way to change the date/time.  With the metadata panel or by way of the menu command.

hluxem

Looks very nice and covers the common situations for changing time stamps.

I use 2 additional scenarios to change time stamps. First I sometimes set the time from the file name. That can be done with a meta data template, but I could see an option where you create a mask in the app to indicate what position the date or time is.

Working with scanned slides and pictures I do like to set an absolute time stamp for the first file. Then I increment the time stamp by a minute to create a sort order. No matter what the naming scheme is, this gives me the flexibility to keep the pictures sorted for time which is often different than sorting by name for my scanned items. I was able to copy and paste a script together for that, not nearly as nice looking as yours, but it works for my purpose.

Heiner

sinus

Really excellent!

One remark:
The proposal from Heiner is interesting. I work also with a lot of scans, hence I select 30 images and put a date/time.
It would be nice, if I could set the date/time, and click on a button, where it says "take the date and time, but increase the time with evey image for one minute".

Sorting is for me not a problem, because I use also unique numbers, but scanned image looks better, if the time is not always the same, even then, if this minute of course mostly is not correct.

Question:
This "set from variable", does this mean, I could use a variable to take s part of my filename as the date/time ({File.Name|substr:21,43} or so)? This would be really cool, because I have mostly the correct date/time in the filename, but not always in the correct date/time - metadata-fields.

Anyway, a cool enhancement!
Best wishes from Switzerland! :-)
Markus

Mario

Quote from: jch2103 on April 05, 2019, 01:24:38 AM
(...)  Right. But may the app still work in my situation as a way to paste in a date/time from another file and have the app propagate the date/time properly to appropriate metadata tags in the target file?

No. This app cannot access metadata stored in 'other' files. It works with the metadata of each selected file individually, allowing you to shift and set time stamps to add/update/repair them.
To copy metadata between files use Copy/Paste Attributes or a file relation that propagates the metadata you want.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

#11
Quote from: hluxem on April 05, 2019, 02:37:09 AM
I use 2 additional scenarios to change time stamps. First I sometimes set the time from the file name. That can be done with a meta data template, but I could see an option where you create a mask in the app to indicate what position the date or time is.

Adding a mask feature would be really complicated. Probably users come up with dozens of different to somehow encode date and time information in their file names.
I think you can cover this special case with the Set from Variable option. Use the variable representing your file name and substr to extract the date and time as needed to create the required YYYY:MM:DD HH:MM:SS format.

Quote
Working with scanned slides and pictures I do like to set an absolute time stamp for the first file. Then I increment the time stamp by a minute to create a sort order. No matter what the naming scheme is, this gives me the flexibility to keep the pictures sorted for time which is often different than sorting by name for my scanned items.

This would require to produce a specific sort order first. Some users may need to sort by file name, others would probably need to sort by another timestamp.
Then we would need a start date and time and an per-file increment.
This is surely doable, but I wonder how many users would need this? It would add a lot of complexity, make the UI much larger etc.

@Users: If you would need the above, comment here. sinus already mentioned that he would like such a feature. Which makes two already.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

#12
Quote from: sinus on April 05, 2019, 08:21:53 AM
Question:
This "set from variable", does this mean, I could use a variable to take s part of my filename as the date/time ({File.Name|substr:21,43} or so)?

Yes. You can do that already with a Metadata Template.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

Just to make sure, that was not requesting additional features. Just food for thought to show some other situations for changing the time stamp. For me, the logic to do something like adding an increment or looking up a template is the easier part of a script. The rest is black magic to me.
As your app looks really nice, I actually thought I may hijack (duplicate) your new app and add the logic to increment the time:>).
Like with everything, you have to find a balance between make it easy for everyone or give a lot of options. 

QuoteThis would require to produce a specific sort order first.

I think of it more like I use the incremented time stamp to make a custom sort order permanent. 
For example, I have scanned slides, pictures and maybe some old Hi8 movie clips of an event or a time period. I realized early on that a naming scheme based on date is not practical when the dates are fuzzy, so everything is based on source. Using a minute as increment allows to insert additional files later as they become available.

Mario

I build all IMatch Apps with Bootstrap 4 (for the responsive UI) and Vue now. This is a powerful combination, yet still understandable for non-developers.
https://getbootstrap.com/docs/4.2/getting-started/introduction/
https://vuejs.org/

For more complex apps coming up I may switch to using TypeScript and Vue or React in the future.
This is not something non-developers can understand and requires a whole lot of developer machinery.

QuoteI think of it more like I use the incremented time stamp to make a custom sort order permanent.  (...)

In that case you still need to decide which file will be used as the "earliest" file in the sequence. And then in which sequence to process the files to create / change the timestamp. Maybe all or some files have no date yet, so you would need to set a start date and time or fill it from another tag first. Then use that file as the anchor, sort the other selected files in a defined sequence and then apply anchor date +1 unit to each other file in that sequence.

It's usually easy to make a thing work in one specific way (I just had a good laugh at what Lr Classic offers in this area, and Lightroom CC has even less options). Still, Adobe sells it in the millions and users learn to deal with it...not the same user base as IMatch  ;)

I could do a hard-coded "Sort files by existing date, if a file has no date, assume it is the oldest, use the date of the first file then increment in steps of n minutes."

Is this what users need?
If users need different options, how many users?
Would it be worth the time to implement this at all?
Maybe only the simple hard-coded option without any options?
Or do we need more options to make this useful for a larger user base?

I cannot always answer such questions. Hence I ask the users. I do this for you (users), after all.
Hopefully, we'll find a set of features that makes this app useful for many. But maybe not overcomplicate things and confuse causal users.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

QuoteIn that case you still need to decide which file will be used as the "earliest" file in the sequence.

Absolutely, that's the tricky and time consuming part and there is now software able to do the sorting for you. Think of it like you have a box of pictures and sort them :>). The dates in the files are useless because they are when the file was captured and I do not want to see old slides on the timeline of 2019.
Just as an example, I do have around 780 files from 1975, scanned slides, pictures and captured Super 8 clips. All of them are showing up in an order I think they were taken.
I only see one option, use the sort order for the selection and increment the time from file 1 to n. I do have to admit that I have a field to define the increment.

Heiner

ubacher

I think the idea of incrementing time, as Hluxem does, is a neat solution for systems which do not have the capabilities of
Imatch i.e. as a workaround.
For Imatch I use an Attribute field called Sequence Number which I fill (via script) to show/record the sort order I want.
I then have a sort preset to sort by this attribute.

Sorry - we are getting off-topic here.

ben

Mario, that's a great app you are working on.
I think all the features you have in mind are good as shown on the screenshot.
I think we will find out if something is missing as soon as we start working on it.

I also would support some of the requests from other users here in the thread. But i think it would overcomplicate the app. I have my own app for incrementing the date with each file

Maybe one thing to improve:
The source from where to take the new date/time Information seems to be very important.
Maybe another field "from metadata" that has a button to open the standard tag selector could be good.

Ben

Mario

Quote from: ben on April 05, 2019, 07:25:30 PM
Maybe one thing to improve:
The source from where to take the new date/time Information seems to be very important.
Maybe another field "from metadata" that has a button to open the standard tag selector could be good.
Ben

This already exists:



The two standard XMP tags (which is what most users change, if at all) are selectable in the drop-down, plus the combination of both tags (to keep both in sync).
These tags are automatically mapped to their EXIF and legacy IPTC counterparts during write-back.

If this is not sufficient, the user can select Custom Metadata Tag and pick the tag to manipulate.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

QuoteIf this is not sufficient, the user can select Custom Metadata Tag and pick the tag to manipulate.
Perfect, this was not clear to me either after your first post.

My comment was about something else, though.
I meant the source of the date/time information. Meaning, "which date/time" do you want to write to "Date Created / Date Subject Created".
You can either shift the date by a value, or use a variable.
And my suggestion was to let the user also select another metadata tag (maybe a button for the tag selector also).

Mario

This is covered by the variable. Variables can represent any tag.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

ben

Quote from: Mario on April 05, 2019, 08:41:08 PM
This is covered by the variable. Variables can represent any tag.
Sounds good, then it seems very complete already.
Looking forward to it, since i use the add/substract function quite regularly.

Mario

#22
What about this addition?



This works on the selected target tag (created, subject created, custom).

It starts with the date and time of the first selected file in the file window, and then adds this date and time with the increment in seconds to each subsequent selected file.
This way the user can first produce the order she/he wants in the File Window (selecting a sort profile, custom sort order) and then run the app to produce the sequence.
The user can also set the date and time of the first file in the Metadata Panel as needed before running the app.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

hluxem

That's perfect, will render my script unnecessary.

Heiner

sinus

Best wishes from Switzerland! :-)
Markus

erichaas

This sounds like something I would find very useful.