From 6835bc4bdb53e9cb1574233d7ef2cb7df95ceeef Mon Sep 17 00:00:00 2001 From: dumbmoron Date: Sat, 10 Feb 2024 20:33:39 +0000 Subject: [PATCH] cut: use ffmpeg-static --- src/modules/stream/cut.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/stream/cut.js b/src/modules/stream/cut.js index b60da766..09799b31 100644 --- a/src/modules/stream/cut.js +++ b/src/modules/stream/cut.js @@ -1,7 +1,9 @@ +import ffmpeg from 'ffmpeg-static'; import { strict as assert } from 'node:assert'; -import { spawn } from './shared.js'; import { path as ffprobe } from 'ffprobe-static'; +import { spawn } from './shared.js'; + function mapFormat(format) { if (format?.includes('webm')) return 'webm'; @@ -116,7 +118,7 @@ async function getBoundingKeyframes(url, { start, end }) { function spawnStream(args, inputs = 0) { return spawn( - 'ffmpeg', + ffmpeg, [ '-loglevel', '-8', ...args, 'pipe:' + (inputs + 3) ], { stdio: [