cut: use ffmpeg-static

This commit is contained in:
dumbmoron 2024-02-10 20:33:39 +00:00
parent 7df43c43c4
commit 6835bc4bdb
No known key found for this signature in database
GPG Key ID: C59997C76C6A8E5F

View File

@ -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: [