李帅

1.继续调试ffmpeg命令

......@@ -60,14 +60,12 @@ class MakeVideo implements ShouldQueue
$signature = "一言";
$signature_x = 0;
$signature_y = -20;
// $content = $adminMakeVideo->poem->title . "\t" . ' -- ' . $adminMakeVideo->poem->author . PHP_EOL ."".
// $adminMakeVideo->poem->content . PHP_EOL;
$content = $adminMakeVideo->poem->content;
$content = $adminMakeVideo->poem->content . PHP_EOL;
$content_position = $adminMakeVideo->getContentPosition();
// 转换logo大小
// $watermark = $this->translateLogo(Storage::disk('public')->path('image/logo.jpg'));
$watermark = Storage::disk('public')->path('image/logo.png');
$watermark = Storage::disk('public')->path('ffmpeg') . "/LOGO_eng.png";
// 生成贴纸和签名
$end_wallpaper = $this->wallpaperWithSignature($end_wallpaper, $thumbnail, $signature, $font);
......@@ -89,7 +87,7 @@ class MakeVideo implements ShouldQueue
' -filter_complex "[0:0] ' .
'drawtext="' .
'fontfile=' . escapeshellarg($font) . ':' .
'text=' . escapeshellarg($content) . ':' .
'text=' . escapeshellcmd($content) . ':' .
'fontsize=43:' .
'fontcolor=white@1.0:' .
'x=' . $content_position[0] . ':' .
......@@ -104,12 +102,12 @@ class MakeVideo implements ShouldQueue
$this->execmd($cmd);
$video = $this->getTempPath();
if ( $adminMakeVideo->thumbnail == 1 && $adminMakeVideo->thumbnail_url){
$thumbnail = Storage::disk('public')->path($adminMakeVideo->thumbnail_url);
}else{
$thumbnail = $last_frame_video;
}
// $video = $this->getTempPath();
// if ( $adminMakeVideo->thumbnail == 1 && $adminMakeVideo->thumbnail_url){
// $thumbnail = Storage::disk('public')->path($adminMakeVideo->thumbnail_url);
// }else{
// $thumbnail = $last_frame_video;
// }
// $cmd = $this->ffmpeg. ' -y'.
// ' -i ' . escapeshellarg($video_temp).
......