<pre><code>ffmpeg -f concat -i playlist.txt $OTHER_OPTIONS
</code></pre>
<p>In playlist.txt, write this:</p>
<pre><code>file 'B'
file 'A'
inpoint &lt;start_of_extra_content&gt;
</code></pre>
<p>Would you like to know <a href="https://ffmpeg.org/ffmpeg-formats.html#concat-1" rel="nofollow noreferrer">more</a>?</p>

CC BY-SA 4.0
2021-08-04T18:32:46.663Z
2021-08-04T18:32:46.663Z
stribika
<p>Assuming the duration of B is X (in seconds), you would use</p>

<pre><code>ffmpeg -i A -i B -filter_complex "[0]volume=0:enable='lt(t,X)'[a];[a][1]amix=duration=first:dropout_transition=0,volume=2" out
</code></pre>

CC BY-SA 4.0
2019-03-18T06:49:14.540Z
2019-03-18T06:49:14.540Z
Gyan
<p>With audio files A and B:</p>

<p>A : <code>|--- Some content ---|--- Extra content --- |</code></p>

<p>B : <code>|--- Some content ---|</code></p>

<p>Assume the end of B is where the start of the extra content in A.</p>

<p>I want to append that extra content at the end of B.</p>

<p>Can I achieve this with some command line programs, such as ffmpeg?</p>

CC BY-SA 4.0
2019-03-18T05:40:27.743Z
Do you know the duration of B? Do the files have the same format/codec properties?
Gyan
CC BY-SA 4.0
2019-03-18T06:28:45.513Z
I think I could get the duration of B with some methods. A and B may or maybe in different codecs.
kit
<ffmpeg><audio>
Append part of the audio at the end of another audio
kit
# Append part of the audio at the end of another audio

(Asked by: username_0 on 2019-03-16)

With audio files A and B:

A : `|--- Some content ---|--- Extra content --- |`

B : `|--- Some content ---|`

Assume the end of B is where the start of the extra content in A.

I want to append that extra content at the end of B.

Can I achieve this with some command line programs, such as ffmpeg?

**Tags:** ffmpeg, audio

> **Comments:**
> **username_1**: Do you know the duration of B? Do the files have the same format/codec properties?  
> **username_0**: I think I could get the duration of B with some methods. A and B may or maybe in different codecs.  

---

## 2 answers

### Answer by username_2 on 2021-08-04. Score: 0

ffmpeg -f concat -i playlist.txt $OTHER_OPTIONS

In playlist.txt, write this:
file 'B'
file 'A'
inpoint 

Would you like to know more?


---

### Answer by username_1 on 2019-03-18. Score: 0

Assuming the duration of B is X (in seconds), you would use
ffmpeg -i A -i B -filter_complex "[0]volume=0:enable='lt(t,X)'[a];[a][1]amix=duration=first:dropout_transition=0,volume=2" out


---

