Skip to main content

Things I had to do for Video Preview

Install ffmpeg
apt install ffmpeg -y

Find out what your path is:

what ffmpeg
Install imagick
apt install php8.3-imagick -y
Update config

Wherever your ffmpeg was installed, update the config with your path, and then enable previews for the things

'preview_ffmpeg_path' => '/usr/bin/ffmpeg',
'enable_preview' => 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\\MP3',
  6 => 'OC\\Preview\\TXT',
  7 => 'OC\\Preview\\MarkDown',
  8 => 'OC\\Preview\\OpenDocument',
  9 => 'OC\\Preview\\Krita',
  10 => 'OC\\Preview\\HEIC',
  11 => 'OC\\Preview\\MP4',
  12 => 'OC\\Preview\\Movie', // Added this line
),
Reboot it all

However you wanna reboot, I just reboot the whole LXC

Regenerate previews

In the LXC console

sudo -u www-data php /var/www/nextcloud/occ preview:clear
sudo -u www-data php /var/www/nextcloud/occ preview:generate-all -vvv

If either of the commands above fail, install posix:

apt install php8.3-posix -y