pull/221/head
Varun Patil 2022-11-15 02:39:15 -08:00
parent 220a685bf6
commit 8d6e49da7d
2 changed files with 6 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class VideoSetup extends Command
$ffprobePath = $this->config->getSystemValue('memories.ffprobe_path', 'ffprobe'); $ffprobePath = $this->config->getSystemValue('memories.ffprobe_path', 'ffprobe');
// Get ffmpeg version // Get ffmpeg version
$ffmpeg = shell_exec("$ffmpegPath -version"); $ffmpeg = shell_exec("{$ffmpegPath} -version");
if (false === strpos($ffmpeg, 'ffmpeg version')) { if (false === strpos($ffmpeg, 'ffmpeg version')) {
$ffmpeg = null; $ffmpeg = null;
$output->writeln('<error>ffmpeg is not installed</error>'); $output->writeln('<error>ffmpeg is not installed</error>');
@ -64,7 +64,7 @@ class VideoSetup extends Command
} }
// Get ffprobe version // Get ffprobe version
$ffprobe = shell_exec("$ffprobePath -version"); $ffprobe = shell_exec("{$ffprobePath} -version");
if (false === strpos($ffprobe, 'ffprobe version')) { if (false === strpos($ffprobe, 'ffprobe version')) {
$ffprobe = null; $ffprobe = null;
$output->writeln('<error>ffprobe is not installed</error>'); $output->writeln('<error>ffprobe is not installed</error>');

View File

@ -100,13 +100,15 @@ class VideoController extends ApiBase
// QSV with VAAPI // QSV with VAAPI
$vaapi = $this->config->getSystemValue('memories.qsv', false); $vaapi = $this->config->getSystemValue('memories.qsv', false);
if ($vaapi) $env .= 'VAAPI=1 '; if ($vaapi) {
$env .= 'VAAPI=1 ';
}
// Paths // Paths
$ffmpegPath = $this->config->getSystemValue('memories.ffmpeg_path', 'ffmpeg'); $ffmpegPath = $this->config->getSystemValue('memories.ffmpeg_path', 'ffmpeg');
$ffprobePath = $this->config->getSystemValue('memories.ffprobe_path', 'ffprobe'); $ffprobePath = $this->config->getSystemValue('memories.ffprobe_path', 'ffprobe');
$tmpPath = $this->config->getSystemValue('memories.tmp_path', sys_get_temp_dir()); $tmpPath = $this->config->getSystemValue('memories.tmp_path', sys_get_temp_dir());
$env .= "FFMPEG='$ffmpegPath' FFPROBE='$ffprobePath' GOVOD_TEMPDIR='$tmpPath/go-vod' "; $env .= "FFMPEG='{$ffmpegPath}' FFPROBE='{$ffprobePath}' GOVOD_TEMPDIR='{$tmpPath}/go-vod' ";
// Check if already running // Check if already running
exec("pkill {$transcoder}"); exec("pkill {$transcoder}");