Bug 453180 - "not valid" dates for video in "Adjust Time & Date"
Summary: "not valid" dates for video in "Adjust Time & Date"
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Date (show other bugs)
Version: 8.0.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-29 08:55 UTC by Kristian Karl
Modified: 2022-05-02 08:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.0.0


Attachments
Screenshot of "Adjust Time & Date" (85.03 KB, image/png)
2022-04-29 09:05 UTC, Kristian Karl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Karl 2022-04-29 08:55:04 UTC
SUMMARY
When using a compiled version of digikam from latest sources, opening the "Adjust Time & Date" dialog for attached video, I get "not valid" for "Timestamp used".

STEPS TO REPRODUCE
1. Use the attached video 2022-04-27_181056.mp4
2. Open the "Adjust Time & Date" dialog
3. EXIF/IPTC/XMP should be selected
3. Check the "Timestamp used" for the video

OBSERVED RESULT
The  fields in column "Timestamp used" and Timestamp Updated" are "not valid"

EXPECTED RESULT
The  fields in column "Timestamp used" and Timestamp Updated" should both be "2022-04-27 18:09:38"

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.93.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-40-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-2600K CPU @ 3.40GHz
Memory: 15,6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 960/PCIe/SSE2

ADDITIONAL INFORMATION
When using the Weekly Snapshots appimage digiKam-7.7.0-20220427T043335-x86-64.appimage the expected result is correct. It seems like the appimage version of digikam is using ffmpeg(?) to determine dates, and my compiled digikam is using exiftool?


About exiftool
=============
exiftool version is 12.40
Comment 1 Kristian Karl 2022-04-29 08:56:31 UTC
For some reason, I get "Your comment has been automatically blocked as it is believed to contain spam. Please contact Sysadmin if you believe this to be incorrect." when I try to add the log output from digikam here into the comment
Comment 2 Kristian Karl 2022-04-29 08:57:37 UTC
Select the attached video in thumbnal view, and then open the dialog "Adjust Time & Date"
Digikam: digiKam compiled from sources
==========================================
>digikam.general: Action Thread run  1  new jobs
>digikam.metaengine: ExifTool path: "exiftool"
>digikam.metaengine: Path to ExifTool: "exiftool"
>digikam.metaengine: Check ExifTool availability: true
>digikam.metaengine: Path to ExifTool: "exiftool"
>digikam.metaengine: ExifToolProcess::start(): create new ExifTool instance: "exiftool" ("-stay_open", "true", "-@", "-", "-common_args", "-charset", "filename=UTF8", "-charset", "iptc=UTF8")
>digikam.metaengine: ExifTool process started
>digikam.metaengine: ExifTool "Load Chunks" "-TagsFromFile /home/krikar/Pictures/tmp/2022-04-27_181056.mp4 -all:all<all:all -o -.exv"
>digikam.metaengine: ExifToolProcess::readOutput(): ExifTool command completed
>digikam.metaengine: ExifTool complete command for action "Load Chunks" with elasped time (ms): 386
>digikam.metaengine: EXV 9
>digikam.metaengine: ExifTool parsed command for action "Load Chunks"
>digikam.metaengine: 1 properties decoded
>digikam.metaengine: ExifTool complete "Load Chunks" for "/home/krikar/Pictures/tmp/2022-04-27_181056.mp4"
>digikam.metaengine: Metadata chunk loaded with ExifTool
>digikam.metaengine: EXV chunk size loaded with ExifTool: 9
>digikam.metaengine: ExifToolProcess::terminate(): send ExifTool shutdown command...
>digikam.metaengine: ExifTool process finished 1 QProcess::NormalExit
>digikam.metaengine: Loading metadata with "ExifTool" backend from "/home/krikar/Pictures/tmp/2022-04-27_181056.mp4"
>digikam.general: One job is done
Comment 3 Kristian Karl 2022-04-29 09:00:58 UTC
This output was not possible to add here, so I created a public gist unstead: 
https://gist.github.com/KristianKarl/cbf1e62c3fdfbd7bfa7bb97bbd57ccd4
Comment 4 Kristian Karl 2022-04-29 09:04:54 UTC
Video available here: https://www.dropbox.com/s/l8lxx65ovjkdya9/2022-04-27_181056.mp4?dl=0
Comment 5 Kristian Karl 2022-04-29 09:05:42 UTC
Created attachment 148456 [details]
Screenshot of "Adjust Time & Date"
Comment 6 caulier.gilles 2022-04-29 09:12:20 UTC
You can also attach a compressed archive of log.
Comment 7 Kristian Karl 2022-04-29 09:14:41 UTC
Ah, thanks! Good to know for the next time :+1:
Comment 8 Maik Qualmann 2022-04-29 10:33:22 UTC
Git commit b80ac910fae2d749f60e515052fb0f6f2c1c1b24 by Maik Qualmann.
Committed on 29/04/2022 at 10:32.
Pushed by mqualmann into branch 'master'.

currently still prefer the FFmpeg backend for video
Exiv2 does not know any metadata created by
ExifTool in the EXV container.
FIXED-IN: 8.0.0

M  +2    -1    NEWS
M  +4    -4    core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp

https://invent.kde.org/graphics/digikam/commit/b80ac910fae2d749f60e515052fb0f6f2c1c1b24
Comment 9 Maik Qualmann 2022-04-29 10:55:26 UTC
I'll take a closer look at the problem tonight, since we've already read video metadata with ExifTool Backend. Here the EXV container only has a size of 9 bytes.

Maik
Comment 10 Maik Qualmann 2022-04-29 18:38:29 UTC
Git commit bd137091dd8964203fc403373d54062eee194c1b by Maik Qualmann.
Committed on 29/04/2022 at 18:36.
Pushed by mqualmann into branch 'master'.

fix ExifTool command to loading video chunk
We cannot copy all metadata to all groups.
We currently leave the FFmpeg backend as
the default as it provides more metadata.

M  +1    -1    core/libs/metadataengine/exiftool/exiftoolparser_command.cpp

https://invent.kde.org/graphics/digikam/commit/bd137091dd8964203fc403373d54062eee194c1b
Comment 11 Maik Qualmann 2022-04-29 19:44:25 UTC
Git commit beb4a99d849640e0e5c0796fdd375ba9aa891e10 by Maik Qualmann.
Committed on 29/04/2022 at 19:43.
Pushed by mqualmann into branch 'master'.

we need different copy option for image and video

M  +1    -1    core/libs/metadataengine/dmetadata/dmetadata.h
M  +2    -2    core/libs/metadataengine/dmetadata/dmetadata_exiftool.cpp
M  +1    -1    core/libs/metadataengine/dmetadata/dmetadata_fileio.cpp
M  +1    -1    core/libs/metadataengine/exiftool/exiftoolparser.h
M  +10   -2    core/libs/metadataengine/exiftool/exiftoolparser_command.cpp

https://invent.kde.org/graphics/digikam/commit/beb4a99d849640e0e5c0796fdd375ba9aa891e10
Comment 12 Kristian Karl 2022-05-02 08:58:41 UTC
Most awesome!
Thanks for the speedy fix :-)