Code Monkey home page Code Monkey logo

Comments (15)

th0rgall avatar th0rgall commented on June 13, 2024 2

Hey @bcutter, as you can read in the posts above, you need to install Imaginary. My understanding is that the preview generator app integrates with Imaginary to generate previews for .HEIC files, once Imaginary is installed.

Imaginary comes as an optional feature with Nextcloud AIO, but if you're running a bare metal setup, you will probably have to install and configure it yourself. Check this blog post which seems to cover your situation: https://okxo.de/speed-up-nextcloud-preview-generation-with-imaginary

from previewgenerator.

th0rgall avatar th0rgall commented on June 13, 2024 1

I want HEIC/.HEIF preview to be automatically generated without opening the configuration for people like me with less coding knowledge.

As @st3iny pointed out above, this is already the default behavior, at least when your Nextcloud setup has Imaginary installed. When you open a .HEIC file via Nextcloud files/photos, it will generate a non-HEIC preview and thumbnails as required for that file.

You created this issue in the repository of the official Nextcloud app "Preview Generator". In my setup, this app was not enabled by default. Without this app, previews also get generated, but the generation happens on-demand: when you view or open a media file. The purpose of this app is to schedule this generation process all at once or at regular intervals, so it can be done ahead of the opening and viewing of media files.

The video or image won’t open up until it’s downloaded on to the device and also there are no thumbnails.

Depending on the configuration and hardware of your Nextcloud server, the on-demand generation process might be (very) slow. What if you keep you window still on some empty thumbnails for several minutes, without scrolling? Do thumbnails still not appear?

It would be helpful if you specify in more detail how you are using Nextcloud:

  • Where is your Nextcloud server hosted? Is it self-hosted or managed by someone else?
  • Are you using the web browser interface, or the mobile app interface? On Android or iOS?

Perhaps your setup doesn't have Imaginary or an alternative enabled, and that's why you're not getting previews.

from previewgenerator.

st3iny avatar st3iny commented on June 13, 2024 1

Regarding the second question: I fear you have to run generate-all again. Old files won't be picked up by pre-generate until they are rewritten. You could narrow it down by providing paths to generate-all.

from previewgenerator.

th0rgall avatar th0rgall commented on June 13, 2024

Do you mean that you don't want previews to be generated for .HEIC/.HEIF media files? Perhaps this is configurable, if not, this is probably a request for such a setting to be added?

from previewgenerator.

st3iny avatar st3iny commented on June 13, 2024

Or is this about generating previews for HEIC files? Because this is already implemented via Imaginary.

from previewgenerator.

myownway888 avatar myownway888 commented on June 13, 2024

It’s about generating the previews, I am not very good at coding and stuff by the way. I was searching online for this and found that there is no direct support (install an app or plugin and good to go kinda stuff). If you guys can help me through I would really appreciate that.

from previewgenerator.

myownway888 avatar myownway888 commented on June 13, 2024

Do you mean that you don't want previews to be generated for .HEIC/.HEIF media files? Perhaps this is configurable, if not, this is probably a request for such a setting to be added?

I want HEIC/.HEIF preview to be automatically generated without opening the configuration for people like me with less coding knowledge. This is a request to add such settings 🙏.

from previewgenerator.

myownway888 avatar myownway888 commented on June 13, 2024

The video or image won’t open up until it’s downloaded on to the device and also there are no thumbnails. Just wanted to make it clear.

from previewgenerator.

bcutter avatar bcutter commented on June 13, 2024

I want to step in and add me to the requirements list. Currently with v27.1.7.2 previews are not shown for untouched HEICs at all - no matter where (web, iOS app etc.). Not even when opening a file, which is a different behavior to the past, where the preview was shown at least once a file was opened (iOS app for example).

HEIC previews not generated at all:

  • at /apps/photos/
    grafik

  • at /apps/files/
    grafik

  • same on the iOS app in the media tab

So now I read previews for HEICs should already work?
Where to check the configuration for that? What to I probably need to install on my bare metal NC server?

As I removed server side encryption (not E2EE) yesterday I finally saw the preview-generator cron job doing its job again and now I want to unlock the full potential - including HEICs please.

from previewgenerator.

bcutter avatar bcutter commented on June 13, 2024

Really interesting article, even I don't like he's framing the preview generator app as "old" - it is working, maintained and supported, isn't it?

