From a02cdd801ee7e8abd203cdc43cd872383daf49ca Mon Sep 17 00:00:00 2001 From: Quentin Roussel Date: Sun, 18 Aug 2024 20:09:36 +0800 Subject: [PATCH] updated video codec --- Makefile | 3 ++- video.mjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1711dc3..81a7efc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ APP_NAME = "sg_rain_radar" OUTPUT_DIR = /var/www/html/other/sg_rain_radar/ +DEBUG_OUTPUT_DIR = $(PWD)/out build: docker build . -t $(APP_NAME) @@ -11,7 +12,7 @@ debug:build docker run \ -it \ --mount type=bind,source=$(PWD)/images,target=/home/node/app/images \ - --mount type=bind,source=$(OUTPUT_DIR),target=/home/node/app/out \ + --mount type=bind,source=$(DEBUG_OUTPUT_DIR),target=/home/node/app/out \ $(APP_NAME) run:build diff --git a/video.mjs b/video.mjs index 904d28d..b5d6fc7 100644 --- a/video.mjs +++ b/video.mjs @@ -45,7 +45,7 @@ export async function createVideo() { } //run the command ffmpeg -framerate 5 -i %d.png -c:v libx264 -r 30 output.mp4 return new Promise((resolve, reject) => { - exec('ffmpeg -framerate 5 -i images/final/%d.png -c:v h264 -r 30 out/output.mp4', (err, stdout, stderr) => { + exec('ffmpeg -framerate 5 -i images/final/%d.png -c:v libvpx -r 30 out/output.mp4', (err, stdout, stderr) => { if (err) { reject(err); return;