Showing
2 changed files
with
7 additions
and
11 deletions
... | @@ -60,7 +60,6 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -60,7 +60,6 @@ class AdminMakeImmerse implements ShouldQueue |
60 | 60 | ||
61 | // 组装文字参数 | 61 | // 组装文字参数 |
62 | $drawtext = $this->getTextContentString(); | 62 | $drawtext = $this->getTextContentString(); |
63 | - echo $drawtext; | ||
64 | 63 | ||
65 | // 判断双轨 没有则制作空轨 | 64 | // 判断双轨 没有则制作空轨 |
66 | $is_bgm = $this->adminMakeVideo->temp->bg_music == 1; //是否手动上传背景音 | 65 | $is_bgm = $this->adminMakeVideo->temp->bg_music == 1; //是否手动上传背景音 |
... | @@ -278,7 +277,6 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -278,7 +277,6 @@ class AdminMakeImmerse implements ShouldQueue |
278 | ]; | 277 | ]; |
279 | break; | 278 | break; |
280 | } | 279 | } |
281 | - try{ | ||
282 | $FID = $FOD = floatval($component->fade_time / 1000); | 280 | $FID = $FOD = floatval($component->fade_time / 1000); |
283 | $round = round($this->media_info['format']['duration'] / count($contents),1); | 281 | $round = round($this->media_info['format']['duration'] / count($contents),1); |
284 | if ($round < 1) $round = 1; | 282 | if ($round < 1) $round = 1; |
... | @@ -310,7 +308,7 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -310,7 +308,7 @@ class AdminMakeImmerse implements ShouldQueue |
310 | 'fontsize=' . $font_size / 2 . ':' . | 308 | 'fontsize=' . $font_size / 2 . ':' . |
311 | '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 }') . ':' . | 309 | '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 }') . ':' . |
312 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' . | 310 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' . |
313 | - 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] + $font_size) . ':' . | 311 | + 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] . '+' . $font_size) . ':' . |
314 | '", '; | 312 | '", '; |
315 | }elseif($content['tag'] == 'source'){ | 313 | }elseif($content['tag'] == 'source'){ |
316 | $arr = explode("\n", $content['text']); | 314 | $arr = explode("\n", $content['text']); |
... | @@ -336,7 +334,7 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -336,7 +334,7 @@ class AdminMakeImmerse implements ShouldQueue |
336 | 'fontsize=' . $font_size / 2 . ':' . | 334 | 'fontsize=' . $font_size / 2 . ':' . |
337 | '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 }') . ':' . | 335 | '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 }') . ':' . |
338 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' . | 336 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' . |
339 | - 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] + $font_size) . ':' . | 337 | + 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] . '+' . $font_size) . ':' . |
340 | '", '; | 338 | '", '; |
341 | }else{ | 339 | }else{ |
342 | $text_file = $this->getAbsolutePath($this->getTempPath('.txt','text')); | 340 | $text_file = $this->getAbsolutePath($this->getTempPath('.txt','text')); |
... | @@ -351,10 +349,6 @@ class AdminMakeImmerse implements ShouldQueue | ... | @@ -351,10 +349,6 @@ class AdminMakeImmerse implements ShouldQueue |
351 | '", '; | 349 | '", '; |
352 | } | 350 | } |
353 | } | 351 | } |
354 | - }catch (\Exception $exception){ | ||
355 | - echo $exception->getMessage(); | ||
356 | - echo $exception->getLine(); | ||
357 | - } | ||
358 | 352 | ||
359 | $drawtext .= $sub_text; | 353 | $drawtext .= $sub_text; |
360 | } | 354 | } | ... | ... |
... | @@ -591,7 +591,8 @@ class UserMakeImmerse implements ShouldQueue | ... | @@ -591,7 +591,8 @@ class UserMakeImmerse implements ShouldQueue |
591 | 'textfile=' . escapeshellarg($text_file) . ':' . | 591 | 'textfile=' . escapeshellarg($text_file) . ':' . |
592 | 'fontsize=' . $font_size . ':' . | 592 | 'fontsize=' . $font_size . ':' . |
593 | '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 }') . ':' . | 593 | '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 }') . ':' . |
594 | - 'x=(w-text_w)/2:y=(h-text_h)/2' . ':' . | 594 | + 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' . |
595 | + 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1]) . ':' . | ||
595 | '", '; | 596 | '", '; |
596 | // 作者 | 597 | // 作者 |
597 | $text_file = Storage::disk('public')->path($this->getTempPath('.txt','text')); | 598 | $text_file = Storage::disk('public')->path($this->getTempPath('.txt','text')); |
... | @@ -601,7 +602,8 @@ class UserMakeImmerse implements ShouldQueue | ... | @@ -601,7 +602,8 @@ class UserMakeImmerse implements ShouldQueue |
601 | 'textfile=' . escapeshellarg($text_file) . ':' . | 602 | 'textfile=' . escapeshellarg($text_file) . ':' . |
602 | 'fontsize=' . $font_size / 2 . ':' . | 603 | 'fontsize=' . $font_size / 2 . ':' . |
603 | '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 }') . ':' . | 604 | '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 }') . ':' . |
604 | - 'x=(w-text_w)/2:y=(h-text_h)/2+' . $font_size . ':' . | 605 | + 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][0]) . ':' . |
606 | + 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG['midMiddle'][1] . '+' . $font_size) . ':' . | ||
605 | '", '; | 607 | '", '; |
606 | }elseif($content['tag'] == 'source'){ | 608 | }elseif($content['tag'] == 'source'){ |
607 | $arr = explode("\n", $content['text']); | 609 | $arr = explode("\n", $content['text']); |
... | @@ -627,7 +629,7 @@ class UserMakeImmerse implements ShouldQueue | ... | @@ -627,7 +629,7 @@ class UserMakeImmerse implements ShouldQueue |
627 | 'fontsize=' . $font_size / 2 . ':' . | 629 | 'fontsize=' . $font_size / 2 . ':' . |
628 | '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 }') . ':' . | 630 | '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 }') . ':' . |
629 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' . | 631 | 'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' . |
630 | - 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] + $font_size) . ':' . | 632 | + 'y=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][1] . '+' . $font_size) . ':' . |
631 | '", '; | 633 | '", '; |
632 | }else{ | 634 | }else{ |
633 | $text_file = Storage::disk('public')->path($this->getTempPath('.txt','text')); | 635 | $text_file = Storage::disk('public')->path($this->getTempPath('.txt','text')); | ... | ... |
-
Please register or login to post a comment