<p>Since you wish to alter effective length of the tag, skip the amovie looping and use the aloop filter after padding the audio to 10s. </p>

<pre><code>ffmpeg -i main.mp3 -filter_complex "amovie=tag.wav,asetpts=N/SR/TB,apad=whole_dur=10,aloop=-1:1M:0[tag]; [0][tag]amix=duration=shortest,volume=2" -vn tag-out.mp3
</code></pre>

CC BY-SA 4.0
2019-01-20T13:15:42.090Z
mentioned command is not working, Please check the following execution response.


r   Metadata:
      encoder         : Lavc56.26
[mp3 @ 0x1b59ee0] Estimating duration from bitrate, this may be inaccurate
[Parsed_apad_2 @ 0x1b73760] Option 'whole_dur' not found
[AVFilterGraph @ 0x1b4b460] Error initializing filter 'apad' with args 'whole_dur=10'
Error configuring filters.
root@bea [/home/petarandzic/public_html/media]#
manoj kumar
CC BY-SA 4.0
2019-01-20T13:47:55.483Z
You'll need a recent static git/snapshot build.
Gyan
CC BY-SA 4.0
2019-01-20T16:00:41.560Z
Thanks for your response, please check this this snapshot https://beatscentral.co/media/ffmpeg.png
manoj kumar
CC BY-SA 4.0
2019-01-20T16:25:20.917Z
That's version 2.6.8. Get a git build from https://johnvansickle.com/ffmpeg/
Gyan
CC BY-SA 4.0
2019-01-20T19:33:32.570Z
Thank you so much, provided command working fine as per my expectation but there is showing some error. can you please check this attached screen shot https://beatscentral.co/media/ffmpeg-3.png 

many thanks for your help.
manoj kumar
CC BY-SA 4.0
2019-01-21T03:54:22.363Z
Those errors in red just mean that some ID3 tag in the MP3 is malformed. Doesn't affect the audio.
Gyan
CC BY-SA 4.0
2019-01-19T12:49:58.513Z
2019-01-19T12:49:58.513Z
Gyan
<p>I am using following command to merge two audio file, which works fine.</p>

<pre><code>ffmpeg -i main.mp3 -filter_complex "amovie=tag.wav:loop=0,asetpts=N/SR/TB[tag]; [0][tag]amix=duration=shortest,volume=2" tag-out.mp3
</code></pre>

<p>But what I really need to do is repeat and delay 10 seconds the audio tag depending on the main song length. Also, the main song audio volume lowers while the audio tag plays.</p>

<p>Any ideas/help appreciated. Thanks.</p>

CC BY-SA 4.0
2019-01-19T04:45:18.633Z
This command already repeats the tag. What does delay 10 seconds mean - - the initial start time of the tag?
Gyan
CC BY-SA 4.0
2019-01-19T07:34:05.417Z
Yes, I want to play tag file after each 10 seconds like main audio file length is 50 seconds then tag file should be merge only 5 time on every 10 seconds of position.
manoj kumar
CC BY-SA 4.0
2019-01-19T11:48:40.993Z
@Gyan looking for your help --  thanks .
manoj kumar
<ffmpeg>
FFMPEG : Merging Two Audio Files
manoj kumar
# FFMPEG : Merging Two Audio Files

(Asked by: username_0 on 2019-01-18)

I am using following command to merge two audio file, which works fine.
ffmpeg -i main.mp3 -filter_complex "amovie=tag.wav:loop=0,asetpts=N/SR/TB[tag]; [0][tag]amix=duration=shortest,volume=2" tag-out.mp3

But what I really need to do is repeat and delay 10 seconds the audio tag depending on the main song length. Also, the main song audio volume lowers while the audio tag plays.
Any ideas/help appreciated. Thanks.

**Tags:** ffmpeg

> **Comments:**
> **username_1**: This command already repeats the tag. What does delay 10 seconds mean - - the initial start time of the tag?  
> **username_0**: Yes, I want to play tag file after each 10 seconds like main audio file length is 50 seconds then tag file should be merge only 5 time on every 10 seconds of position.  
> **username_0**: @username_1 looking for your help --  thanks .  

---

## 1 answers

### Answer by username_1 on 2019-01-19. Score: 0 | Accepted answer

Since you wish to alter effective length of the tag, skip the amovie looping and use the aloop filter after padding the audio to 10s. 
ffmpeg -i main.mp3 -filter_complex "amovie=tag.wav,asetpts=N/SR/TB,apad=whole_dur=10,aloop=-1:1M:0[tag]; [0][tag]amix=duration=shortest,volume=2" -vn tag-out.mp3

> **Comments:**
> **username_0**: mentioned command is not working, Please check the following execution response.   r   Metadata:       encoder         : Lavc56.26 [mp3 @ 0x1b59ee0] Estimating duration from bitrate, this may be inaccurate [Parsed_apad_2 @ 0x1b73760] Option 'whole_dur' not found [AVFilterGraph @ 0x1b4b460] Error initializing filter 'apad' with args 'whole_dur=10' Error configuring filters. root@bea [/home/petarandzic/public_html/media]#  
> **username_1**: You'll need a recent static git/snapshot build.  
> **username_0**: Thanks for your response, please check this this snapshot https://beatscentral.co/media/ffmpeg.png  
> **username_1**: That's version 2.6.8. Get a git build from https://johnvansickle.com/ffmpeg/  
> **username_0**: Thank you so much, provided command working fine as per my expectation but there is showing some error. can you please check this attached screen shot https://beatscentral.co/media/ffmpeg-3.png   many thanks for your help.  
> **username_1**: Those errors in red just mean that some ID3 tag in the MP3 is malformed. Doesn't affect the audio.  

---

