Here is my current command :
ffmpeg -i [videoFilepath] -i [musicFile] -stream_loop -1 -shortest -filter_complex "[1]volume=0.15:enable=between(t\,4\,10)+between(t\,14\,20)[a1];[0:a][a1]amix=inputs=2" -map 0:v:0 [outputFilepath]
What it does :
- Takes a video file as an input
- Takes a music file as an input
- Loops the music if it is shorter than the video duration
- If the music is longer, outputs a file the duration of the video
- Reduce volume by 85% between 4 and 10 seconds as well as between 14 and 20 seconds
- Mixes the 2 audio streams so we have both the original video audio non-filtered and the music with the volume filter
- Outputs a video file
I want the volume filter to ease-in and ease-out for a duration of 1 second, instead of abruptly changing. Is this possible ?