Preview thumbs for mp4 not generated with PHP 8.0 and non-latin path

Nextcloud version: 22.2.3
Operating system and version: Debian 10
Apache or nginx version: nginx/1.18.0
PHP version: PHP-fpm 8.0

Sorry for my English.
Preview thumbs for mp4 not generated with PHP 8.0 and non-latin path to mp4 files.
With PHP 7.4 all ok.

error log:

Movie preview generation failed Output: ["ffmpeg version 4.3.3-0+deb11u1 Copyright (c) 2000-2021 the FFmpeg developers"," built with gcc 10 (Debian 10.2.1-6)"," configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu --arch=i386 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --ignore-tests='hapenc-hap-none,hapenc-hapa-none,hapenc-hapq-none' --enable-shared"," libavutil 56. 51.100 / 56. 51.100"," libavcodec 58. 91.100 / 58. 91.100"," libavformat 58. 45.100 / 58. 45.100"," libavdevice 58. 10.100 / 58. 10.100"," libavfilter 7. 85.100 / 7. 85.100"," libavresample 4. 0. 0 / 4. 0. 0"," libswscale 5. 7.100 / 5. 7.100"," libswresample 3. 7.100 / 3. 7.100"," libpostproc 55. 7.100 / 55. 7.100","/var/files/nextcloud/Siava/files// /2021/11/VID_20211122_185857.mp4: No such file or directory"]

The correct path to file VID_20211122_185857.mp4 is:
/var/files/nextcloud/Siava/files/Автозагрузка/Мои фото/2021/11/VID_20211122_185857.mp4

Is it Nextcloud problem or my server software?

The same happens in my case. Also there is another topic on forum with the same problem.
Have you find any solutions?

1 Like

I found problem in lib/private/Preview/Movie.php

for non-latin path makes path wrong (strips characters).

Adding this string to config.php helps me:
setlocale(LC_CTYPE, "ru_RU.UTF-8");

Then this is a problem of my server… maybe setting the locale will helps.

1 Like

Thanks much!
The solution works for me too.

This line was auto-deleted from config.php few time after…
So I added this after beginning of
private function generateThumbNail($maxX, $maxY, $absPath, $second): ?IImage {
in lib/private/Preview/Movie.php

1 Like

Thanks much.

That solution also worked even after rebooting. Unfortunately, the error continues in the logging, but at least preview works.