Closed MetallicAchu closed 5 months ago
I have the same issue, the files i have the problem on got compressed with
ffmpeg -i file -crf 35 output-file
I'm sure, the problem occurs when you change the type of the video or the data of the video, and when the task to preview try to get them, it doesn't know how to do this
I have the same issue. Nextcloud 21.0.3 on Ubuntu 20.04. I followed this instruction and looked around the internet and the system to find out why video thumbnails are not generated. Of cause I added the informations to the config.php.
For me the function of thumbnails is really important. So is there any way to find out why it's not working?
Best regards, Stefan
I found out that the issue comes from the snap installation method I`ve choosen. Snap is a paket manager, that "containerizes" the installation, so that standard unix tools could not simply use (as ffmpeg as example). So I switched to standard installation process with the default paket manager and video thumbnails worked find (as long as local storage is used and not s3 as default storage....)
Having the same problem without using snap installation.
Having the same problem without using snap installation.
It has been fixed, try updating to the newest version of Nextcloud
@MetallicAchu @rarealphacat Does the path or filename of your videos contain special chars (non ASCII)? If so, this is already fixed. Updating your Nextcloud server to a newer version should resolve the issue. See https://github.com/nextcloud/previewgenerator/issues/278 and https://github.com/nextcloud/server/issues/29296.
@st3iny I just upgrade Nextcloud to 23.0.2 but still no thumbnails showing up and I have ffmpeg installed. Video thumbnails used to work in version 21. Here's my config
'enable_previews' => true, 'preview_max_x' => 800, 'preview_max_y' => 600, 'enabledPreviewProviders' => array ( 0 => 'OC\Preview\IMAGE', 1 => 'OC\Preview\MOVIE', 2 => 'OC\Preview\GIF', 3 => 'OC\Preview\BMP', 4 => 'OC\Preview\XBitmap', 5 => 'OC\Preview\MP3', 6 => 'OC\Preview\TXT', 7 => 'OC\Preview\MarkDown', 8 => 'OC\Preview\OpenDocument', 9 => 'OC\Preview\PDF', 10 => 'OC\Preview\MP4', 11 => 'OC\Preview\MOV', 12 => 'OC\Preview\MKV', 13 => 'OC\Preview\HEIC', 14 => 'OC\Preview\JPEG', 15 => 'OC\Preview\PNG', 16 => 'OC\Preview\AVI', ),
Thumbnail generation success after changing MOVIE to Movie. *Note that it worked on NextCloud version 21 and before, only stopped working on 22 and beyond.
I have Nextcloud docker installed and I'm able to generate video thumbnails through the following process: of course make sure that you have the preview generator app installed and enabled.
** First I get into the docker container:
docker exec -it nextcloud /bin/bash
** Then update and install ffmpeg and imagemagick
apt update; apt upgrade -y; apt install imagemagick -y; apt install ffmpeg -y
Make sure, as mentioned above, that you have edited your Nextcloud config.php file to include the following:
NOTE: AFTER INSTALLING FFMPEG YOU CAN FIND IT'S LOCATION WITH:
whereis ffmpeg
'ffmpeg' => '/usr/bin/ffmpeg',
'enable_previews' => true,
'enabledPreviewProviders' =>
array (
0 => 'OC\\Preview\\PNG',
1 => 'OC\\Preview\\JPEG',
2 => 'OC\\Preview\\GIF',
3 => 'OC\\Preview\\BMP',
4 => 'OC\\Preview\\XBitmap',
5 => 'OC\\Preview\\Movie',
6 => 'OC\\Preview\\PDF',
7 => 'OC\\Preview\\MP3',
8 => 'OC\\Preview\\TXT',
9 => 'OC\\Preview\\MarkDown',
10 => 'OC\\Preview\\MP4',
),
** Last generate the thumbnails with the following code from the README file:
-To generate all of them:
docker exec --user www-data nextcloud php occ preview:generate-all
-To generate only new ones from then last time one of the commands was run:
docker exec --user www-data nextcloud php occ preview:pre-generate
** Make sure to reload cron service if you decide to add in the occ preview:pre-generate command there:
sudo service cron reload
At least with docker I need to go through some of these steps again when a new version is released as they are not included by default in the Nextcloud docker image.
Hope this can help someone.
Note: after posting I found that after completing the above instructions clearing the cache on the iOS Nextcloud app itself may additionally be required for the video thumbnails to begin showing up.
@st3iny I just upgrade Nextcloud to 23.0.2 but still no thumbnails showing up and I have ffmpeg installed. Video thumbnails used to work in version 21. Here's my config
'enable_previews' => true, 'preview_max_x' => 800, 'preview_max_y' => 600, 'enabledPreviewProviders' => array ( 0 => 'OC\Preview\IMAGE', 1 => 'OC\Preview\MOVIE', 2 => 'OC\Preview\GIF', 3 => 'OC\Preview\BMP', 4 => 'OC\Preview\XBitmap', 5 => 'OC\Preview\MP3', 6 => 'OC\Preview\TXT', 7 => 'OC\Preview\MarkDown', 8 => 'OC\Preview\OpenDocument', 9 => 'OC\Preview\PDF', 10 => 'OC\Preview\MP4', 11 => 'OC\Preview\MOV', 12 => 'OC\Preview\MKV', 13 => 'OC\Preview\HEIC', 14 => 'OC\Preview\JPEG', 15 => 'OC\Preview\PNG', 16 => 'OC\Preview\AVI', ),
I met the same problem after upgraded nextcloud yesterday ! I am using NextCloud23.03 with php8 and ffmpeg installed.
how to add this at docker compose file so that every time that i recreate conteiner these ( apt update; apt upgrade -y; apt install imagemagick -y; apt install ffmpeg -y) intalls automatically ? I tried to google but my problem is that I can't write what precisely because I'm quite new to linux and docker. for this reason I would also need a link or a tip on what I could write in the search bar of google XD
how to add this at docker compose file so that every time that i recreate conteiner these ( apt update; apt upgrade -y; apt install imagemagick -y; apt install ffmpeg -y) intalls automatically ? I tried to google but my problem is that I can't write what precisely because I'm quite new to linux and docker. for this reason I would also need a link or a tip on what I could write in the search bar of google XD
You could derive your own docker image from the official ones. But that would still require manual maintenance because you would have to update your image each time the official image is updated.
FROM nextcloud:25
RUN apt-get update && apt-get install -y imagemagick ffmpeg && rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
I have Nextcloud docker installed and I'm able to generate video thumbnails through the following process: of course make sure that you have the preview generator app installed and enabled.
** First I get into the docker container:
docker exec -it nextcloud /bin/bash
** Then update and install ffmpeg and imagemagick
apt update; apt upgrade -y; apt install imagemagick -y; apt install ffmpeg -y
Make sure, as mentioned above, that you have edited your Nextcloud config.php file to include the following: NOTE: AFTER INSTALLING FFMPEG YOU CAN FIND IT'S LOCATION WITH:
whereis ffmpeg
'ffmpeg' => '/usr/bin/ffmpeg', 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\PNG', 1 => 'OC\\Preview\\JPEG', 2 => 'OC\\Preview\\GIF', 3 => 'OC\\Preview\\BMP', 4 => 'OC\\Preview\\XBitmap', 5 => 'OC\\Preview\\Movie', 6 => 'OC\\Preview\\PDF', 7 => 'OC\\Preview\\MP3', 8 => 'OC\\Preview\\TXT', 9 => 'OC\\Preview\\MarkDown', 10 => 'OC\\Preview\\MP4', ),
** Last generate the thumbnails with the following code from the README file:
-To generate all of them:
docker exec --user www-data nextcloud php occ preview:generate-all
-To generate only new ones from then last time one of the commands was run:
docker exec --user www-data nextcloud php occ preview:pre-generate
** Make sure to reload cron service if you decide to add in the occ preview:pre-generate command there:
sudo service cron reload
At least with docker I need to go through some of these steps again when a new version is released as they are not included by default in the Nextcloud docker image.
Hope this can help someone.
Note: after posting I found that after completing the above instructions clearing the cache on the iOS Nextcloud app itself may additionally be required for the video thumbnails to begin showing up.
For anyone still searching, this did it for me. Direct install (Not Docker) Version 25.0.1. I had several .mov files that were not getting the previews generated. .I made the following changes to my config.php per the attached direction:
ffmpeg' => '/usr/bin/ffmpeg',
'OC\\Preview\\MOV',
The relevant part of my Config.php reads:
'preview_max_x' => '2048', 'preview_max_y' => '2048', 'jpeg_quality' => '60', 'ffmpeg' => '/usr/bin/ffmpeg', 'enable_previews' => true, 'enabledPreviewProviders' => array ( 0 => 'OC\Preview\TXT', 1 => 'OC\Preview\MarkDown', 2 => 'OC\Preview\PDF', 3 => 'OC\Preview\Image', 4 => 'OC\Preview\Photoshop', 5 => 'OC\Preview\TIFF', 6 => 'OC\Preview\SVG', 7 => 'OC\Preview\Font', 8 => 'OC\Preview\MP3', 9 => 'OC\Preview\Movie', 10 => 'OC\Preview\MKV', 11 => 'OC\Preview\MP4', 12 => 'OC\Preview\AVI', 13 => 'OC\Preview\MOV', ),
I'm closing this issue as it is not directly related to the previewgenerator app and has been solved by properly installing ffmpeg.
Note that we cannot provide support for the snap package. Please talk to the maintainers of the Nextcloud snap package about potential issues.
Hi,
I'm fairly new to NextCloud and I'm currently struggling with generating video thumbnails for my gallery. I tried Googling and looking through the issues but couldn't find anything that works. This might not be an issue specifically related to the Preview Generator app, but I'll try anyways.
I'm using Ubuntu 20, log is not showing any problems when I browse or run Preview Generator. I have ffmpeg installed, and while using the web user I can run ffmpeg: https://snipboard.io/kiN4ug.jpg
I added the Env[PATH] to php config but I'm not sure how to test it.
This is my gallery, as you can see no video thumbnails are loading: https://snipboard.io/k57gNj.jpg Also this is the demo video: https://snipboard.io/rGHJq7.jpg When running Preview Generator, I can't see any video files in the verbose.
Config file:
'enable_previews' => true, 'enabledPreviewProviders' => array( 'OC\Preview\PNG', 'OC\Preview\JPEG', 'OC\Preview\GIF', 'OC\Preview\HEIC', 'OC\Preview\Movie', 'OC\Preview\MOV', 'OC\Preview\MKV', 'OC\Preview\MP4', 'OC\Preview\AVI', 'OC\Preview\BMP', 'OC\Preview\XBitmap', 'OC\Preview\MP3', 'OC\Preview\TXT', 'OC\Preview\MarkDown' ),
I even tried this because I though that something's wrong with my syntax:
'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\TXT', 1 => 'OC\\Preview\\Image', 2 => 'OC\\Preview\\Movie', 3 => 'OC\\Preview\\MKV', 4 => 'OC\\Preview\\MP4', 5 => 'OC\\Preview\\AVI', 6 => 'OC\\Preview\\MOV', ),
Any help or guidelines on what to check next would be greatly appriciated!
Thanks