Bug 499074

Summary: created video filename on import is wrong (date/time)
Product: [Applications] digikam Reporter: Tobias Philipp <maillist>
Component: Import-PostProcessingAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: metzpinguin
Priority: NOR    
Version First Reported In: 8.5.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 8.6.0
Sentry Crash Report:
Attachments: Import view
Result in Main window
Video Metadata
Import settings

Description Tobias Philipp 2025-01-23 19:53:51 UTC
Created attachment 177633 [details]
Import view

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY

Hello,
when i import files from my Nikon Z6ii camera, the images will be correct renamed according to the pattern [date:yyyy.MM.dd_hh-mm-ss]_kids_[file]{range:5,8}.
But by video files  the date/time from the import moment  is used to build the filename, although in the importer window the filename preview show the right name (but with 1 our difference because of daylight saving times). Files ar read from a CFExpress Type B with an USB Card Reader.

STEPS TO REPRODUCE
1.  Import videos withe the importer
2.  check the filename in the mainwindow

OBSERVED RESULT

the date/time from the import moment is used

EXPECTED RESULT

at least the 1 hour wrong time from the name preview should be used to build the filename.
Even better the correct time as with the photos.
See the attachments for an example.

SOFTWARE/OS VERSIONS
Manjaro Linux with digikam 8.5
digikam version 8.5.0
XMP SDK: 7.0
Qt WebEngine version: 6.8.0
Qt Sql drivers: QPSQL QIBASE QSQLITE QODBC QMARIADB QMYSQL
Qt Framework: 6.8.1
Libx265: 4.0
LibTIFF: 4.7.0
LibRaw: 0.22.0
LibPNG: 1.6.44
LibPGF: 7.21.07
LibOpenCV: 4.10.0
LibLCMS: 2160
LibJPEG: 80
LibJasper: 4.2.4
LibHEIF: 1.19.3
LibGphoto2: 2.5.31
LibCImg: 130
LibAVUtil: 59.39.100
LibAVFormat: 61.7.100
LibAVCodec: 61.19.100
LensFun: 0.3.4-0
KDE Framework: 6.8.0
ImageMagick codecs: 7.1.1
Geolocation support: Ja
Exiv2: 0.28.3
ExifTool: 13.07
Eigen: 3.4.0
DNG SDK: 1.7.1


ADDITIONAL INFORMATION
Comment 1 Tobias Philipp 2025-01-23 19:55:50 UTC
Created attachment 177634 [details]
Result in Main window

The result from the import in the Main window. Photo names are correct. Videos have the time/date from the import in the filename.
Comment 2 Tobias Philipp 2025-01-23 19:56:08 UTC
Created attachment 177635 [details]
Video Metadata
Comment 3 Maik Qualmann 2025-01-23 20:49:11 UTC
The time information in the import view may vary, because depending on the setting in the digiKam camera settings, this can also be obtained from the file date and not from metadata.

Does ExifTool work in your installation?

Maik
Comment 4 Tobias Philipp 2025-01-23 21:01:28 UTC
Created attachment 177636 [details]
Import settings
Comment 5 Maik Qualmann 2025-01-23 21:02:40 UTC
Ok, I can reproduce the wrong video date as text with my Nikon Z. I will look into it.

Maik
Comment 6 Maik Qualmann 2025-01-23 21:04:37 UTC
This setting only affects the import window. We always use the metadata after the download for renaming or folder creation, etc.

Maik
Comment 7 Tobias Philipp 2025-01-23 21:05:20 UTC
Hi,

thanks for your fast reply.

I have "use metadata" set in the import settings in digikam.
Yes, exiftool is working. Here is the data from one of the video files:
(I have renamed the file to the correct time in the meantime)

