[FFmpeg-user] Concatenating two audio files

Stuart Bruce stuartrbruce at gmail.com
Sat Aug 2 15:16:51 CEST 2014


This solution (making sure both files are PCM) worked first time, thank you
very much for your help.

Thanks also to the other people who responded. To tidy up loose ends about
the thread:
For various reasons I was trying to avoid the necessity for an FFmpeg
update or installing SoX unless absolutely necessary, because the older
version of FFmpeg is already deployed on the intranet here on which the
tool will be run- this was purely for convenience.
Reducing the parameters to a simpler "-filter_complex concat", as Carl
said, unfortunately did not work when I tried it, but this PCM solution has
cracked it so I am using this happily now.

Thanks again to everyone who helped.

Stuart


On 31 July 2014 12:40, Anatol <anatol2002 at gmail.com> wrote:

> Turn your WAV files into raw PCM files -
> ffmpeg -i INPUT1 -c:a copy -vn -f s16le -y PCM1
>
> Then u can either cat them together to get a raw PCM file or use ffmpeg
> concat protocol:
> ffmpeg -ar SAMPLE_RATE -channel_layout STEREO/MONO -f s16le -i
> concat:"PCM1|PCM2|..." -vn -c:a copy -f wav -y OUTPUT
>
>
> On Thu, Jul 31, 2014 at 1:47 PM, Stuart Bruce <stuartrbruce at gmail.com>
> wrote:
>
> > Hello
> >
> > I've been trying to get FFmpeg to concatenate two audio files together,
> > based on the top answer from this forum:
> >
> >
> http://superuser.com/questions/587511/concatenate-multiple-wav-files-using-single-command-without-extra-file
> >
> > Although I believe I've replicated the winning answer, I can't seem to
> work
> > out what the correct syntax is to make it work.
> >
> > My log output (original parameters and console output) is below. For
> > security I've had to change all the actual file paths to '********' but
> all
> > the paths and files are valid.
> >
> > I'm hoping somebody could point me to the problem, which I'm hoping is
> > something as simple as having a quote mark out of place or something like
> > that. Any help would be very much appreciated.
> >
> > Thanks
> >
> > Stuart
> >
> >
> > FFmpeg process log.
> > Started: 31/07/2014 11:45:59
> > exe:
> > C:\Users\Stuart\*******\FFmpeg\ffmpeg.exe
> > Arguments:
> > -i
> > "C:\Users\Stuart\AppData\*********\cache\310714_3Vc1AQqWBXtqimH5Sj1j.wav"
> > -i
> >
> "C:\Users\Stuart\AppData\**********\cache\310714_bGhog6vOWMmn8x4J8ADz.wav"
> > -filter_complex '[0:0][1:0]concat=n=2:v=0:a=1[out]' -map [out]
> > "C:\Users\Stuart\******\s-tk-220-00200.wav"
> > FFmpeg output:
> > ffmpeg version N-53868-gc51654f Copyright (c) 2000-2013 the FFmpeg
> > developers
> >   built on Jun  6 2013 03:00:45 with gcc 4.7.3 (GCC)
> >   configuration: --enable-gpl --enable-version3 --disable-w32threads
> > --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
> > --enable-gnutls --enable-iconv --enable-libass --enable-libbluray
> > --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc
> > --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
> > --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
> > --enable-librtmp --enable-libschroedinger --enable-libsoxr
> > --enable-libspeex --enable-libtheora --enable-libtwolame
> > --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
> > --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
> > --enable-zlib
> >   libavutil      52. 35.100 / 52. 35.100
> >   libavcodec     55. 15.100 / 55. 15.100
> >   libavformat    55.  8.102 / 55.  8.102
> >   libavdevice    55.  2.100 / 55.  2.100
> >   libavfilter     3. 75.101 /  3. 75.101
> >   libswscale      2.  3.100 /  2.  3.100
> >   libswresample   0. 17.102 /  0. 17.102
> >   libpostproc    52.  3.100 / 52.  3.100
> > Guessed Channel Layout for  Input Stream #0.0 : mono
> > Input #0, wav, from
> >
> 'C:\Users\Stuart\*****************\cache\310714_3Vc1AQqWBXtqimH5Sj1j.wav':
> >   Metadata:
> >     encoder         : Lavf55.8.102
> >   Duration: 00:00:04.18, bitrate: 705 kb/s
> >     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
> mono,
> > s16, 705 kb/s
> > [wav @ 00353400] max_analyze_duration 5000000 reached at 5015510
> > microseconds
> > [wav @ 00353400] Estimating duration from bitrate, this may be inaccurate
> > Guessed Channel Layout for  Input Stream #1.0 : stereo
> > Input #1, wav, from
> > 'C:\Users\Stuart\**********\cache\310714_bGhog6vOWMmn8x4J8ADz.wav':
> >   Duration: 00:00:05.20, bitrate: 1411 kb/s
> >     Stream #1:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz,
> > stereo, s16, 1411 kb/s
> > [AVFilterGraph @ 0035bd80] No such filter:
> > '[0:0][1:0]concat=n=2:v=0:a=1[out]'
> > Error configuring filters.
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list