Answers.Body: <p>What a fade out does is fade the volume from input level to 0 and then keep it at 0 for the rest of the track. Similarly, what a fade in does is fade the volume from 0 to input level and it mutes the volume from the start of the track upto the fade in start time.</p>
  
  <p>When you applied the fade in after the fade out, the 2nd fade filter is working with a muted track, so the fade is from 0 to 0. </p>
  
  <p>What you need to do is apply timeline editing to each fade filter so it operates from the start of its transition till the start of the next fade transition.</p>
  
  <p>So,</p>
  
  <pre><code>ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=5:d=2:enable='between(t\,0\,10)',afade=t=in:st=10:d=2:enable='gte(t\,10)'" ./output-file
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-14T19:54:57.087Z
Answers.LastActivityDate: 2019-10-14T19:54:57.087Z
Answers.UserDisplayName: Gyan
Body: <p>I'm debugging the command</p>
  
  <pre><code>ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=**5**:d=2" ./output-file
  </code></pre>
  
  <p>But if I try to run a new fadein, after the fadeout, it won't work. The sound doesn't come back.</p>
  
  <pre><code>ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=**5**:d=2,**afade=t=in:ss=**10**:d=2**" ./output-file
  </code></pre>
  
  <p>What's the right way to achieve this? Thank you.</p>
  
Tags: <ffmpeg><effects><command-line>
Title: Can't apply "fade in" after "fade out" (FFMPEG command line)
UserDisplayName: Adrian Lopez
ThreadText: # Can't apply "fade in" after "fade out" (FFMPEG command line)
  
  (Asked by: username_0 on 2019-10-14)
  
  I'm debugging the command
  
  ```
  ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=**5**:d=2" ./output-file
  
  ```
  
  But if I try to run a new fadein, after the fadeout, it won't work. The sound doesn't come back.
  
  ```
  ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=**5**:d=2,**afade=t=in:ss=**10**:d=2**" ./output-file
  
  ```
  
  What's the right way to achieve this? Thank you.
  
  **Tags:** ffmpeg, effects, command-line
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-10-14. Score: 3 | Accepted answer
  
  What a fade out does is fade the volume from input level to 0 and then keep it at 0 for the rest of the track. Similarly, what a fade in does is fade the volume from 0 to input level and it mutes the volume from the start of the track upto the fade in start time.
  
  When you applied the fade in after the fade out, the 2nd fade filter is working with a muted track, so the fade is from 0 to 0.
  
  What you need to do is apply timeline editing to each fade filter so it operates from the start of its transition till the start of the next fade transition.
  
  So,
  
  ```
  ffmpeg -i ./input-file.mp3 -af "afade=t=out:st=5:d=2:enable='between(t\,0\,10)',afade=t=in:st=10:d=2:enable='gte(t\,10)'" ./output-file
  
  ```
  
  
  ---
  
  