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-04-06 19:16:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
adae1d78aeb8b7e3cf80e3d7e671968dcaba2629
adae1d78
1 parent
e079d28e
1.继续调试ffmpeg命令
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
app/Jobs/MakeVideo.php
app/Jobs/MakeVideo.php
View file @
adae1d7
...
...
@@ -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='
.
escapeshell
arg
(
$content
)
.
':'
.
'text='
.
escapeshell
cmd
(
$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).
...
...
Please
register
or
login
to post a comment