Bug 500283 - Add a new tool to identify broken photos and videos on the collection.
Summary: Add a new tool to identify broken photos and videos on the collection.
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Maintenance-Quality (other bugs)
Version First Reported In: 8.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 274363 424441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-02-17 21:59 UTC by Andy
Modified: 2025-04-11 22:51 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2025-02-17 21:59:05 UTC
Hello,

I suddenly find a lot of broken photos and videos. The media often can no longer be opened or has large grey or brown areas. I'm currently restoring them using backups.

Can digikam recognise broken JPG or mp4 and put them together in a list? Otherwise I'll have to look through all 80,000 files. :-/

Cheers
Andy
Comment 1 caulier.gilles 2025-02-18 06:47:57 UTC
Hi Andy,

In the maintenance tool, existing process to cleanup|repair the database already exists, but not one to identify the broken files.
I think we have already a file in bugzilla about this topic.

Ideas:

- Using the image quality sorter tool to identify the broken files over the collections. A broken file is a image which cannot be open for reading. This can be an intensive task, which can be complex to achieve and not safe to run due to hardware failures.

- Using a 3rd-party script to identify broken file on disk. It will be more safe as the digiKam database will be corrupted too. Some pointers:

https://stackoverflow.com/questions/46854496/python-script-to-detect-broken-images
https://www.davidebarranca.com/2018/05/automated-check-for-corrupted-image-files-with-python-and-imagemagick/
https://codeonby.com/2022/05/07/python-for-data-recovery/
https://aravinda-gn.medium.com/how-to-detect-and-remove-corrupted-image-files-in-an-image-dataset-using-python-3749d8ea5ba8
https://support.microsoft.com/en-us/topic/use-the-system-file-checker-tool-to-repair-missing-or-corrupted-system-files-79aa86cb-ca52-166a-92a3-966e85d4094e
https://www.disktuna.com/finding-out-which-file-is-affected-by-a-bad-sector/

Tips: uses a more robust backup and restore strategy as explained in the online documentation:

https://docs.digikam.org/en/asset_management/data_protection.html

Best regards

Gilles Caulier
Comment 2 caulier.gilles 2025-02-18 06:48:28 UTC
See a
Comment 3 caulier.gilles 2025-02-18 06:48:47 UTC
See also the related bug 274363
Comment 4 caulier.gilles 2025-02-18 06:50:21 UTC
*** Bug 274363 has been marked as a duplicate of this bug. ***
Comment 5 Maik Qualmann 2025-02-18 06:54:58 UTC
The same is Bug 424441.

Maik
Comment 6 Andy 2025-02-18 18:01:50 UTC
Hello and thank you for the links. I'll read through them.
Please excuse me if I haven't found it in other bug reports.

digikam has crashed a lot in the last few days. Often with a blue screen. Although I closed the program normally, I could still see the program as a background process in the task manager for a long time. I think even several times. With the version from February 17, 2025, it no longer happened.

Cheers
Andy
Comment 7 caulier.gilles 2025-04-11 22:50:54 UTC
*** Bug 424441 has been marked as a duplicate of this bug. ***