nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
455 stars 57 forks source link

Preview formats no longer sufficient for photo app 2.0.0 #326

Closed markuman closed 1 year ago

markuman commented 1 year ago

nextcloud 25.0.1

/var/www/nextcloud$ sudo -u www-data php occ app:list|grep -E 'photo|preview'
  - photos: 2.0.0
  - previewgenerator: 5.1.1

With the settings mentioned in the README,

sudo -u www-data php occ config:app:set --value="32 64 1024"  previewgenerator squareSizes
sudo -u www-data php occ config:app:set --value="64 128 1024" previewgenerator widthSizes
sudo -u www-data php occ config:app:set --value="64 256 1024" previewgenerator heightSizes

previewgenerator 5.1.1. produces in nextcloud 25.0.1 with photo app 2.0.0 such files

data/appdata_ocn8kt6uce4g/preview/
├── 0
│   ├── 0
│   │   ├── 0
│   │   │   ├── 6
│   │   │   │   └── a
│   │   │   │       └── a
│   │   │   │           └── b
│   │   │   │               └── 18829
│   │   │   │                   ├── 1024-768-max.jpg
│   │   │   │                   ├── 256-192.jpg
│   │   │   │                   ├── 341-256.jpg
│   │   │   │                   ├── 64-48.jpg
│   │   │   │                   ├── 64-64-crop.jpg
│   │   │   │                   ├── 768-768-crop.jpg
│   │   │   │                   └── 85-64.jpg

However, when the photo app is opened, previews are still generatoed on-the-fly which produces a very high CPU load and the entire photoapp/nextcloud becomes unuseable.

When I remove all previews /var/www/nextcloud$ sudo rm -rf data/appdata_ocn8kt6uce4g/preview/,reset everything using /var/www/nextcloud$ sudo -u www-data php occ files:scan-app-data and reopen the photo app in a private tab of a web browser, the following files are produces due the on-the-fly process.

├── 1
│   └── 7
│       └── b
│           └── 6
│               └── 5
│                   └── a
│                       └── f
│                           └── 6326
│                               ├── 1024-1365-max.jpg
│                               ├── 48-64.jpg
│                               └── 768-1024.jpg
markuman commented 1 year ago

The generated previews are still sufficient for the memories app https://github.com/pulsejet/memories
so maybe this is more a photo 2.0 issue