[FFmpeg-user] How can I concat a video and audio to a longvideo?

v dferererer at qq.com
Sun May 25 11:47:44 CEST 2014

Thank you Jeff,but this is not my case. I really need is indeed concat.I have a video file with video and audio streams,I need to play a period of sound after the video,while the video pauses when it played.
 Any idea?

 ------------------ Original ------------------
  From:  "Jeff";<darkmoon at verizon.net>;
 Date:  Fri, May 23, 2014 05:09 PM
 To:  "ffmpeg-user"<ffmpeg-user at ffmpeg.org>; 
 Subject:  Re: [FFmpeg-user] How can I concat a video and audio to a longvideo?


As seen from lists.FFmpeg-user,
On Wed, 21 May 2014 13:17:13 +0800, "v" <dferererer at qq.com> wrote:

>I need to concat a video and audio to get a longer video,I have try -i 
>concat:"v.mp4|a.m4a' and -f concat -i concat.lst,but the result video 
>is not ok.
> Any help?Thank you very much!

Based on your sample file names, I am going to take a shot in near 
darkness and guess that what you really want to do is mux separate 
video and audio streams together into a (complete) video. This 
assumes that v.mp4 contains a video stream, a.m4a contains an audio 
stream, and that the two streams are the same duration so that the A/V 
will come out in sync:

$ ffmpeg -i v.mp4 -i a.m4a -c copy video.mp4

Alternatively, v.mp4 may already be a complete video, and what you want 
to do is replace the existing audio stream with the audio contained in 
'a.m4a '. In that case:

$ ffmpeg -i v.mp4 -i a.m4a -map 0:v -map 1:a -c copy video.mp4

Hope that helps.

ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org

More information about the ffmpeg-user mailing list