From 3049926413bb1cb9efda2ab28470eb377dbbc024 Mon Sep 17 00:00:00 2001 From: Kerboul Date: Sun, 12 Jan 2025 14:26:16 +0000 Subject: [PATCH] Update database host in db.js --- ffmpeg.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ffmpeg.js diff --git a/ffmpeg.js b/ffmpeg.js new file mode 100644 index 0000000..4844ab0 --- /dev/null +++ b/ffmpeg.js @@ -0,0 +1,16 @@ +const { exec } = require('child_process'); + +exec('ffmpeg -version', (error, stdout, stderr) => { + if (error) { + console.log('FFmpeg is not installed. Installing FFmpeg...'); + exec('apt update && sudo apt install -y ffmpeg', (installError, installStdout, installStderr) => { + if (installError) { + console.error(`Error installing FFmpeg: ${installError}`); + return; + } + console.log('FFmpeg installed successfully.'); + }); + } else { + console.log('FFmpeg is already installed.'); + } +}); \ No newline at end of file