0

Right now, I am running separate commands to reduce volume, add fade in at start and fade out audio at end, add silence to start and end of audio. How do I combine all these single command into one?

ffmpeg -y -i /home/music/memories.mp3 -filter:a "volume=0.5" -write_xing 0 /home/music/memories-volume.mp3
ffmpeg -y -i /home/music/memories-volume.mp3 -af "afade=in:st=0:d=5,afade=t=out:st=5:d=5" -write_xing 0 /home/music/memories-fade.mp3
ffmpeg -y -i /home/music/memories-fade.mp3 -af areverse,apad=pad_dur=5s,areverse -write_xing 0 /home/music/memories-silence-front.mp3
ffmpeg -y -i /home/music/memories-silence-front.mp3  -af apad=pad_dur=5s -write_xing 0 /home/music/memories-silence-end.mp3
2
  • You're already combiing multiple filters within some of your 4 command... Just add them to the same. Something like ffmpeg -y -i /home/music/memories.mp3 -filter:a "volume=0.5" -af "afade=in:st=0:d=5,afade=t=out:st=5:d=5,apad=pad_dur=5s" -write_xing 0 /home/music/memories-silence-end.mp3 Commented Jun 22, 2023 at 12:52
  • You could just concatenate the commands into one single line in CMD by using the & operator, or && depending on your needs. Alternatively, you could use multiple -map in a single FFMPEG command to select which input to send to which filter and output.
    – programmar
    Commented Jun 22, 2023 at 20:28

0

You must log in to answer this question.

Browse other questions tagged .