李帅

1.优化ffmpeg命令,适配各种类型视频

......@@ -323,9 +323,13 @@ class AdminMakeImmerse implements ShouldQueue
$error = trim($error0,"\n") . ' '. trim($error1,"\n");
// LogUtil::write(array("cmd:{$cmd}", "errno:{$exitedcode}", "stdout:{$stdout}"), __CLASS__);
// ErrorUtil::triggerErrorMsg($error, $exitedcode);
Log::error("cmd:{$cmd}");
Log::error($error);
Log::error("stdout:{$stdout}");
}
} else {
// return ErrorUtil::triggerErrorMsg('proc_open error');
Log::error('proc_open error');
}
}
......@@ -409,7 +413,7 @@ class AdminMakeImmerse implements ShouldQueue
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
// 'fontcolor=' . $text_color . '@' . $opacity . ':' .
'fontcolor_expr=' . $text_color . '%{eif\\: clip\\(255*\\(1*between\\(t\\, ' . $DE . ' + ' . $FID . '\\, ' . $DE . ' - ' . $FOD . '\\) + \\(\\(t - ' . $DS . '\\)/' . $FID . '\\)*between\\(t\\, ' . $DS . '\\, ' . $DS . ' + ' . $FID . '\\) + \\(-\\(t - ' . $DE . '\\)/' . $FOD . '\\)*between\\(t\\, ' . $DE . ' - ' . $FOD . '\\, ' . $DE . '\\)\\)\\, 0\\, 255\\) \\: x\\: 2 }:' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif: clip(255*(1*between(t, ' . $DE . ' + ' . $FID . ', ' . $DE . ' - ' . $FOD . ') + ((t - ' . $DS . ')/' . $FID . ')*between(t, ' . $DS . ', ' . $DS . ' + ' . $FID . ') + (-(t - ' . $DE . ')/' . $FOD . ')*between(t, ' . $DE . ' - ' . $FOD . ', ' . $DE . ')), 0, 255) : x: 2 }') . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1]) . ':' .
'fix_bounds='. $fix_bounds . ':' .
......