mfgpi wrote:
I wonder if problem is in file function_sync.php (I am not familiar with php)
if ($sync_options['poster'] or $sync_options['thumb'])
{
$retval = execCMD("ffmpeg -version 2>&1"); // Does it work?
if (($retval != 0))
{
$warnings[] = "Poster creation disable because ffmpeg is not installed on the system, eg: '/usr/bin/ffmpeg'.";
$sync_options['poster'] = false;
$sync_options['thumb'] = false;
}
}
that works on linux
Offline
Edit: Fully resolved. TLDR: github has wrong config variable for ffmpeg, and it would seem mp4's created by my phone are not compatible. Re-encoding the videos before uploading works.
Not working for me with version 15.d
Both ffprobe and ffmpeg throw similar errors.
From the logs:
[2024-12-13 16:03:10] [DEBUG] exec(/home/sickifyn/public_html/piwigo/plugins/ffprobe -version 2>&1 >/dev/null) returns "", retval: 0 [2024-12-13 16:03:10] [DEBUG] exec(ffmpeg -version 2>&1 >/dev/null) returns "sh: ffmpeg: command not found", retval: 127
Here is the command executed from a terminal:
[sickifyn@lax008 plugins]$ /home/sickifyn/public_html/piwigo/plugins/ffprobe -version ffprobe version 6.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2007-2023 the FFmpeg developers built with gcc 8 (Debian 8.3.0-6) configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 58. 29.100 / 58. 29.100 libavcodec 60. 31.102 / 60. 31.102 libavformat 60. 16.100 / 60. 16.100 libavdevice 60. 3.100 / 60. 3.100 libavfilter 9. 12.100 / 9. 12.100 libswscale 7. 5.100 / 7. 5.100 libswresample 4. 12.100 / 4. 12.100 libpostproc 57. 3.100 / 57. 3.100
Okay, I fixed the ffmpeg errors, I was using '$conf['vjs_ffmpeg_dir']' in my config as per github, I changed that to '$conf['ffmpeg_dir']'
And its almost sort of working now, except it fails to create the preview image.
[2024-12-13 18:38:53] [DEBUG] exec(/home/sickifyn/public_html/piwigo/plugins/Image-ExifTool-13.07/exiftool -ver 2>&1 >/dev/null) returns "", retval: 0 [2024-12-13 18:38:53] [DEBUG] exec(/home/sickifyn/public_html/piwigo/plugins/ffprobe -version 2>&1 >/dev/null) returns "", retval: 0 [2024-12-13 18:38:53] [DEBUG] exec(/home/sickifyn/public_html/piwigo/plugins/ffmpeg -version 2>&1 >/dev/null) returns "", retval: 0 [2024-12-13 18:38:53] [DEBUG] exec(mediainfo --Version 2>&1 >/dev/null) returns "sh: mediainfo: command not found", retval: 127 [2024-12-13 18:38:53] [DEBUG] ERROR: Calling mediainfo did fail. [2024-12-13 18:38:53] [DEBUG] sync: $filename = ./upload/2024/12/12/20241212160221-5c36f904.mp4 [2024-12-13 18:38:53] [DEBUG] exiftool: duration of 19.6506 seconds [2024-12-13 18:38:53] [DEBUG] exiftool: date creation is 2024:10:09 01:53:19 [2024-12-13 18:38:54] [DEBUG] sync: $out = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.jpg [2024-12-13 18:38:54] [DEBUG] exec(/home/sickifyn/public_html/piwigo/plugins/ffmpeg -ss 4 -i "./upload/2024/12/12/20241212160221-5c36f904.mp4" -vcodec mjpeg -vframes 1 -an -f rawvideo -y "./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.jpg") returns "", retval: 244 [2024-12-13 18:38:54] [DEBUG] sync: $ilcfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.jpg [2024-12-13 18:38:54] [DEBUG] sync: $query = UPDATE images SET representative_ext = 'jpg' WHERE id = 2197; [2024-12-13 18:38:54] [DEBUG] sync: $iucfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.JPG [2024-12-13 18:38:54] [DEBUG] sync: $ilcfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.jpeg [2024-12-13 18:38:54] [DEBUG] sync: $iucfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.JPEG [2024-12-13 18:38:54] [DEBUG] sync: $ilcfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.png [2024-12-13 18:38:54] [DEBUG] sync: $iucfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.PNG [2024-12-13 18:38:54] [DEBUG] sync: $ilcfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.gif [2024-12-13 18:38:54] [DEBUG] sync: $iucfile = ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.GIF [2024-12-13 18:38:54] [DEBUG] sync: adopt poster ./upload/2024/12/12/pwg_representative/20241212160221-5c36f904.jpg
I do not have MediaInfo installed, i'm using exiftool. Interestingly, there appears to be no metadata when viewing in the gallery either. I'm also not able to playback the video's, "No video with supported format or MIME type found". The video's are MP4's from my Pixel 9 phone.
Last edited by Sickify (2024-12-13 19:56:09)
Offline
Thanks, I created a pull request https://github.com/Piwigo/piwigo-videojs/pull/240
Offline