s
This commit is contained in:
parent
903f4c8882
commit
efff960a55
2 changed files with 3 additions and 3 deletions
|
@ -20,8 +20,8 @@ let main = new Route([auth], async function (req, res, input) {
|
||||||
let {path} = req.file;
|
let {path} = req.file;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await execP(`ffmpeg -i ${path} videos/${id}.mp4`);
|
await execP(`ffmpeg -i ${path} videos/${id}.webm`);
|
||||||
await execP(`ffmpeg -i videos/${id}.mp4 -frames:v 1 videos/${id}.png`);
|
await execP(`ffmpeg -i videos/${id}.webm -frames:v 1 videos/${id}.png`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return { 'success': false, 'message': 'Video is invalid'}
|
return { 'success': false, 'message': 'Video is invalid'}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<%- include('header.ejs') -%>
|
<%- include('header.ejs') -%>
|
||||||
<div class='area'>
|
<div class='area'>
|
||||||
<h1>Video</h1>
|
<h1>Video</h1>
|
||||||
<video controls src='/videos/<%= videoData.id %>.mp4'></video>
|
<video controls src='/videos/<%= videoData.id %>.webm'></video>
|
||||||
<div><b>
|
<div><b>
|
||||||
<%= videoData.title %>
|
<%= videoData.title %>
|
||||||
</b>
|
</b>
|
||||||
|
|
Loading…
Reference in a new issue