From 9b46e4905c2badfd1d9f2f46fa08e12f64e5d9a2 Mon Sep 17 00:00:00 2001 From: Ludo Date: Mon, 13 Nov 2023 14:48:11 +0100 Subject: [PATCH] Update installation instructions and use GPAC for video conversion --- docs/SCRIPT.md | 12 ++++++------ server/server.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/SCRIPT.md b/docs/SCRIPT.md index d8d2291..fa42e9a 100644 --- a/docs/SCRIPT.md +++ b/docs/SCRIPT.md @@ -80,14 +80,14 @@ sudo pip3 install -r requirements.txt npm -v # Checks npm version ``` -## Install FFmpeg -- Install FFmpeg with the following commands: - 1. Install FFmpeg +## Install GPAC +- Install GPAC with the following commands: + 1. Install GPAC ```bash sudo apt-get update - sudo apt-get install ffmpeg + sudo apt-get install gpac ``` - 2. Check the version + 1. Check if GPAC is installed ```bash - ffmpeg -version + gpac ``` \ No newline at end of file diff --git a/server/server.js b/server/server.js index 8057161..8e99881 100644 --- a/server/server.js +++ b/server/server.js @@ -68,7 +68,7 @@ function broadcastData(data, senderWs) { function convertToMp4(inputPath, outputPath) { return new Promise((resolve, reject) => { - const command = `ffmpeg -i "${inputPath}" -c:v libx264 -preset ultrafast -crf 22 -c:a aac -b:a 128k "${outputPath}"`; + const command = `MP4Box -add "${inputPath}#video" "${outputPath}"`; exec(command, (error, stdout, stderr) => { if (error) {