李帅

1.微调一下接口,打印参数

......@@ -379,9 +379,11 @@ class AdminMakeImmerse implements ShouldQueue
break;
case 'weather':
$content = $this->adminMakeVideo->weather;
$text_file = $this->getAbsolutePath($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......@@ -393,9 +395,11 @@ class AdminMakeImmerse implements ShouldQueue
break;
case 'date':
$content = Carbon::now()->format('Y年m月d日H时');
$text_file = $this->getAbsolutePath($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......@@ -406,9 +410,11 @@ class AdminMakeImmerse implements ShouldQueue
break;
case 'feel':
$content = $this->adminMakeVideo->feel ?: '读此一言,仿佛身临其境。';
$text_file = $this->getAbsolutePath($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......
......@@ -523,10 +523,12 @@ class UserMakeImmerse implements ShouldQueue
'boxcolor=' . $text_bg_color . '@' . $opacity . '", ';
break;
case 'weather':
$content = '多云';
$content = $this->immerse->weather ?? '';
$text_file = Storage::disk('public')->path($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......@@ -538,9 +540,11 @@ class UserMakeImmerse implements ShouldQueue
break;
case 'date':
$content = Carbon::now()->format('Y年m月d日H时');
$text_file = Storage::disk('public')->path($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......@@ -550,10 +554,12 @@ class UserMakeImmerse implements ShouldQueue
'boxcolor=' . $text_bg_color . '@' . $opacity . '", ';
break;
case 'feel':
$content = $this->immerse->content ?: '读此一言,仿佛身临其境。';
$content = $this->immerse->content ?? '读此一言,仿佛身临其境。';
$text_file = Storage::disk('public')->path($this->getTempPath('.txt'));
file_put_contents($text_file, $content);
$drawtext .= 'drawtext="'.
'fontfile=' . escapeshellarg($font_file) . ':' .
'text=' . escapeshellarg($content) . ':' .
'textfile=' . escapeshellarg($text_file) . ':' .
'fontsize=' . $this->calcFontSize($component->font_size) . ':' .
'fontcolor=' . $text_color . '@' . $opacity . ':' .
'x=' . escapeshellarg(VideoTemp::POSITION_FFMPEG[$component->position][0]) . ':' .
......