Click here to Skip to main content
15,936,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i have the following complex_filter in a fluent-ffmpeg function :
.complexFilter([
    {
        filter: "volume",
        options: [string], 
        inputs: "1",
        outputs: 'audio',
        eval: 'frame'
    },
    {
        filter: "amix",
        options: 'inputs=2',
        inputs: ["0:a", "audio"]
    }
])


Inside string i have : "if(between(t,6,12.6)+between(t,16.6,29.8)+between(t,33.8,44),0.15,if(between(t,5,6),0.15/(6-5)*(t-5),if(between(t,15.6,16.6),0.15/(16.6-15.6)*(t-15.6),if(between(t,32.8,33.8),0.15/(33.8-32.8)*(t-32.8),if(between(t,12.6,13.6),0.15/(13.6-12.6)*(13.6-t),if(between(t,29.8,30.8),0.15/(30.8-29.8)*(30.8-t),if(between(t,44,45),0.15/(45-44)*(45-t))))))))"

What my function does : It takes in a video and a music. It adds the music in the background and at certain timestamps it lowers the volume over 1s to 15% then stays at 15% for a while and finally it goes back up to 15%. And it does so 3 times.

I get the following error :
Quote:
Error: ffmpeg exited with code 1: Error initializing complex filters.
Invalid argument


What I have tried:

I've checked the number of parantheses and the syntax comes from this post : video.stackexchange.com that i have converted to fluent-ffmpeg.
Posted
Comments
Richard MacCutchan 5-Jun-23 6:14am    
Try asking the person on SE that gave you the answer.
Nobunaji 5-Jun-23 6:33am    
Already did but they're pretty slow. Also their answer were using basic ffmpeg which is why i also asked on a programmation forum.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900