avconv required -f image2 not -f mjpeg at least on my server

This commit is contained in:
Mikael Nordfeldth 2015-02-25 01:41:34 +01:00
parent 95b61a5e12
commit ce0b221573
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class VideoThumbnailsPlugin extends Plugin
// Let's save our frame to a temporary file. If we fail, remove it.
$imgPath = tempnam(sys_get_temp_dir(), 'socialthumb-');
$result = exec('avconv -i '.escapeshellarg($file->getPath()).' -vcodec mjpeg -vframes 1 -f mjpeg -an '.escapeshellarg($imgPath));
$result = exec('avconv -i '.escapeshellarg($file->getPath()).' -vcodec mjpeg -vframes 1 -f image2 -an '.escapeshellarg($imgPath));
if (!getimagesize($imgPath)) {
common_debug('exec of "avconv" produced a bad/nonexisting image it seems');