exiftool 2025.01.23_12-31-32_kids_0621.MP4                              ✔  22:02:26 
ExifTool Version Number         : 13.07
File Name                       : 2025.01.23_12-31-32_kids_0621.MP4
Directory                       : .
File Size                       : 949 MB
File Modification Date/Time     : 2025:01:23 13:29:23+01:00
File Access Date/Time           : 2025:01:23 16:23:56+01:00
File Inode Change Date/Time     : 2025:01:23 16:33:38+01:00
File Permissions                : -rwxr-xr-x
File Type                       : MP4
File Type Extension             : mp4
MIME Type                       : video/mp4
Major Brand                     : MP4 v2 [ISO 14496-14]
Minor Version                   : 0.0.1
Compatible Brands               : mp42, avc1, niko
Movie Header Version            : 0
Modify Date                     : 2025:01:23 11:29:23
Time Scale                      : 30000
Duration                        : 0:01:03
Preferred Rate                  : 1
Preferred Volume                : 100.00%
Preview Time                    : 0 s
Preview Duration                : 0 s
Poster Time                     : 0 s
Selection Time                  : 0 s
Selection Duration              : 0 s
Current Time                    : 0 s
Next Track ID                   : 3
Track Header Version            : 0
Track Create Date               : 2025:01:23 11:29:23
Track Modify Date               : 2025:01:23 11:29:23
Track ID                        : 1
Track Duration                  : 0:01:03
Track Layer                     : 0
Track Volume                    : 0.00%
Image Width                     : 3840
Image Height                    : 2160
Media Language Code             : und
Graphics Mode                   : srcCopy
Op Color                        : 0 0 0
Compressor ID                   : avc1
Source Image Width              : 3840
Source Image Height             : 2160
X Resolution                    : 72
Y Resolution                    : 72
Compressor Name                 : AVC Coding
Bit Depth                       : 24
Color Profiles                  : nclx
Color Primaries                 : BT.709
Transfer Characteristics        : BT.709
Matrix Coefficients             : BT.709
Video Full Range Flag           : Full
Video Frame Rate                : 29.97
Matrix Structure                : 1 0 0 0 1 0 0 0 1
Media Header Version            : 0
Media Create Date               : 2025:01:23 11:29:23
Media Modify Date               : 2025:01:23 11:29:23
Media Time Scale                : 48000
Media Duration                  : 0:01:03
Handler Class                   : Media Handler
Handler Type                    : Audio Track
Balance                         : 0
Audio Format                    : mp4a
Make                            : NIKON CORPORATION
Model                           : NIKON Z 6_2
Software                        : NIKON Z 6_2 Ver.01.62
Create Date                     : 2025:01:23 12:29:23
Date/Time Original              : 2025:01:23 12:29:23
Frame Count                     : 1878
Frame Rate                      : 29.97
Frame Width                     : 3840
Frame Height                    : 2160
Audio Channels                  : 2
Audio Bits Per Sample           : 16
Audio Sample Rate               : 48000
Nikon Date Time                 : 2025:01:23 12:29:23
Electronic VR                   : Off
Exposure Time                   : 1/100
F Number                        : 2.8
Exposure Program                : Aperture-priority AE
Exposure Compensation           : 0
Metering Mode                   : Multi-segment
Focal Length                    : 20.0 mm
Serial Number                   : 6112435
Lens Info                       : 20mm f/2.8
Lens Make                       : 
Lens Model                      : Viltrox AF 20/2.8 Z
Lens Serial Number              : 0
Maker Note Version              : 2.11
White Balance                   : AUTO1
Focus Mode                      : AF-F
Crop Hi Speed                   : 16:9 Crop (6064x4040 cropped to 6064x3416 at pixel 0,312)
Color Space                     : sRGB
VR Info Version                 : 0200
Vibration Reduction             : On
VR Mode                         : On (1)
VR Type                         : In-body
Active D-Lighting               : Normal
Picture Control Version         : 0300
Picture Control Name            : Standard
Picture Control Base            : Standard
Picture Control Adjust          : Quick Adjust
Picture Control Quick Adjust    : n/a
Sharpness                       : 3.00
Mid Range Sharpness             : 2.00
Clarity                         : 2.00
Contrast                        : 1.00
Brightness                      : Normal
Saturation                      : None
Hue                             : None
Filter Effect                   : n/a
Toning Effect                   : n/a
Toning Saturation               : n/a
Picture Control Data            : (Binary data 108 bytes, use -b option to extract)
Time Zone                       : +01:00
Daylight Savings                : No
Date Display Format             : D/M/Y
ISO                             : 200
ISO Expansion                   : Off
ISO2                            : 200
ISO Expansion 2                 : Off
Vignette Control                : Normal
White Balance Fine Tune         : 0 0
Primary Slot                    : CFexpress/XQD Card
Secondary Slot Function         : Overflow
ISO Auto Shutter Time           : 1/125 s
Flicker Reduction Shooting      : Enable
Bracket Set                     : AE
Bracket Program                 : Disabled
Silent Photography              : Off
Movie ISO Auto Control Manual Mode: On
Movie White Balance Same As Photo: No
Movie AF Area Mode              : Auto (People)
AF-S Priority Sel               : Focus
Block Shot AF Response          : 3 (Normal)
AF Activation                   : Shutter/AF-On
Focus Point Wrap                : No Wrap
Manual Focus Point Illumination : On
Dynamic Area AF Assist          : On
Low Light AF                    : Off
AF-Assist Illuminator           : On
Manual Focus Ring In AF Mode    : On
Exposure Control Step Size      : 1/3 EV
Easy Exposure Compensation      : On (auto reset)
Fine Tune Opt Matrix Metering   : 0
Fine Tune Opt Center Weighted   : 0
Fine Tune Opt Spot Metering     : 0
Fine Tune Opt Highlight Weighted: 0
Shutter Release Button AE-L     : Off
Self Timer Time                 : 10 s
Self Timer Shot Count           : 1
Self Timer Shot Interval        : 0.5 s
Playback Monitor Off Time       : 10 s
Menu Monitor Off Time           : 1 min
Image Review Monitor Off Time   : 4 s
CL Mode Shooting Speed          : 3 fps
Max Continuous Release          : 200
Sync Release Mode               : Sync
Exposure Delay Mode             : Off
Shutter Type                    : Auto
Extended Shutter Speeds         : Off
File Number Sequence            : On
Apply Settings To Live View     : On
Framing Grid Display            : Off
Focus Peaking Level             : Standard Sensitivity
Focus Peaking Highlight Color   : Yellow
Continuous Mode Display         : On
Flash Shutter Speed             : 1/60 s
Flash Exposure Comp Area        : Entire Frame
Auto Flash ISO Sensitivity      : Subject and Background
Modeling Flash                  : On
Auto Bracket Mode M             : Flash/Speed
Sub Selector                    : Focus Point Selection
Lens Func 2 Button              : AF-On
Lens Control Ring               : Aperture
Shutter Speed Lock              : Off
Aperture Lock                   : Off
Cmd Dials Reverse Rotation      : Exposure Compensation
Cmd Dials Change Main Sub       : Autofocus Off, Exposure Off
Cmd Dials Menu And Playback     : On
Sub Dial Frame Advance          : 10 Frames
Release Button To Use Dial      : No
Reverse Indicators              : - 0 +
Reverse Focus Ring              : Not Reversed
Vertical Func Button            : AE Lock (reset on release)
Vertical AF On Button           : Same as AF-On Button
Vertical Multi Selector         : Same as MultiSelector
Movie AF-On Button              : Zoom (Low)
Movie Shutter Button            : Take Photo
Movie Multi Selector            : Center Focus Point
Movie AF Speed                  : 0
Movie AF Speed Apply            : Always
Movie AF Tracking Sensitivity   : 4 (Normal)
Movie Highlight Display Pattern : Off
Movie Highlight Display Threshold: 248
Vertical Movie Func Button      : None
Vertical Movie AF On Button     : Same as AF-On
Language                        : Unknown (4)
Monitor Brightness              : 0
Save Focus                      : Off
Flick Advance Direction         : Left to Right
HDMI Output Resolution          : Auto
HDMI Output Range               : Auto
HDMI External Recorder          : Off
HDMI Bit Depth                  : 8 Bit
USB Power Delivery              : Enable
Energy Saving Mode              : On
Lens Type                       : AF
Lens                            : 20mm f/2.8
Flash Mode                      : Did Not Fire
Lens Data Version               : 0801
Lens ID                         : Unknown (2822)
Lens Firmware Version           : 1.0.5
Max Aperture                    : 2.8
Focus Distance                  : 0.570 m
Lens Position Absolute          : 532
Lens Mount Type                 : Z-mount
Shutter Count                   : 2437
Flash Info Version              : 0300
Vari Program                    : 
High ISO Noise Reduction        : Normal
AF Info 2 Version               : 0301
Contrast Detect AF              : On (2)
AF Area Mode                    : Auto (People)
Phase Detect AF                 : Off
AF Area X Position              : 0
Focus Position Horizontal       : n/a
AF Area Y Position              : 0
Focus Position Vertical         : n/a
Thumbnail Image                 : (Binary data 12322 bytes, use -b option to extract)
Preview Image                   : (Binary data 2486678 bytes, use -b option to extract)
Preview Image 1                 : (Binary data 50257 bytes, use -b option to extract)
Preview Image 2                 : (Binary data 451714 bytes, use -b option to extract)
Media Data Size                 : 945422574
Media Data Offset               : 3145736
Aperture                        : 2.8
Image Size                      : 3840x2160
Megapixels                      : 8.3
Shutter Speed                   : 1/100
Auto Focus                      : On
Lens Spec                       : 20mm f/2.8 AF
Avg Bitrate                     : 121 Mbps
Rotation                        : 0
Focal Length                    : 20.0 mm
Light Value                     : 8.6
Comment 8 Maik Qualmann 2025-01-23 21:58:16 UTC
Git commit 893279c6a875b10a4a88c87d0d935fcccc344159 by Maik Qualmann.
Committed on 23/01/2025 at 21:57.
Pushed by mqualmann into branch 'master'.

read all video metadata during import
FIXED-IN: 8.6.0

M  +1    -1    NEWS
M  +15   -9    core/utilities/import/main/importui.cpp

https://invent.kde.org/graphics/digikam/-/commit/893279c6a875b10a4a88c87d0d935fcccc344159
Comment 9 Maik Qualmann 2025-01-24 07:08:16 UTC
Git commit 61647bb6d8cc9b008d54bfb5dad37251f79f1362 by Maik Qualmann.
Committed on 24/01/2025 at 07:07.
Pushed by mqualmann into branch 'master'.

use all video metadata for import view with UMS driver

M  +1    -1    core/utilities/import/backend/umscamera.cpp

https://invent.kde.org/graphics/digikam/-/commit/61647bb6d8cc9b008d54bfb5dad37251f79f1362