Anyway, I took a deeper look at all the stuff needed. And wow, that seems to add a lot of complexity to the preview chain compared the (originally install, configure once and forget about it) preview_generator app looking at https://github.com/h2non/imaginary?tab=readme-ov-file#prerequisites and https://github.com/h2non/imaginary?tab=readme-ov-file#installation. I don't use Docker so I was looking at https://github.com/h2non/imaginary?tab=readme-ov-file#libvips as probably most straight forward way to use on a Raspberry Pi OS (Debian based). Unfortunately running that install script gives

Could not find libvips using a PKG_CONFIG_PATH of ':/usr/local/lib/pkgconfig:/usr/lib/pkgconfig'
Detected Debian Linux 'buster'
Sorry, I don't yet know how to install libvips on Debian-based buster

Even a sudo apt install libvips before (installed libvips42) was working the install script still gives the same result. I was thinking about building libvips from source according to https://www.libvips.org/install.html, but that makes a HELL of needed other stuff including a dev/build environment - and at the end it maybe won't run too.

So for HEIC previews this is my specific requirement situation:

  1. NC preview generation: imaginary REPLACES preview generator app (according to https://okxo.de/speed-up-nextcloud-preview-generation-with-imaginary/)
  2. Imaginary needs libvips (or several other container platforms)
  3. Libvips can not be installed from apt, for building from source several other stuff is needed

Even I will update the OS in the next months (Buster ends LTS in 06/2024) and step 3 would work then with Bullseye, according to the install script https://raw.githubusercontent.com/h2non/bimg/master/preinstall.sh latest Bookworm is not supported (yet). Ah it's a mess. So, ahm... sorry, I think that's all in all a bit too much for "just" having HEIC previews (again). And come on, for an average Nextcloud part-time admin that's way too complicated. It should really be implemented in an app somehow. Install + use out of the box.


My understanding is that the preview generator app integrates with Imaginary

No it doesn't. Imaginary replaces preview generator, see 1. above. It just abuses preview generator app once for generating previews for existing images:

Nextcloud does not use the Preview Generator to generate the previews, but Imaginary.
You can deactivate or delete the preview generator after the build


So, back to business not wasting more admin hours: what's needed to have HEIC preview support in preview generator app?

from previewgenerator.

bcutter avatar bcutter commented on June 13, 2024

Edit: initial HEIC preview generation could be enabled following https://help.nextcloud.com/t/solved-image-previews-only-working-for-heic-photos/164302/8. According to nextcloud/server#28079 it has been disabled by default because of https://hackerone.com/reports/1261413. Manually re-enabling it made HEIC previews to work at all - for live preview generation, which creates quite some load on the server.

Now curious to see if preview generator app can/will render HEIC files too as it has been enabled in config.php.

  • Is there a way to synthetically test if preview generator app actually creates HEIC image previews now?
  • Therefore: is there a need to re-generate previews for all existing images now?

from previewgenerator.

st3iny avatar st3iny commented on June 13, 2024

All steps required to enable preview generation for HEIC/HEIF are documented here: https://docs.nextcloud.com/server/stable/admin_manual/installation/server_tuning.html#previews
Please note the big orange warning box about extra steps that are required to enable HEIC previews.

I'll close the issue as this is not related to the previewgenerator app.

Compiling Imaginary from source or using it directly is discouraged. We provide an up-to-date docker image at docker.io/nextcloud/aio-imaginary:latest. Unfortunately, the official project and docker image seem unmaintained at the moment.

from previewgenerator.

bcutter avatar bcutter commented on June 13, 2024

Initial support already described in my previous post. Open questions (as I still doubt preview generation with this project works for HEIC):

Is there a way to synthetically test if preview generator app actually creates HEIC image previews now?
Therefore: is there a need to re-generate previews for all existing images now?

from previewgenerator.

st3iny avatar st3iny commented on June 13, 2024

You can upload a new photo, run pre-generate and check if there is a preview in your browser.

from previewgenerator.

bcutter avatar bcutter commented on June 13, 2024

You can upload a new photo, run pre-generate and check if there is a preview in your browser.

Don't know how to do that silently (because every client no matter if iOS or Windows) triggers live preview generation on upload. Probably I'd need to upload it to the server in the backend, do a files re-scan, run pregenerate.

from previewgenerator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.