avconv required -f image2 not -f mjpeg at least on my server
This commit is contained in:
parent
95b61a5e12
commit
ce0b221573
|
@ -58,7 +58,7 @@ class VideoThumbnailsPlugin extends Plugin
|
||||||
// Let's save our frame to a temporary file. If we fail, remove it.
|
// Let's save our frame to a temporary file. If we fail, remove it.
|
||||||
$imgPath = tempnam(sys_get_temp_dir(), 'socialthumb-');
|
$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)) {
|
if (!getimagesize($imgPath)) {
|
||||||
common_debug('exec of "avconv" produced a bad/nonexisting image it seems');
|
common_debug('exec of "avconv" produced a bad/nonexisting image it seems');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user