nextcloud / previewgenerator

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

Can't generate thumbnails for video and office files #371

Closed Mars160 closed 3 months ago

Mars160 commented 1 year ago

This is part of my config.php image

I'm running nextcloud using php-fpm behind Nginx. The user who runs nextcloud is nextcloud:nextcloud. And the nextcloud user can excute ffmpeg. image

No error log found. When I excute 'occ preview:generate-all -vvv', it will stop and generate thumbnails for PDF, JPG and TXT but MP4, MKV.

APP Version
Nextcloud 26.0.0
PreviewGenerator 5.2.2
FFmpeg 6.0
PHP 8.1.17
php-imagick 3.7.0
imagemagick 7.1.1.5

Can you help me?

image

hdlineage commented 1 year ago

you dont have MKV or MP4 in your "enablepreviewproviders"

st3iny commented 1 year ago

Thanks Teemo :D

I suppose this issue has been resolved?

Mars160 commented 1 year ago

Actually, no This is the preview folder. There is no thumbnails for the MP4 file.

image

st3iny commented 1 year ago

@Mars160 Did you apply the workaround proposed by @hdlineage?

Mars160 commented 1 year ago

@st3iny Yeah, I added both MP4 and MKV in config.php image

Mars160 commented 11 months ago

It looks like it didn't follow my config.php file to generate thumbnails. It only generate thumbnails for the default types

joshtrichards commented 3 months ago

@Mars160

OC\Preview\Movie will handle the preview generation for all files with video/* mime types.

However, you may need to set the path for ffmpeg in some environments:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#preview-ffmpeg-path

If Nextcloud doesn't find the ffmpeg binary on its own, it disables the movie preview parameter (since it can't generate them).

Mars160 commented 3 months ago

@Mars160

OC\Preview\Movie will handle the preview generation for all files with video/* mime types.

However, you may need to set the path for ffmpeg in some environments:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#preview-ffmpeg-path

If Nextcloud doesn't find the ffmpeg binary on its own, it disables the movie preview parameter (since it can't generate them).

Thanks for your kind reply.

I reinstalled the whole environment and nextcloud. This issue is finished. I don't know what was changed but the problem is solved