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
李帅
2023-02-24 18:31:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0865259be2040e81f196cc913f7079c1b09ed954
0865259b
1 parent
de9bde3e
1.优化ffmpeg命令,适配各种类型视频
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
3 deletions
app/Jobs/AdminMakeImmerse.php
app/Jobs/AdminMakeImmerse.php
View file @
0865259
...
...
@@ -407,15 +407,13 @@ class AdminMakeImmerse implements ShouldQueue
foreach
(
$contents
as
$key
=>
$content
){
$DS
=
$key
*
$round
;
$DE
=
$DS
+
$round
;
Log
::
debug
(
"round:
$round
, DS:
$DS
, DE:
$DE
"
);
$text_file
=
$this
->
getAbsolutePath
(
$this
->
getTempPath
(
'.txt'
,
'text'
));
file_put_contents
(
$text_file
,
$content
);
$sub_text
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'textfile='
.
escapeshellarg
(
$text_file
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
// 'fontcolor=' . $text_color . '@' . $opacity . ':' .
'fontcolor_expr='
.
escapeshellarg
(
$text_color
.
'%{eif\\\\: clip(255*(1*between(t\\, '
.
$DE
.
' + '
.
$FID
.
'\\, '
.
$DE
.
' - '
.
$FOD
.
') + ((t - '
.
$DS
.
')/'
.
$FID
.
')*between(t\\, '
.
$DS
.
'\\, '
.
$DS
.
' + '
.
$FID
.
') + (-(t - '
.
$DE
.
')/'
.
$FOD
.
')*between(t\\, '
.
$DE
.
' - '
.
$FOD
.
'\\, '
.
$DE
.
'))\\, 0\\, 255) \\\\: x\\\\: 2 }'
)
.
':'
.
'fontcolor_expr='
.
escapeshellarg
(
$text_color
.
'%{eif\\\\: clip(255*(1*between(t\\, '
.
$DS
.
' + '
.
$FID
.
'\\, '
.
$DE
.
' - '
.
$FOD
.
') + ((t - '
.
$DS
.
')/'
.
$FID
.
')*between(t\\, '
.
$DS
.
'\\, '
.
$DS
.
' + '
.
$FID
.
') + (-(t - '
.
$DE
.
')/'
.
$FOD
.
')*between(t\\, '
.
$DE
.
' - '
.
$FOD
.
'\\, '
.
$DE
.
'))\\, 0\\, 255) \\\\: x\\\\: 2 }'
)
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
1
])
.
':'
.
'fix_bounds='
.
$fix_bounds
.
'", '
;
...
...
Please
register
or
login
to post a comment