Closed pbogre closed 4 months ago
I am trying to import a collection of 50000+ images, however in the process of generating previews, object detection etc. I am getting the following errors:
[2024-06-30 11:11:14.634]: extractor.image.preview error Could not calculate image preview of <file>: Error: Could not calculate image preview from <file> with size 1920: Error: Input file contains unsupported image format
I noticed that when adding items to the queue to be processed, they are all detected as having a size of 4KB:
Calculating ids for 200 entries with 0.8MB of total size 71.6MB (1.1%)
.
200 images with only 0.8 MB sounds strange and also your reported 4KB. Are these meta files from mac in some dot directories?
However the images are fine and I checked them myself. They all have an appropriate file size (checked using
du -h
) and Iscp
'd them to my laptop (Mac) and I was able to view them perfectly fine.This problem happens with JPG, MOV, MP4, CR2 file formats (all the ones present in my collection). Checking them with
ffprobe
on my laptops shows no warnings or errors.However it does not happen for all files in my collection, as 8216 of them get this problem while all others are processed perfectly.
Currently I do not have a clear picture what can cause this issue. Did you also check the files inside the container that these files can be read? You can cross check the SHA1 sum of the file index produced from HomeGallery and the SHA1 on the running container.
So I am also not know if it is a problem reading the complete file or it is a problem of sharp lib resizing the image.
Below you can find one of the files that has this problem.
Would you mind to attach the file, so I can check it on my side?
It might also be worth noting that all the files that get this error were imported from my camera on the same day.
Did you run HomeGallery previously without issues and updated the container recently? I did a larger refactoring from CommenJS to ES modules in the code. All my tests passed but maybe there is a problem? These changes were pushed 3 days ago.
Docker compose file:
The compose file looks OK to me.
The gallery.config.yml
looks also good except one thing but this should not be the problem
#database: maxMemory: 4096
It should be with enabled database key
database:
maxMemory: 4096
200 images with only 0.8 MB sounds strange and also your reported 4KB. Are these meta files from mac in some dot directories?
Ah, I hadn't thought about this. Your intuition was correct, the logs from home-gallery were reporting files that had ._
prefixed to their name, which I hadn't noticed thinking it was something to do with the formatting of the logs, and because I never thought of listing the files using ls -a
. Checking the content of these files shows they come from MacOS, probably some indexing thing. Sorry about the false alarm.
It should be with enabled database key
I hadn't caught that, thanks!
You are welcome.
The ._*
files can be excluded in the source section (as stated in the config) so that the gallery ignores these files.
I am trying to import a collection of 50000+ images, however in the process of generating previews, object detection etc. I am getting the following errors:
I noticed that when adding items to the queue to be processed, they are all detected as having a size of 4KB:
Calculating ids for 200 entries with 0.8MB of total size 71.6MB (1.1%)
.However the images are fine and I checked them myself. They all have an appropriate file size (checked using
du -h
) and Iscp
'd them to my laptop (Mac) and I was able to view them perfectly fine.This problem happens with JPG, MOV, MP4, CR2 file formats (all the ones present in my collection). Checking them with
ffprobe
on my laptops shows no warnings or errors.However it does not happen for all files in my collection, as 8216 of them get this problem while all others are processed perfectly. Below you can find one of the files that has this problem. It might also be worth noting that all the files that get this error were imported from my camera on the same day.
Docker compose file:
gallery.config.yml
: