|
@@ -50,6 +50,9 @@ class GeneratePreviewVideo extends Command
|
|
*/
|
|
*/
|
|
public function handle()
|
|
public function handle()
|
|
{
|
|
{
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
$disk = $this->disk('oss');
|
|
$disk = $this->disk('oss');
|
|
|
|
|
|
|
|
|
|
@@ -106,7 +109,7 @@ class GeneratePreviewVideo extends Command
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- return dd('success1');
|
|
+ return dd('success');
|
|
}
|
|
}
|
|
|
|
|
|
private function saveLocal($url, $localPath) {
|
|
private function saveLocal($url, $localPath) {
|
|
@@ -141,6 +144,9 @@ class GeneratePreviewVideo extends Command
|
|
|
|
|
|
|
|
|
|
$format = new \FFMpeg\Format\Video\X264();
|
|
$format = new \FFMpeg\Format\Video\X264();
|
|
|
|
+ $format->setAdditionalParameters([
|
|
|
|
+ '-an'
|
|
|
|
+ ]);
|
|
$video->save($format, $outputPath);
|
|
$video->save($format, $outputPath);
|
|
return $outputPath;
|
|
return $outputPath;
|
|
}
|
|
}
|
|
@@ -182,6 +188,7 @@ class GeneratePreviewVideo extends Command
|
|
'video_url' => $videoUrl,
|
|
'video_url' => $videoUrl,
|
|
'preview_url' => '',
|
|
'preview_url' => '',
|
|
'status' => 0,
|
|
'status' => 0,
|
|
|
|
+ 'album_id' => $album->id,
|
|
'created_at' => Carbon::now(),
|
|
'created_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
'updated_at' => Carbon::now(),
|
|
];
|
|
];
|
|
@@ -202,6 +209,4 @@ class GeneratePreviewVideo extends Command
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|