[FFmpeg-user] wav concat woes
gliese849b at gmail.com
Mon Apr 28 08:24:14 CEST 2014
On Mon, Apr 28, 2014 at 5:49 AM, Tim Hiles <thiles at confex.com> wrote:
>> > On Fedora 20, trying to concatenate a set of wav files.
>> > cat 01_list.txt
>> > file '01/01.01_test.wav'
>> > file '01/01.02_test.wav'
>> > file '01/01.03_test.wav'
>> > file '01/01.04_test.wav'
>> > ffmpeg -f concat -i 01_list.txt -vn -c:a libfdk_aac -profile:a aac_he
>> > -b:a 48k -ac 1 -signaling implicit test2.m4a 2> ffmpeg.out
>> > And I can run the command on each individually.
>> > Any help appreciated.
> I will preface my comment by saying I'm not sure if this breaks ffmpeg
> email list rules by suggesting this, so my apologies in advance if I'm not
> supposed to.
> I used ffmpeg for almost every video encoding and some audio encoding as
> well. Occasionally I will need to use opensource command line software
> called sox. I'm not endorsing, I'm not on their team, nor a friend of
> anyone on the team, etc. Just mentioning another tool to use.
> According to the sox documentation you can use example below to concatenate.
> sox −m music.mp3 voice.wav mixed.flac
Yes, I was awatre of sox,
I'm sure it breaks no rules to mention it. Sox has a dfferent remit.
> As far as I am aware, conjoining .wav files is not that simple. While
>> cat joins the files together, it doesn't take into
>> account the RIFF header at the beginning of each one. Thus you get a
>> combined file that thinks it is only as long
>> as the first sample in the list. You either need a program that can
>> join them correctly for you, or you take the headers
>> into account when joining them, and adjust the parameters of the
>> resulting file accordingly.
> I won't dispute what Chris said at all because it maybe be true with ffmpeg
> but I did ffprobe on the resulting file I got and got this:
I was specifically targetting the quoted use of the cat command here,
cat does exactly what it says on the tin, i.e. joins files together.
cat does not diffentiate
between types of file, other than text and binary, and therefore has
of format of a wave file.
Same issue would surface for any other file with a similar header/data layout.
cat flash01.swf flash02.swf > flash_combined.swf
simply won't produce a usuable file.
More information about the ffmpeg-user