Clarity on the crontab settings for the preview generator app


#21

Hmm looks like the app/commands are not registered properly.

Did you successfully activate the app in the web interface? Also I would recommend to use the app store to install the app, which can be found in the “Multimedia” category.


#22

Ahh, that was my mistake. I didn´t aktivate it in the app-store.
Thanks for you tip.


#23

Well, well, well, after let it run all the night, i got now a folder /data/appdata_xxxxxxxx/preview/ (3,2 Gb) with 60224 files under 4280 directories…

BUT, when i (or one of my user) launch the Gallery app. thumbnails are still again generated in the /data/user/thumbnails/ directory for each user…

I really don’t understand the purpose of this preview generator if the behaviour is not changed. Gallery app should read directly the new /data/appdata_xxxxxxxx/preview/ directory and not generate again & again thumbnails in a specific directory for each user…

Must we symlink all these folders ? Things are really not clear… :disappointed:


#24

It’s about the previews that you see, when you just browse your files with the standard nc files app. The gallery app uses way bigger thumbnails ;).

But I would also love to see this features combined. Maybe use the preview generator to also create bigger thumbs that can be used by the gallery app and also for the large preview the files app gives on the right bar, when you see “details” of an image file.


#25

So next update then @rullzer needs to add gallery thumbnail generation :grin:


#26

So it seems I also need to update the Gallery App. I’ll look into that soonish. Basically the GalleryApp kind of did its own preview handling. But there is no reason why we can’t change this to use the new stuff.


#27

Fixed that for you :grin:


#28

Ok so I fixed the gallery app see pr. But I’m afraid you’ll have to wait till NC12 before you can use it.


#29

:heart_eyes:

Cannot wait :slight_smile: Thanks @rullzer!


#30

Thank you very much. I can’t wait either and will edit the files manually :smiley: .

€: Ahahahah this is sooo nice. Suddenly the previews jump up as popcorn. This is sooo a huge benefit for slow systems (e.g. my little Pi2), unbelievable :heart_eyes: !! Thank you very much for this and the preview generator @rullzer

Did I understand right that /data/user/thumbnails/ can be deleted now?


#31

How did you update your server? I figured if I tried to pull in the files it’d flag up as failing the mdhash


#32

I manually changed the lines of the files according to the pull request: https://github.com/nextcloud/gallery/pull/187/files
Deleted the red lines and added the green ones ;).

I didn’t found a possibility to download the files with the pull request already merged, so leafpad or nano has to do the job :stuck_out_tongue: .

The files in /tests/ do not exist in the end user app, I was confused first little bit.


#33

No warnings in admin? Feels like if I breathe at the server too hard it’ll fail an integrity check sometimes :stuck_out_tongue:


#34

Ah yes of course you will get integrity check errors to ignore. Might be little annoying cause there will be some message about it at the top all the time. But everything will still working, nothing to fear there.


#35

wget https://github.com/nextcloud/gallery/archive/master.zip with pull request about iPreviews merged :slight_smile:

By the way: integrity check is removed now!?


#36

Is it @MichaIng? I hadn’t noticed.
@rullzer @nickvergessen


#37

nothing more to do than loading the app, renameing and enableing?
or run pre-gen.
could you please give a quick summary like:

  1. wget
  2. enable “new” gal.-app
  3. run pre gen

I did:

  1. download and enable gallery and pre-gen - apps from git
  2. sudo -u www-data /var/www/nextcloud php occ preview-generate-all
  3. wait
  4. sudo crontab -u www-data -e and paste

@hourly php -f /var/www/nextcloud/occ preview:pre-generate > /home/NextcloudUser/preview.log

does it fit?
thx in advance, carsten


#38

Hi there,
1st of all, thanks for your work.
I’m using the occ preview generator command.
I’ve also “updagre” the gallery app directly from github, so I’m actually using the new shared preview infrasctructure (folder owncloud/data/appdata_<identificator>/preview).

BUT I’m seeing that when I get a big preview of a photo the gallery app STILL generate a new file.
I think the problem that te “occ preview:(generate-all|pre-generate)” command is generating the thumbnails with the following names:

/home/owncloud/data/appdata_<appid>/preview/5382
[root@ciberterminal 5382]# ll
total 812
-rw-r--r-- 1 apache apache 136172 Jan  4 21:05 1024-1365.png
-rw-r--r-- 1 apache apache   3630 Jan  4 21:05 128-171.png
-rw-r--r-- 1 apache apache 241146 Jan  4 21:05 1440-1920-max.png
-rw-r--r-- 1 apache apache 241152 Jan 13 10:02 1440-1920.png         <= this is a new one generated by gallery.app
-rw-r--r-- 1 apache apache   6639 Jan  4 21:05 192-256.png
-rw-r--r-- 1 apache apache    879 Jan  4 21:05 24-32.png
-rw-r--r-- 1 apache apache  11225 Jan  4 21:05 256-341.png
-rw-r--r-- 1 apache apache    906 Jan  4 21:05 32-32-crop.png
-rw-r--r-- 1 apache apache   1002 Jan  4 21:05 32-43.png
-rw-r--r-- 1 apache apache  24524 Jan  4 21:05 384-512.png
-rw-r--r-- 1 apache apache   1272 Jan  4 21:05 48-64.png
-rw-r--r-- 1 apache apache  42710 Jan  4 21:05 512-683.png
-rw-r--r-- 1 apache apache   1391 Jan  4 21:05 64-64-crop.png
-rw-r--r-- 1 apache apache   1620 Jan  4 21:05 64-85.png
-rw-r--r-- 1 apache apache  85482 Jan  4 21:05 768-1024.png
-rw-r--r-- 1 apache apache   2504 Jan  4 21:05 96-128.png

So is gallery.app is not using “1440-1920-max.png” pre-generated file, it generates a new “1440-1920.png” which is the same as the pre-generated.

My config.php settings include:

      'preview_max_x' => 1920,
      'preview_max_y' => 1920,

I’ll try to make a trick (symlink) to see if it works and gallery doesn’t generate new thumbs.

Cheers


#39

I’ve symlink’ed all the “max” files to the name gallery app uses and it works:

cd /owncloud/data/appdata_<instanceid>/preview
for i in $(find . -name "*-max.png") ; do [[ ! -f $(dirname $i)/$(basename ${i} -max.png).png ]] && ln -s $(dirname `readlink -e ${i}`)/$(basename $i) $(dirname `readlink -e $i`)/$(basename ${i} -max.png).png ; done

#41

That would be a bad idea until the bugs are not fixed @rullzer!
That could freeze your box :frowning:

The app does not log the filename in case of error, cannot generate a preview of mp3 without cover and stucks on certain PDF files.

Bug list (for the moment, i’m still debugging)