3

I'm trying to cut and fade out the last 4 seconds of a mp3 file:

avconv -i SPEX_pilot_02.mp3 -t 0:0:25 -filter:a fade=t=out:st=21:d=4 preteach-words.mp3

There is no error, but there is no fade out effect applied. ):

My version is avconv 0.8.10-6:0.8.10-0ubuntu0.13.10.1

avconv -filters | grep fade gives me

fade             Fade in/out input video

On the Official LibAV documentation the fade filter is only listed in the video filters section and is using frames as parameters.

llogan
  • 121,796
  • 28
  • 232
  • 243
Andy
  • 4,783
  • 2
  • 26
  • 51

1 Answers1

5

avconv can do a video fade out, but doesn't appear to fade out audio. I'd recommend you use sox instead. The syntax is:

sox song.mp3 faded.mp3 fade 5 240 8

In this example, song.mp3 is your source, faded.mp3 is the output, 5 is the fade-in time (you can leave that at zero if you only need a fade out), 240 is the length of the audio, and 8 is the fade-out time. So, for your specific example, you would use:

sox SPEX_pilot_02.mp3 preteach-words.mp3 fade 0 25 4

Source: http://archive09.linux.com/feature/57897

Dan Jones
  • 1,337
  • 11
  • 22
  • Some people achieve the fadein/out effect with the ffmpeg volume filter. As avconv has the same filter, it is actually possible. It's a matter of adapting the expression. http://stackoverflow.com/a/26160103/344501 – jgomo3 Jan 09 '16 at 03:00
  • I gave up understanding how to do it with avconv. Now sox, I love you! (Not to mention some bugs Audacity have that won't play a normal mp3 file, and even crash.) – Rodrigo Oct 06 '17 at 05:04