Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
This repository was archived by the owner on May 22, 2025. It is now read-only.

Error: Input format lavfi is not available #1282

@fa0311

Description

@fa0311

Version information

  • fluent-ffmpeg version: 2.1.3
  • ffmpeg version: 7.0.1
  • OS: Windows

Code to reproduce

import { default as ffmpeg, default as ffprobe } from "fluent-ffmpeg";
const command = ffmpeg();
command.input("anullsrc=channel_layout=mono:sample_rate=44100");
command.inputFormat("lavfi");
command.addOption("-t", "20");
command.output("test.mp4")
command.run();

(note: if the problem only happens with some inputs, include a link to such an input file)

Expected results

Observed results

Error: Input format lavfi is not available

Temporary workaround

// TypeScript
const bypass = (command: ffmpeg.FfmpegCommand) => {
    const bk = command.availableFormats;
    command.availableFormats = (cb: (err: any, data: any) => void) => {
      bk.bind(command)((err, data) => {
        const lavfi = {
          canDemux: true,
          canMux: true,
          description: "Lavfi",
        };
        cb(err, { ...data, lavfi });
      });
    };
  }

Checklist

  • I have read the FAQ
  • I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
  • I have included full stderr/stdout output from ffmpeg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions