ffmpeg-multistream
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

ffmpeg-multistream - FFMPEG input multistream

Usage

Multistream - constructor

import Multistream from "ffmpeg-multistream";

const multistream = new Multistream(ReadableStream);

Multistream - get url

console.log(multistream.url);

Multistream - release (When not using this multistream)

multistream.release();

Example

import Multistream from "ffmpeg-multistream";
import fs from "fs";
import ffmpeg from "fluent-ffmpeg";

const videoMultistream = new Multistream(fs.createReadStream("test.mp4"));
const audioMultistream = new Multistream(fs.createReadStream("test.mp3"));

ffmpeg()
  .input(videoMultistream.url)
  .inputFormat("mp4")
  .input(audioMultistream.url)
  .inputFormat("mp3")
  .videoCodec("copy")
  .audioCodec("copy")
  .output("out2.mp4")
  .addOptions(["-map", "0:v", "-map", "1:a", "-y"])
  .run();

Package Sidebar

Install

npm i ffmpeg-multistream

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

2.88 kB

Total Files

4

Last publish

Collaborators

  • smiilliin