Skip to content

Videos / Date Anchor QUESTION #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Dwindle2234 opened this issue Feb 5, 2025 · 5 comments
Open

Videos / Date Anchor QUESTION #172

Dwindle2234 opened this issue Feb 5, 2025 · 5 comments

Comments

@Dwindle2234
Copy link

Dwindle2234 commented Feb 5, 2025

After initial import I noticed that some of my videos were incorrectly positioned in the media stream. So I updated the files' created, modified and media-created dates and noticed that HG did spot them as 'C' on restarting but the media stream didn't update, nor did the dates in the information pane. I'd done similar for photos (Date-taken) and HG quickly resorted without intervention.

So, I'd like to know where HG pulls date/time for videos from / or should I be running a CLI command for it to force a reindex.

Thanks

@xemle
Copy link
Owner

xemle commented Feb 6, 2025

Hi @Dwindle2234

thank you for your issue report.

On my gallery the video have an offset of the timezone but was to lazy to file that issue (to provide a honest answer). The offset is max 2h for my local.

In the general architecture the extractor creates meta and preview files in the storage directory including of their sidecar files. In the database creation step this information is merged to a database entry.

For the the date.js is responsible to set the date, ordered by available meta information from metaEntries.

The exif information is read by exiftool. So if you have only one video file, date.js takes its time from the exif information in following order:

  • GPSDateTime
  • SubSecDateTimeOriginal
  • DateTimeOriginal
  • CreateDate

With the assumption the a GPS has the highest accuracy.

If your video file has an xmp side car file the date is taken from it via the metaEntries.

I hope this answer is not to technical and points you the the part where a wrong video date comes from. Maybe you have an better idea how to process and extract the crucial date property?

@Dwindle2234
Copy link
Author

Many thanks for the reply. I shall continue to fiddle but will now exclusively use exiftool.

@Dwindle2234
Copy link
Author

After setting my date/times via exiftool - I now see this error when indexing:

[2025-02-07 11:57:46.326]: database.media.date warn Unknown time format 2005:06:01 00:00 of {"_ctor":"ExifDateTime","year":2005,"month":6,"day":1,"hour":0,"minute":0,"second":0,"tzoffsetMinutes":0,"rawValue":"2005:06:01 00:00","zoneName":"UTC","inferredZone":true} of entry 44e2d64:Home-Vids:2005/On The Big Wheel.mp4

Can't we have 00:00 as a time? Any suggestions?

@xemle
Copy link
Owner

xemle commented Feb 7, 2025

Have you tried time format 00:00:00?

How do you set the time? And where di you set it?

I recommend setting the time in a xmp side car file, so that the original is left unchanged

@Dwindle2234
Copy link
Author

I tried adding the seconds and the warning has gone away. Thanks

These are video files relating to a period 20 years ago - I'm just looking for them to be correctly positioned in the media stream.

exiftool -"*Date=2005:06:01 00:00.00" -overwrite_original "Olly The Octopus.mp4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants