李帅

1.修复一些bug

......@@ -60,7 +60,6 @@ class AdminMakeImmerse implements ShouldQueue
// 组装文字参数
$drawtext = $this->getTextContentString();
echo $drawtext;
// 判断双轨 没有则制作空轨
$is_bgm = $this->adminMakeVideo->temp->bg_music == 1; //是否手动上传背景音
......@@ -278,7 +277,6 @@ class AdminMakeImmerse implements ShouldQueue
];
break;
}
try{
$FID = $FOD = floatval($component->fade_time / 1000);
$round = round($this->media_info['format']['duration'] / count($contents),1);
if ($round < 1) $round = 1;
......@@ -310,7 +308,7 @@ class AdminMakeImmerse implements ShouldQueue
'fontsize=' . $font_size / 2 . ':' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif\\\\: clip(255*(1*between(t\\, ' . $DS . ' + ' . $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['midMiddle'][0]) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] + $font_size) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] . '+' . $font_size) . ':' .
'", ';
}elseif($content['tag'] == 'source'){
$arr = explode("\n", $content['text']);
......@@ -336,7 +334,7 @@ class AdminMakeImmerse implements ShouldQueue
'fontsize=' . $font_size / 2 . ':' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif\\\\: clip(255*(1*between(t\\, ' . $DS . ' + ' . $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] + $font_size) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] . '+' . $font_size) . ':' .
'", ';
}else{
$text_file = $this->getAbsolutePath($this->getTempPath('.txt','text'));
......@@ -351,10 +349,6 @@ class AdminMakeImmerse implements ShouldQueue
'", ';
}
}
}catch (\Exception $exception){
echo $exception->getMessage();
echo $exception->getLine();
}
$drawtext .= $sub_text;
}
......
......@@ -591,7 +591,8 @@ class UserMakeImmerse implements ShouldQueue
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $font_size . ':' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif\\\\: clip(255*(1*between(t\\, ' . $DS . ' + ' . $FID . '\\, ' . $DE . ' - ' . $FOD . ') + ((t - ' . $DS . ')/' . $FID . ')*between(t\\, ' . $DS . '\\, ' . $DS . ' + ' . $FID . ') + (-(t - ' . $DE . ')/' . $FOD . ')*between(t\\, ' . $DE . ' - ' . $FOD . '\\, ' . $DE . '))\\, 0\\, 255) \\\\: x\\\\: 2 }') . ':' .
'x=(w-text_w)/2:y=(h-text_h)/2' . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1]) . ':' .
'", ';
// 作者
$text_file = Storage::disk('public')->path($this->getTempPath('.txt','text'));
......@@ -601,7 +602,8 @@ class UserMakeImmerse implements ShouldQueue
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $font_size / 2 . ':' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif\\\\: clip(255*(1*between(t\\, ' . $DS . ' + ' . $FID . '\\, ' . $DE . ' - ' . $FOD . ') + ((t - ' . $DS . ')/' . $FID . ')*between(t\\, ' . $DS . '\\, ' . $DS . ' + ' . $FID . ') + (-(t - ' . $DE . ')/' . $FOD . ')*between(t\\, ' . $DE . ' - ' . $FOD . '\\, ' . $DE . '))\\, 0\\, 255) \\\\: x\\\\: 2 }') . ':' .
'x=(w-text_w)/2:y=(h-text_h)/2+' . $font_size . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] . '+' . $font_size) . ':' .
'", ';
}elseif($content['tag'] == 'source'){
$arr = explode("\n", $content['text']);
......@@ -627,7 +629,7 @@ class UserMakeImmerse implements ShouldQueue
'fontsize=' . $font_size / 2 . ':' .
'fontcolor_expr=' . escapeshellarg($text_color . '%{eif\\\\: clip(255*(1*between(t\\, ' . $DS . ' + ' . $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] + $font_size) . ':' .
'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] . '+' . $font_size) . ':' .
'", ';
}else{
$text_file = Storage::disk('public')->path($this->getTempPath('.txt','text'));
......