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-05-18 21:43:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
253d8c8041a7724f763847794d4b49a063d8b82a
253d8c80
1 parent
4b37ebf5
1.修复一些bug
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
app/Jobs/AdminMakeImmerse.php
app/Jobs/UserMakeImmerse.php
app/Jobs/AdminMakeImmerse.php
View file @
253d8c8
...
...
@@ -60,7 +60,6 @@ class AdminMakeImmerse implements ShouldQueue
// 组装文字参数
$drawtext
=
$this
->
getTextContentString
();
echo
$drawtext
;
// 判断双轨 没有则制作空轨
$is_bgm
=
$this
->
adminMakeVideo
->
temp
->
bg_music
==
1
;
//是否手动上传背景音
...
...
@@ -278,7 +277,6 @@ class AdminMakeImmerse implements ShouldQueue
];
break
;
}
try
{
$FID
=
$FOD
=
floatval
(
$component
->
fade_time
/
1000
);
$round
=
round
(
$this
->
media_info
[
'format'
][
'duration'
]
/
count
(
$contents
),
1
);
if
(
$round
<
1
)
$round
=
1
;
...
...
@@ -310,7 +308,7 @@ class AdminMakeImmerse implements ShouldQueue
'fontsize='
.
$font_size
/
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
[
'midMiddle'
][
0
])
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
1
]
+
$font_size
)
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
1
]
.
'+'
.
$font_size
)
.
':'
.
'", '
;
}
elseif
(
$content
[
'tag'
]
==
'source'
){
$arr
=
explode
(
"
\n
"
,
$content
[
'text'
]);
...
...
@@ -336,7 +334,7 @@ class AdminMakeImmerse implements ShouldQueue
'fontsize='
.
$font_size
/
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
]
+
$font_size
)
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
1
]
.
'+'
.
$font_size
)
.
':'
.
'", '
;
}
else
{
$text_file
=
$this
->
getAbsolutePath
(
$this
->
getTempPath
(
'.txt'
,
'text'
));
...
...
@@ -351,10 +349,6 @@ class AdminMakeImmerse implements ShouldQueue
'", '
;
}
}
}
catch
(
\Exception
$exception
){
echo
$exception
->
getMessage
();
echo
$exception
->
getLine
();
}
$drawtext
.=
$sub_text
;
}
...
...
app/Jobs/UserMakeImmerse.php
View file @
253d8c8
...
...
@@ -591,7 +591,8 @@ class UserMakeImmerse implements ShouldQueue
'textfile='
.
escapeshellarg
(
$text_file
)
.
':'
.
'fontsize='
.
$font_size
.
':'
.
'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=(w-text_w)/2:y=(h-text_h)/2'
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
0
])
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
1
])
.
':'
.
'", '
;
// 作者
$text_file
=
Storage
::
disk
(
'public'
)
->
path
(
$this
->
getTempPath
(
'.txt'
,
'text'
));
...
...
@@ -601,7 +602,8 @@ class UserMakeImmerse implements ShouldQueue
'textfile='
.
escapeshellarg
(
$text_file
)
.
':'
.
'fontsize='
.
$font_size
/
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=(w-text_w)/2:y=(h-text_h)/2+'
.
$font_size
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
0
])
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
'midMiddle'
][
1
]
.
'+'
.
$font_size
)
.
':'
.
'", '
;
}
elseif
(
$content
[
'tag'
]
==
'source'
){
$arr
=
explode
(
"
\n
"
,
$content
[
'text'
]);
...
...
@@ -627,7 +629,7 @@ class UserMakeImmerse implements ShouldQueue
'fontsize='
.
$font_size
/
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
]
+
$font_size
)
.
':'
.
'y='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
1
]
.
'+'
.
$font_size
)
.
':'
.
'", '
;
}
else
{
$text_file
=
Storage
::
disk
(
'public'
)
->
path
(
$this
->
getTempPath
(
'.txt'
,
'text'
));
...
...
Please
register
or
login
to post a comment