1

I am trying to dynamically change the bass of an audio file as a function of time. For instance, say I would like to gradually increase the bass over a period of 5 seconds. The command I am using is

ffmpeg -y -i in.wav -af \
    "bass=g='if(lte(t,5),-20+(20/5)*t,0)':width_type=q:w=0.70" \
    out.wav

However I am receiving the error

[bass @ 0x19890c0] [Eval @ 0x7ffd8e143630] Unknown function in 't,5),-20+(20/5)*t,0)'

As a second attempt, I instead tried to use min instead of lte, the command being

ffmpeg -y -i in.wav -af \
    "bass=g='min(-20+20*t/5,0)':width_type=q:w=0.70" \
     out.wav

but got a slightly different error

[bass @ 0x263d040] [Eval @ 0x7fff0c8e7dc0] Invalid chars '(-20+20*t/5,0)' at the end of expression 'min(-20+20*t/5,0)'
Shaun
  • 480
  • 6
  • 10
  • 2
    gain only accepts numbers (float), not exprs. – Gyan Aug 23 '18 at 19:35
  • @Gyan hmmmm I was afraid of that. So no way to have it change continuously with time? Also how did you know that? I had trouble finding it in the documentation. – Shaun Aug 23 '18 at 19:37
  • I checked the source. Can't think of a filter that takes exprs for this. – Gyan Aug 23 '18 at 19:45

0 Answers0