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 16:37:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7f6e89c4821a9ccba9d4a81a9edeba40cb6eaa53
7f6e89c4
1 parent
2fe40ace
1.微调一下接口,打印参数
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
app/Jobs/AdminMakeImmerse.php
app/Jobs/UserMakeImmerse.php
app/Jobs/AdminMakeImmerse.php
View file @
7f6e89c
...
...
@@ -110,7 +110,7 @@ class AdminMakeImmerse implements ShouldQueue
$audio_filter
=
'2:a'
;
}
else
{
/** 音频视频轨都没有 */
Log
::
channel
(
'daily'
)
->
error
(
'视频没有video track
'
);
Log
::
channel
(
'daily'
)
->
error
(
'视频没有video track
, url:'
.
$file
);
return
;
}
...
...
@@ -155,7 +155,12 @@ class AdminMakeImmerse implements ShouldQueue
Immerse
::
query
()
->
create
([
'user_id'
=>
1
,
'title'
=>
''
,
'weather'
=>
$adminMakeVideo
->
weather
,
'huangli'
=>
$adminMakeVideo
->
huangli
,
'content'
=>
$adminMakeVideo
->
feel
,
'location'
=>
$adminMakeVideo
->
location
,
'longitude'
=>
$adminMakeVideo
->
longitude
,
'latitude'
=>
$adminMakeVideo
->
latitude
,
'url'
=>
$output
,
'type'
=>
$adminMakeVideo
->
type
==
1
?
2
:
1
,
'upload_file'
=>
''
,
...
...
@@ -232,7 +237,12 @@ class AdminMakeImmerse implements ShouldQueue
Immerse
::
query
()
->
create
([
'user_id'
=>
1
,
'title'
=>
''
,
'content'
=>
$this
->
adminMakeVideo
->
feel
,
'weather'
=>
$adminMakeVideo
->
weather
,
'huangli'
=>
$adminMakeVideo
->
huangli
,
'content'
=>
$adminMakeVideo
->
feel
,
'location'
=>
$adminMakeVideo
->
location
,
'longitude'
=>
$adminMakeVideo
->
longitude
,
'latitude'
=>
$adminMakeVideo
->
latitude
,
'url'
=>
$output
,
'type'
=>
$this
->
adminMakeVideo
->
type
==
1
?
2
:
1
,
'upload_file'
=>
''
,
...
...
@@ -355,7 +365,7 @@ class AdminMakeImmerse implements ShouldQueue
$text_color
=
$component
->
text_color
??
'white'
;
$text_bg_color
=
$component
->
text_bg_color
??
'0xd0cdcc'
;
$opacity
=
$component
->
opacity
?
$component
->
opacity
/
100
:
0.5
;
$font_file
=
$this
->
getAbsolutePath
(
$component
->
font_file
??
'ffmpeg/arialuni.ttf'
);
$font_file
=
$this
->
getAbsolutePath
(
$component
->
font_file
);
$text_bg_box
=
$component
->
text_bg_box
??
0
;
$fix_bounds
=
$component
->
fix_bounds
==
1
;
...
...
@@ -379,11 +389,9 @@ class AdminMakeImmerse implements ShouldQueue
break
;
case
'weather'
:
$content
=
$this
->
adminMakeVideo
->
weather
;
$text_file
=
$this
->
getAbsolutePath
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$drawtext
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'text
file='
.
escapeshellarg
(
$text_file
)
.
':'
.
'text
='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
'fontcolor='
.
$text_color
.
'@'
.
$opacity
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
...
...
@@ -395,11 +403,9 @@ class AdminMakeImmerse implements ShouldQueue
break
;
case
'date'
:
$content
=
Carbon
::
now
()
->
format
(
'Y年m月d日H时'
);
$text_file
=
$this
->
getAbsolutePath
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$drawtext
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'text
file='
.
escapeshellarg
(
$text_file
)
.
':'
.
'text
='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
'fontcolor='
.
$text_color
.
'@'
.
$opacity
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
...
...
@@ -410,11 +416,9 @@ class AdminMakeImmerse implements ShouldQueue
break
;
case
'feel'
:
$content
=
$this
->
adminMakeVideo
->
feel
?:
'读此一言,仿佛身临其境。'
;
$text_file
=
$this
->
getAbsolutePath
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$drawtext
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'text
file='
.
escapeshellarg
(
$text_file
)
.
':'
.
'text
='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
'fontcolor='
.
$text_color
.
'@'
.
$opacity
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
...
...
app/Jobs/UserMakeImmerse.php
View file @
7f6e89c
...
...
@@ -523,7 +523,7 @@ class UserMakeImmerse implements ShouldQueue
'boxcolor='
.
$text_bg_color
.
'@'
.
$opacity
.
'", '
;
break
;
case
'weather'
:
$content
=
$this
->
immerse
->
weather
??
''
;
$content
=
$this
->
immerse
->
weather
;
$text_file
=
Storage
::
disk
(
'public'
)
->
path
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$drawtext
.=
'drawtext="'
.
...
...
@@ -540,11 +540,9 @@ class UserMakeImmerse implements ShouldQueue
break
;
case
'date'
:
$content
=
Carbon
::
now
()
->
format
(
'Y年m月d日H时'
);
$text_file
=
Storage
::
disk
(
'public'
)
->
path
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$drawtext
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'text
file='
.
escapeshellarg
(
$text_file
)
.
':'
.
'text
='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
'fontcolor='
.
$text_color
.
'@'
.
$opacity
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
...
...
@@ -554,12 +552,10 @@ class UserMakeImmerse implements ShouldQueue
'boxcolor='
.
$text_bg_color
.
'@'
.
$opacity
.
'", '
;
break
;
case
'feel'
:
$content
=
$this
->
immerse
->
content
??
'读此一言,仿佛身临其境。'
;
$text_file
=
Storage
::
disk
(
'public'
)
->
path
(
$this
->
getTempPath
(
'.txt'
));
file_put_contents
(
$text_file
,
$content
);
$content
=
$this
->
immerse
->
content
;
$drawtext
.=
'drawtext="'
.
'fontfile='
.
escapeshellarg
(
$font_file
)
.
':'
.
'text
file='
.
escapeshellarg
(
$text_file
)
.
':'
.
'text
='
.
escapeshellarg
(
$content
)
.
':'
.
'fontsize='
.
$this
->
calcFontSize
(
$component
->
font_size
)
.
':'
.
'fontcolor='
.
$text_color
.
'@'
.
$opacity
.
':'
.
'x='
.
escapeshellarg
(
VideoTemp
::
POSITION_FFMPEG
[
$component
->
position
][
0
])
.
':'
.
...
...
Please
register
or
login
to post a comment