Digikam video time is off

Hi,

I’ve been having problems with importing video files from my Sony A6700 camera using digikam.

During importing, I use auto-creation of album with date-based sub albums. Sometimes, the videos are placed in the folder one day off. My Sony camera also created a small thumbnail Jpeg file for every video file, those jpeg files are placed in the correct date folder. So only video file has the problem.

I checked the file properties (create and modified dates) for the video files and they are correct, but the digikam properties has the date off. I think this has to do with how digikam reads the time. I think this is similar to the topic here with Rapid Photo Downloader.

Is there any solution to this problem?

Thanks,
Joseph

1 Like

The problem is that some camera devices write a UTC time but do not set a UTC flag, others do not write a UTC time but set the flag. Therefore we “recognize” video files on the metadata, e.g. we can assume that Apple and Android write UTC correctly. Things are completely different with cameras. Please send me a short video clip of your Sony camera so we can add it.

Also keep in mind that most video files do not contain time zone information, so the conversion is based on the current local time zone of the computer.

1 Like

Hi Maik,

Thanks for your feedback. Here is a short video clip that I took with the lens cap on (basically black).

I opened the video file using Sony’s Catalyst Browse software. I saw (-08:00) in the created/modified Date, which my time zone (Pacific Standard Time).

Thanks,
Joseph

1 Like

I have the same issue. Seems to be a problem with many Sony cameras and Digikam (and maybe other tools?). The creation time is listed wrong, so the videos are offset by my local time offset.
Strangely, the file modification time is correct in local time. I currently “solve” the issue manually
by using Digikams date/time tool to copy the file modification date or add my local time offset.
It would be great if you could change the way Digikam handles these files. Is there any progress on this?

There are already some fixes for digiKam-8.4.0. The Time Adjust Tool also offers the option of correcting all date information in the video using ExifTool, including the time information in the QuickTime container.
To correctly recognize a video, we need to know whether it contains correct UTC time or not. Unfortunately, things are very different for camera devices. Send me a very short video filming a local clock. I will adjust the video time detection accordingly based on metadata.

1 Like

I noticed that in Digikam 8.3.0 in the Metadate panel there is a “Shot Date” which has the correct local time. Maybe just use that as the creation date?
I also examined an mp4 file with exiftool. It displays “Creation Date Value” which also seems to be the correct value (creation date in exiftool is also UTC). Is this what Digikam uses as “Shot Date”?

The first thing you should know is that the metadata viewer for video files is “virtual”. Video files usually do not have Exif or Xmp metadata, for better presentation we “interpret” these as Exif and/or Xmp. Even ExifTool cannot detect whether the time is actually UTC. If your time is correct, the camera writes an incorrect UTC time. With ExifTool, whether it is interpreted as UTC depends on the “-api QuickTimeUTC” option.
In digiKam-8.4.0, together with a user, we changed some things in the video metadata, and the “virtual” metadata is no longer written back into the video files. However, when it comes to date/time, it still requires that we “recognize” the video file.

Instead of that digikam “recognizes” the video files from all cameras, can this be a setting that the user can set?

Most users have probably accumulated various video files from different camera devices and smartphones over the years. I don’t think trading this with a fixed option is helpful.
Your video example here has the following date/time string in the file:
“2024-02-05T16:52:53.000000Z”

What display do you expect in the thumbnail in digiKam as the creation date? In your time zone (-08:00) 2024-02-05 08:52:53?

Most users probably only have a handful of cameras, so we can have a list of cameras in the digikam database and let the user change for each camera.

Base on dearestshaded and my experiences, Sony cameras seems to have this problem. My previous Sony A7iii also had the same problems. Maybe the cameras from each camera brand behaves similarly?

Yes, my time zone is (-08:00) 2024-02-05 08:52:53.

Of course, you could also set your camera(s) to UTC time. That, in combination with geolocalisation or time zone info (user-provided), would make sure the time is always correct, even when traveling or in a zone using DST, while allowing programs to display the local time (for the date and place the image/video was taken).