Bug 506362

Summary: mp4 files are sorted into the incorrect folder on import
Product: [Applications] digikam Reporter: Jens <jens-bugs.kde.org>
Component: Import-AlbumsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 8.6.0   
Target Milestone: ---   
Platform: Appimage   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jens 2025-06-29 19:22:52 UTC
SUMMARY
When I import MP4 files into Digikam with "Date based subalbus" and the template format "yyyy/yyyy.MM.dd", Digikam always uses the current date for the subalbum name and not the encoding date, creation date, or last-modified date. This has been going on since a while (Digikam 6?) for now, it is not a new bug.
It also does not seem to depend on the precise MP4 format (I am experiencing this with H264 videos created by Handbrake as well as HEVC H.265 videos created by my smartphone as well as videos downloaded from the net from various sources). I have attached an example file.

STEPS TO REPRODUCE
1. Save the attached mp4 file somewhere
2. Open Digikam choose "Import images", set subalbum template as above, select this file
3. Import it

OBSERVED RESULT
Subalbum based on current (todays) date is created.

EXPECTED RESULT
"2025/2025.05.18" should have been created as a subalbum since this is the date of the file and in the mp4 metadata.

SOFTWARE/OS VERSIONS: Digikam current Appimage and KDE Neon 24.04 with all updates applied.
Comment 1 Maik Qualmann 2025-06-29 19:26:10 UTC
We need a sample video file because the metadata date is read correctly in my MP4 files.

Maik
Comment 2 Maik Qualmann 2025-06-29 20:11:19 UTC
I've now tested a larger set of MP4 files again: various generations of Samsung smartphones, Nikon cameras, user samples, etc. All work correctly. The only thing that comes to mind is that ExifTool isn't set up correctly and isn't working. Incidentally, ExifTool doesn't need to be enabled for reading in the metadata settings for video files; ExifTool is always used for videos.

Maik
Comment 3 Jens 2025-06-30 18:49:28 UTC
Sorry, i thought I had attached an example in the first place. Here you are.
https://share.rb-hosting.de/s/rFAJzAa8eS6JK4i
Comment 4 Maik Qualmann 2025-06-30 18:55:55 UTC
The album 2025/2025.05.18 was created here and contains the video.
If this isn't the case for you, we'll need a log from the terminal with the Qt debug variable enabled or internal debugging enabled in the setup.

https://www.digikam.org/contribute/#linux-host

Maik
Comment 5 Jens 2025-07-01 19:11:57 UTC
This is strange.
When I repeat the process with a single video file, this works fine.
However I know that for quite some time (1-2 years now?) if I import weeks of photos and videos, e.g. from a vacation, I always have one single date folder with $TODAY as date containing all videos of the whole time range, and have to sort them into the correct folders by myself.
I have now added the QT debug flags to my desktop shortcut so Digikam always logs this, and will get back to this bug when I have sufficient new data to batch import. Thanks for your help!
Comment 6 Bug Janitor Service 2025-07-16 03:47:25 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2025-07-31 03:46:27 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.