[FFmpeg-user] Concatenate several audio files with FFmpeg, how ?
Rodney Baker
rodney.baker at iinet.net.au
Fri Oct 19 02:52:50 CEST 2012
On Fri, 19 Oct 2012 04:17:56 PyProg PyProg wrote:
> Hello all,
>
> Is it possible to concatenate several audio files with FFmpeg ?, an how ?
>
> In this example I tried to do it but on arrival there was only the
> first audio file (second audio file is not present):
>
> [...snip...]
Try using -filter_complex with the concat filter, but note - you cannot do
stream copying with this; you must re-encode.
This is a working example that I used recently to concatenate 2x mp4 files and
re-encode to flv. You should be able to adjust the parameters accordingly but
I don't know if it will work with audio only. If it does, you'll need the -vn
switch to tell it that there is no video stream. The following is on one
single line:
ffmpeg -i <file_1> -i <file_2> -filter_complex concat=n=2:v=1:a=1 -vcodec flv1
-b:v 256k -acodec libmp3lame -b:a 128k <out_file>
Someone more familiar with the concat filter and filter_complex can probably
explain what each section does here. I'm not really sure - I just copied what
someone else had done.
HTH. YMMV.
Rodney.
--
==========================================================================
Rodney Baker VK5ZTV
rodney.baker at iinet.net.au
==========================================================================
More information about the ffmpeg-user
mailing list