16 lines
493 B
TypeScript
16 lines
493 B
TypeScript
|
import { promisify } from "util"
|
||
|
import { execFile } from "child_process"
|
||
|
|
||
|
|
||
|
export async function remux(inputVideoPath: string, outputVideoPath: string): Promise<void> {
|
||
|
console.log(`remuxing video ${inputVideoPath} and ouputting to ${outputVideoPath}.`)
|
||
|
const execFileP = promisify(execFile)
|
||
|
const { stdout, stderr } = await execFileP('ffmpeg', [
|
||
|
'-i', inputVideoPath,
|
||
|
'-c', 'copy',
|
||
|
outputVideoPath
|
||
|
])
|
||
|
console.log(`stdout=${stdout}`)
|
||
|
console.log(`stderr=${stderr}`)
|
||
|
}
|