mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-18 11:18:28 +00:00
cut: use ffmpeg-static
This commit is contained in:
parent
7df43c43c4
commit
6835bc4bdb
@ -1,7 +1,9 @@
|
|||||||
|
import ffmpeg from 'ffmpeg-static';
|
||||||
import { strict as assert } from 'node:assert';
|
import { strict as assert } from 'node:assert';
|
||||||
import { spawn } from './shared.js';
|
|
||||||
import { path as ffprobe } from 'ffprobe-static';
|
import { path as ffprobe } from 'ffprobe-static';
|
||||||
|
|
||||||
|
import { spawn } from './shared.js';
|
||||||
|
|
||||||
function mapFormat(format) {
|
function mapFormat(format) {
|
||||||
if (format?.includes('webm'))
|
if (format?.includes('webm'))
|
||||||
return 'webm';
|
return 'webm';
|
||||||
@ -116,7 +118,7 @@ async function getBoundingKeyframes(url, { start, end }) {
|
|||||||
|
|
||||||
function spawnStream(args, inputs = 0) {
|
function spawnStream(args, inputs = 0) {
|
||||||
return spawn(
|
return spawn(
|
||||||
'ffmpeg',
|
ffmpeg,
|
||||||
[ '-loglevel', '-8', ...args, 'pipe:' + (inputs + 3) ],
|
[ '-loglevel', '-8', ...args, 'pipe:' + (inputs + 3) ],
|
||||||
{
|
{
|
||||||
stdio: [
|
stdio: [
|
||||||
|
Loading…
Reference in New Issue
Block a user