use avconv instead of ffmpeg
This commit is contained in:
parent
fbedd643f7
commit
2954db165b
|
@ -9,10 +9,10 @@
|
||||||
namespace OC\Preview;
|
namespace OC\Preview;
|
||||||
|
|
||||||
$isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions')));
|
$isShellExecEnabled = !in_array('shell_exec', explode(', ', ini_get('disable_functions')));
|
||||||
$whichFFMPEG = shell_exec('which ffmpeg');
|
$whichAVCONV = shell_exec('which avconv');
|
||||||
$isFFMPEGAvailable = !empty($whichFFMPEG);
|
$isAVCONVAvailable = !empty($whichAVCONV);
|
||||||
|
|
||||||
if($isShellExecEnabled && $isFFMPEGAvailable) {
|
if($isShellExecEnabled && $isAVCONVAvailable) {
|
||||||
|
|
||||||
class Movie extends Provider {
|
class Movie extends Provider {
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ if($isShellExecEnabled && $isFFMPEGAvailable) {
|
||||||
file_put_contents($absPath, $firstmb);
|
file_put_contents($absPath, $firstmb);
|
||||||
|
|
||||||
//$cmd = 'ffmpeg -y -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 -ss 1 -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) . ' ' . $tmpPath;
|
//$cmd = 'ffmpeg -y -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 -ss 1 -s ' . escapeshellarg($maxX) . 'x' . escapeshellarg($maxY) . ' ' . $tmpPath;
|
||||||
$cmd = 'ffmpeg -an -y -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 -ss 1 ' . escapeshellarg($tmpPath);
|
$cmd = 'avconv -an -y -ss 1 -i ' . escapeshellarg($absPath) . ' -f mjpeg -vframes 1 ' . escapeshellarg($tmpPath);
|
||||||
|
|
||||||
shell_exec($cmd);
|
shell_exec($cmd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue