ffmpeg - how to merge multiple audio with time offset into a video?

Viewed 7918

I want to use FFMPEG to merege multiple audios and one video.

Materials are:

  1. two short audio clips (short-clip-1.3gp, short-clip-2.3gp),
  2. one video clip (1.mp4) with sound,
  3. and one audio clip (1.mp3) that has same duration as the video clip.

Requirement is:

  1. Remove video clip's sound
  2. add 1.mp3
  3. add short-clip-1.3gp at 0 sec timetamp, short-clip-2.3gp at 10 sec timestamp.

The requirement is depicted like below.

<--short-clip-1.3gp time duration--> <--short-clip-2.3gp time duration-->

<-------------------------------------- 1.mp3 ----------------------------------------------------->

<-------------------------------------- 1.mp4 ----------------------------------------------------->

The command I use is as below, but it does not work as expected. ffmpeg -i 1.mp4 -i 1.3gp -itsoffset 00:00:10 -i 2.3gp -i 1.mp3 -map 0:v -map 1:a -map 2:a -map 3:a -c:v copy -c:a copy result.mp4

Any hint is appreciated!

2 Answers
Related