李帅

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

......@@ -403,13 +403,14 @@ class AdminMakeImmerse implements ShouldQueue
if ($this->media_info['format']['duration'] > 3 * count($contents)) $FID = $FOD = 1.5;
$round = round($this->media_info['format']['duration'] / count($contents),1);
$sub_text = '';
foreach ($contents as $key => $content){
$text_color = substr($text_color,1,strlen($text_color));
$DS = $key * $round;
$DE = $DS + $round;
$text_file = $this->getAbsolutePath($this->getTempPath('.txt','text'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
$sub_text .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
......@@ -421,6 +422,8 @@ class AdminMakeImmerse implements ShouldQueue
'box=1:boxborderw='. $text_bg_box . ':' .
'boxcolor=' . $text_bg_color . '@' . $opacity . '", ';
}
$drawtext .= $sub_text;
}
break;
case 'weather':
......