李帅

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

......@@ -53,12 +53,12 @@ class AdminMakeImmerse implements ShouldQueue
$adminMakeVideo = $this->adminMakeVideo;
// 模板
$template = $adminMakeVideo->temp->first();
$template = $adminMakeVideo->temp()->first();
// 素材准备
$drawtext = $this->getTextContentString();
$watermark = $this->getAbsolutePath('images/LOGO_eng.png');
$is_bgm = $template->bg_music;
$is_bgm = $template->bg_music == 1;
$bgm = $this->getAbsolutePath($template->bgm_url);
// 区分类型
......
......@@ -51,7 +51,7 @@ class UserMakeImmerse implements ShouldQueue
public function handle()
{
// 分情况 1.用户视频,2.用户录音
// 注意事项:1.考虑用户是否会员;非会员分辨率 720x1280,会员分辨率1440x2560
// 注意事项:1.考虑用户是否会员;非会员分辨率540x960 ,会员分辨率720x1280
// 2.同时字体大小也很方便确定。
$profile = UserProfile::query()->find($this->immerse->user_id);
......@@ -70,7 +70,7 @@ class UserMakeImmerse implements ShouldQueue
// 记录媒体信息时长
$duration = $mediainfo['format']['duration'] ?: 0;
$font = Storage::disk('public')->path('ffmpeg/arialuni.ttf');
// $font = Storage::disk('public')->path('ffmpeg/arialuni.ttf');
// 音频还取之前的封面。
$thumbnail = Storage::disk('public')->path($this->immerse->thumbnail);
......@@ -94,8 +94,8 @@ class UserMakeImmerse implements ShouldQueue
if (!$this->execmd($cmd)) return ;
}
$drawtext = $this->getTextContentString($font);
$watermark = Storage::disk('public')->path('ffmpeg/LOGO_eng.png');
$drawtext = $this->getTextContentString();
$watermark = Storage::disk('public')->path('images/LOGO_eng.png');
//直接将音频替换
$cmd = $this->ffmpeg . ' -y ' .
......@@ -153,8 +153,8 @@ class UserMakeImmerse implements ShouldQueue
}
}
$drawtext = $this->getTextContentString($font);
$watermark = Storage::disk('public')->path('ffmpeg/LOGO_eng.png');
$drawtext = $this->getTextContentString();
$watermark = Storage::disk('public')->path('images/LOGO_eng.png');
//直接将音频替换
$cmd = $this->ffmpeg . ' -y ' .
......@@ -181,7 +181,7 @@ class UserMakeImmerse implements ShouldQueue
//
// $end_wallpaper = Storage::disk('public')->path('uploads/201/71/end_wallpaper.png');
// $avatar = Storage::disk('public')->path('uploads/201/71/thumbnail.png');
$font = Storage::disk('public')->path('ffmpeg/arialuni.ttf');
// $font = Storage::disk('public')->path('ffmpeg/arialuni.ttf');
//
// $user = User::query()->find($this->immerse->user_id);
// $signature = $user->nickname ?? $user->email ?? '2@qq.com';
......@@ -204,8 +204,8 @@ class UserMakeImmerse implements ShouldQueue
// if (!$this->execmd($cmd)) return 0;
//
$drawtext = $this->getTextContentString($font);
$watermark = Storage::disk('public')->path('ffmpeg/LOGO_eng.png');
$drawtext = $this->getTextContentString();
$watermark = Storage::disk('public')->path('images/LOGO_eng.png');
// 截取中间帧作为视频封面
$frame = ceil($mediainfo['streams'][0]['nb_frames'] / 2);
......