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-03-23 17:53:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9c35fe7c6f6ce331bd1845819cdbe35938d56f70
9c35fe7c
1 parent
6e891a66
1.更改ffmpeg 地址
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
35 deletions
app/Jobs/MakeVideo.php
app/Jobs/MakeVideo.php
View file @
9c35fe7
...
...
@@ -95,41 +95,43 @@ class MakeVideo implements ShouldQueue
escapeshellarg
(
$video
);
// 执行合成
$this
->
execmd
(
$cmd
);
$video2
=
$this
->
getTempPath
();
$cmd
=
$this
->
ffmpeg
.
' -y -i '
.
escapeshellarg
(
$video
)
.
' -vf '
.
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font
)
.
':'
.
'text='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize=43:'
.
'fontcolor=white@1.0:'
.
'x=main_w/2'
.
'-260'
.
':'
.
'y=main_h/2'
.
'-20'
.
':'
.
'box=1:boxcolor=0xd0cdcc@0.5'
.
'" '
.
escapeshellarg
(
$video2
);
if
(
$this
->
execmd
(
$cmd
))
{
// 全部合成以后创建 临境
$video_info
=
$this
->
mediainfo
(
$video2
);
Immerse
::
query
()
->
create
([
'user_id'
=>
1
,
'title'
=>
''
,
'content'
=>
$this
->
adminMakeVideo
->
feel
,
'url'
=>
$video2
,
'type'
=>
$this
->
adminMakeVideo
->
type
==
1
?
2
:
1
,
'duration'
=>
$video_info
[
'format'
][
'duration'
],
'size'
=>
$video_info
[
'format'
][
'size'
],
'poem_id'
=>
$this
->
adminMakeVideo
->
poem_id
,
'temp_id'
=>
$this
->
adminMakeVideo
->
temp_id
,
'thumbnail'
=>
$this
->
adminMakeVideo
->
thumbnail_url
,
'bgm'
=>
$this
->
adminMakeVideo
->
bgm_url
,
]);
}
else
{
Log
::
info
(
''
);
return
;
if
(
$this
->
execmd
(
$cmd
)){
$video2
=
$this
->
getTempPath
();
$cmd
=
$this
->
ffmpeg
.
' -y -i '
.
escapeshellarg
(
$video
)
.
' -vf '
.
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font
)
.
':'
.
'text='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize=43:'
.
'fontcolor=white@1.0:'
.
'x=main_w/2'
.
'-260'
.
':'
.
'y=main_h/2'
.
'-20'
.
':'
.
'box=1:boxcolor=0xd0cdcc@0.5'
.
'" '
.
escapeshellarg
(
$video2
);
if
(
$this
->
execmd
(
$cmd
))
{
// 全部合成以后创建 临境
$video_info
=
$this
->
mediainfo
(
$video2
);
Immerse
::
query
()
->
create
([
'user_id'
=>
1
,
'title'
=>
''
,
'content'
=>
$this
->
adminMakeVideo
->
feel
??
''
,
'url'
=>
$video2
,
'type'
=>
$this
->
adminMakeVideo
->
type
==
1
?
2
:
1
,
'duration'
=>
$video_info
[
'format'
][
'duration'
],
'size'
=>
$video_info
[
'format'
][
'size'
],
'poem_id'
=>
$this
->
adminMakeVideo
->
poem_id
,
'temp_id'
=>
$this
->
adminMakeVideo
->
temp_id
,
'thumbnail'
=>
$this
->
adminMakeVideo
->
thumbnail_url
,
'bgm'
=>
$this
->
adminMakeVideo
->
bgm_url
,
]);
}
else
{
Log
::
info
(
'退出1'
);
return
;
}
}
else
{
Log
::
info
(
'退出2'
);
}
}
...
...
Please
register
or
login
to post a comment