This commit is contained in:
@@ -167,7 +167,7 @@ class Media extends PhpObject {
|
||||
'-print_format json', //output format: json
|
||||
'-i' //input file
|
||||
));
|
||||
exec('ffprobe '.$sParams.' "'.$sMediaPath.'"', $asResult);
|
||||
exec('ffprobe '.$sParams.' '.escapeshellarg($sMediaPath), $asResult);
|
||||
$asExif = json_decode(implode('', $asResult), true);
|
||||
|
||||
//Taken On
|
||||
@@ -269,10 +269,10 @@ class Media extends PhpObject {
|
||||
$sTempPath = self::getMediaPath(uniqid('temp_').'.png');
|
||||
$asResult = array();
|
||||
$sParams = implode(' ', array(
|
||||
'-i "'.$sMediaPath.'"', //input file
|
||||
'-ss 00:00:01.000', //Image taken after x seconds
|
||||
'-vframes 1', //number of video frames to output
|
||||
'"'.$sTempPath.'"', //output file
|
||||
'-i '.escapeshellarg($sMediaPath), //input file
|
||||
'-ss 00:00:01.000', //Image taken after x seconds
|
||||
'-vframes 1', //number of video frames to output
|
||||
escapeshellarg($sTempPath), //output file
|
||||
));
|
||||
exec('ffmpeg '.$sParams, $asResult);
|
||||
|
||||
@@ -296,7 +296,8 @@ class Media extends PhpObject {
|
||||
$sMediaPath = self::getMediaPath($sMediaName);
|
||||
$sMediaMime = mime_content_type($sMediaPath);
|
||||
switch($sMediaMime) {
|
||||
case 'video/quicktime': $sType = 'video'; break;
|
||||
case 'video/quicktime':
|
||||
case 'video/mp4': $sType = 'video'; break;
|
||||
default: $sType = 'image'; break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user