35 "video/3pgg" => array(
39 "video/x-flv" => array(
46 "parameters" =>
"-vcodec libx264 -strict experimental -acodec aac -sameq -ab 56k -ar 48000",
49 "video/webm" => array(
52 "parameters" =>
"-strict experimental -vcodec libvpx -acodec vorbis -ac 2 -sameq -ab 56k -ar 48000",
63 if (defined(
"PATH_TO_FFMPEG") && PATH_TO_FFMPEG !=
"") {
76 if (
$f[
"target"] ==
true) {
90 if (
$f[
"source"] ==
true) {
115 return PATH_TO_FFMPEG;
121 public static function exec(
string $args): array
131 return self::$last_return;
146 string $a_target_filename,
147 string $a_target_dir =
"",
150 $spi = pathinfo($a_file);
153 $target_dir = ($a_target_dir !=
"")
157 $target_file = $target_dir .
"/" . $a_target_filename;
163 $ret = self::exec($cmd .
" 2>&1");
164 self::$last_return = $ret;
166 if (is_file($target_file)) {
169 throw new ilFFmpegException(
"It was not possible to extract an image from " . basename($a_file) .
".");
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static array $last_return
static getTargetMimeTypes()
Get desired target mime types.
static getCmd()
Get ffmpeg command.
static enabled()
Checks, whether FFmpeg support is enabled (path is set in the setup)
static getLastReturnValues()
Get last return values.
static extractImage(string $a_file, string $a_target_filename, string $a_target_dir="", int $a_sec=1)
Extract image from video file.
static exec(string $args)
Execute ffmpeg.
static getSourceMimeTypes()
static supportsImageExtraction(string $a_mime)
Check if mime type supports image extraction.
static escapeShellArg(string $a_arg)
static execQuoted(string $cmd, ?string $args=null)
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...