Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-12-27 14:40:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
35bc26d4cc718eaab06f823252d8dbc70a444fe6
35bc26d4
1 parent
891a786c
1.微调一下接口,打印参数
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
app/Jobs/AdminMakeImmerse.php
app/Jobs/UserMakeImmerse.php
app/Jobs/AdminMakeImmerse.php
View file @
35bc26d
...
...
@@ -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
);
// 区分类型
...
...
app/Jobs/UserMakeImmerse.php
View file @
35bc26d
...
...
@@ -51,7 +51,7 @@ class UserMakeImmerse implements ShouldQueue
public
function
handle
()
{
// 分情况 1.用户视频,2.用户录音
// 注意事项:1.考虑用户是否会员;非会员分辨率
720x1280,会员分辨率1440x256
0
// 注意事项:1.考虑用户是否会员;非会员分辨率
540x960 ,会员分辨率720x128
0
// 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
);
...
...
Please
register
or
login
to post a comment