Showing
1 changed file
with
9 additions
and
11 deletions
... | @@ -60,14 +60,12 @@ class MakeVideo implements ShouldQueue | ... | @@ -60,14 +60,12 @@ class MakeVideo implements ShouldQueue |
60 | $signature = "一言"; | 60 | $signature = "一言"; |
61 | $signature_x = 0; | 61 | $signature_x = 0; |
62 | $signature_y = -20; | 62 | $signature_y = -20; |
63 | -// $content = $adminMakeVideo->poem->title . "\t" . ' -- ' . $adminMakeVideo->poem->author . PHP_EOL ."". | 63 | + $content = $adminMakeVideo->poem->content . PHP_EOL; |
64 | -// $adminMakeVideo->poem->content . PHP_EOL; | ||
65 | - $content = $adminMakeVideo->poem->content; | ||
66 | $content_position = $adminMakeVideo->getContentPosition(); | 64 | $content_position = $adminMakeVideo->getContentPosition(); |
67 | 65 | ||
68 | // 转换logo大小 | 66 | // 转换logo大小 |
69 | // $watermark = $this->translateLogo(Storage::disk('public')->path('image/logo.jpg')); | 67 | // $watermark = $this->translateLogo(Storage::disk('public')->path('image/logo.jpg')); |
70 | - $watermark = Storage::disk('public')->path('image/logo.png'); | 68 | + $watermark = Storage::disk('public')->path('ffmpeg') . "/LOGO_eng.png"; |
71 | 69 | ||
72 | // 生成贴纸和签名 | 70 | // 生成贴纸和签名 |
73 | $end_wallpaper = $this->wallpaperWithSignature($end_wallpaper, $thumbnail, $signature, $font); | 71 | $end_wallpaper = $this->wallpaperWithSignature($end_wallpaper, $thumbnail, $signature, $font); |
... | @@ -89,7 +87,7 @@ class MakeVideo implements ShouldQueue | ... | @@ -89,7 +87,7 @@ class MakeVideo implements ShouldQueue |
89 | ' -filter_complex "[0:0] ' . | 87 | ' -filter_complex "[0:0] ' . |
90 | 'drawtext="' . | 88 | 'drawtext="' . |
91 | 'fontfile=' . escapeshellarg($font) . ':' . | 89 | 'fontfile=' . escapeshellarg($font) . ':' . |
92 | - 'text=' . escapeshellarg($content) . ':' . | 90 | + 'text=' . escapeshellcmd($content) . ':' . |
93 | 'fontsize=43:' . | 91 | 'fontsize=43:' . |
94 | 'fontcolor=white@1.0:' . | 92 | 'fontcolor=white@1.0:' . |
95 | 'x=' . $content_position[0] . ':' . | 93 | 'x=' . $content_position[0] . ':' . |
... | @@ -104,12 +102,12 @@ class MakeVideo implements ShouldQueue | ... | @@ -104,12 +102,12 @@ class MakeVideo implements ShouldQueue |
104 | 102 | ||
105 | $this->execmd($cmd); | 103 | $this->execmd($cmd); |
106 | 104 | ||
107 | - $video = $this->getTempPath(); | 105 | +// $video = $this->getTempPath(); |
108 | - if ( $adminMakeVideo->thumbnail == 1 && $adminMakeVideo->thumbnail_url){ | 106 | +// if ( $adminMakeVideo->thumbnail == 1 && $adminMakeVideo->thumbnail_url){ |
109 | - $thumbnail = Storage::disk('public')->path($adminMakeVideo->thumbnail_url); | 107 | +// $thumbnail = Storage::disk('public')->path($adminMakeVideo->thumbnail_url); |
110 | - }else{ | 108 | +// }else{ |
111 | - $thumbnail = $last_frame_video; | 109 | +// $thumbnail = $last_frame_video; |
112 | - } | 110 | +// } |
113 | 111 | ||
114 | // $cmd = $this->ffmpeg. ' -y'. | 112 | // $cmd = $this->ffmpeg. ' -y'. |
115 | // ' -i ' . escapeshellarg($video_temp). | 113 | // ' -i ' . escapeshellarg($video_temp). | ... | ... |
-
Please register or login to post a comment