Easier debugging of VideoThumbnails plugin

This commit is contained in:
Mikael Nordfeldth 2016-07-20 22:51:38 +02:00
parent 46c227bf3a
commit fc440ba7e7
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ class VideoThumbnailsPlugin extends Plugin
common_log(LOG_ERR, 'Neither ffmpeg nor avconv was found in your PATH. Cannot create video thumbnail.');
return true;
}
$result = exec($cmd.' -y -i '.escapeshellarg($file->getPath()).' -vcodec mjpeg -vframes 1 -f image2 -an '.escapeshellarg($tmp_imgPath));
$fullcmd = $cmd.' -y -i '.escapeshellarg($file->getPath()).' -vcodec mjpeg -vframes 1 -f image2 -an '.escapeshellarg($tmp_imgPath);
common_debug(__METHOD__ . ' executing: '._ve($fullcmd));
$result = exec($fullcmd);
if (!getimagesize($tmp_imgPath)) {
common_debug('exec of "avconv" produced a bad/nonexisting image it seems');