李帅

1.测试一下音频淡出效果

......@@ -68,11 +68,11 @@ class AdminMakeImmerse implements ShouldQueue
if ($is_bgm) {
// 有背景音 融合
$audio = $this->getAbsolutePath($this->getTempPath('.mp3','audio'));
$cmd = $this->ffmpeg . ' -y '.
' -i ' . escapeshellarg($file) .
$cmd = $this->ffmpeg .
' -y -i ' . escapeshellarg($file) .
' -i ' . escapeshellarg($bgm) .
' -filter_complex amix=inputs=2:duration=first:dropout_transition=2[amix];[amix]afade=t=out:st=33:d=5[afade] ' .
' -map[afade] -ar 48000 -ab 64k ' . escapeshellarg($audio);
' -filter_complex amix=inputs=2:duration=first:dropout_transition=2' .
' -ar 48000 -ab 64k ' . escapeshellarg($audio);
if (!$this->execCmd($cmd)) return;
$audio_input = ' -i ' . escapeshellarg($audio);
......@@ -96,7 +96,7 @@ class AdminMakeImmerse implements ShouldQueue
$audio = $this->getAbsolutePath($this->getTempPath('.mp3','audio'));
$cmd = $this->ffmpeg .
' -y -i ' . escapeshellarg($audio_empty) .
' -y -i ' . escapeshellarg($bgm) .
' -i ' . escapeshellarg($bgm) .
' -filter_complex amix=inputs=2:duration=first:dropout_transition=2 ' .
'-ar 48000 -ab 64k ' . escapeshellarg($audio);
if (!$this->execCmd($cmd)) return;
......