node.jsffmpegfluent-ffmpeg

Fluent-FFMPEG : Is it possible to apply a volume filter only after a specific time has passed


I have the following code :

ffmpeg()
.addInput(videoFilepath)
.addInput(soundTrackFilepath)
.inputOptions("-stream_loop -1")
.outputOptions("-shortest")
.complexFilter([
    {
        filter: "volume",
        options: ["0.15"],
        inputs: "1",
    }
])

What i want is for this filter to only be applied let's say after 4s. Is it possible ?


Solution

  • Like @Баяр Гончикжапов mentioned. The correct way to apply the filter options was ["volume from 0 to 1", "enable=between(t, start_time, end_time)"]

    To apply the filter to multiple sections just use +