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-08 17:59:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1b7f8a8835b0fc0ff5a2f4cd75564e8758b17543
1b7f8a88
1 parent
883c83ff
1.重新整合ffmpeg命令
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
app/Admin/Controllers/AdminMakeVideoController.php
app/Jobs/MakeVideo.php
app/Admin/Controllers/AdminMakeVideoController.php
View file @
1b7f8a8
...
...
@@ -14,6 +14,7 @@ use Dcat\Admin\Layout\Content;
use
Dcat\Admin\Show
;
use
Dcat\Admin\Http\Controllers\AdminController
;
use
Illuminate\Support\Facades\Storage
;
use
Illuminate\Support\Str
;
class
AdminMakeVideoController
extends
AdminController
{
...
...
@@ -31,7 +32,7 @@ class AdminMakeVideoController extends AdminController
$grid
->
column
(
'title'
,
'标题'
);
$grid
->
column
(
'content'
,
'有感'
);
$grid
->
column
(
'url'
)
->
display
(
function
(
$url
){
return
"<a target='_blank' href='"
.
Storage
::
disk
(
'public'
)
->
url
(
$url
)
.
"'>查看</a>"
;
return
"<a target='_blank' href='"
.
Storage
::
disk
(
'public'
)
->
url
(
Str
::
before
(
$url
,
'/public'
)
)
.
"'>查看</a>"
;
});
$grid
->
column
(
'type'
,
'类型'
)
->
using
([
1
=>
'音频'
,
2
=>
'视频'
]);
$grid
->
column
(
'duration'
);
...
...
app/Jobs/MakeVideo.php
View file @
1b7f8a8
...
...
@@ -404,7 +404,7 @@ class MakeVideo implements ShouldQueue
{
$filename
=
"/output_"
.
time
()
.
rand
(
0
,
10000
);
$prefix
=
$is_temp
?
'temp/'
:
'video'
;
$prefix
=
$is_temp
?
'temp/'
:
'video
/
'
;
$hash_hex
=
md5
(
$filename
);
// 16进制表示的字符串一共32字节,表示16个二进制字节。
// 前16个字符用来第一级求摸,后16个用做第二级
...
...
Please
register
or
login
to post a comment