This commit is contained in:
biglyderv 2024-09-19 06:09:07 -04:00
parent 903f4c8882
commit efff960a55
No known key found for this signature in database
GPG key ID: 33AC87E9ACE66954
2 changed files with 3 additions and 3 deletions

View file

@ -20,8 +20,8 @@ let main = new Route([auth], async function (req, res, input) {
let {path} = req.file;
try {
await execP(`ffmpeg -i ${path} videos/${id}.mp4`);
await execP(`ffmpeg -i videos/${id}.mp4 -frames:v 1 videos/${id}.png`);
await execP(`ffmpeg -i ${path} videos/${id}.webm`);
await execP(`ffmpeg -i videos/${id}.webm -frames:v 1 videos/${id}.png`);
} catch (err) {
return { 'success': false, 'message': 'Video is invalid'}
}