Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface FFmpegInput

Hierarchy

  • FFmpegInput

Index

Properties

isStream

isStream: boolean

Whether the input is a stream.

Methods

args

  • args(...args: string[]): this
  • Add input arguments, they will be placed before any additional arguments.

    Parameters

    • Rest ...args: string[]

      -

    Returns this

audioCodec

codec

duration

  • duration(duration: number): this

format

getArgs

  • getArgs(): string[]
  • Returns all the arguments for the input.

    Returns string[]

offset

  • offset(offset: number): this

probe

  • Get information about the input, this is especially helpful when working with streams. If the source is a stream options.probeSize number of bytes will be read and passed to ffprobe; those bytes will be kept in memory until the input is used in conversion.

    example
    const cmd = ffmpeg();
    cmd.output('output.mp4');
    const input = cmd.input(fs.createReadStream('input.mkv'));
    const info = await input.probe();
    console.log(`Video duration: ${info.duration}, format: ${info.format}`);
    const process = await cmd.spawn();
    await process.complete();
    alpha

    Parameters

    Returns Promise<ProbeResult>

start

  • start(start: number): this

subtitleCodec

videoCodec