Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Mar 2003 17:10:51 -0600
From:      David Kelly <dkelly@HiWAAY.net>
To:        multimedia@FreeBSD.ORG
Subject:   Re: concatenating audio files
Message-ID:  <200303021710.51995.dkelly@HiWAAY.net>
In-Reply-To: <20030302191026.GA552@gicco.homeip.net>
References:  <20030302191026.GA552@gicco.homeip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 02 March 2003 01:10 pm, Hanspeter Roth wrote:
> Hello,
>
> is there a tool that can concatenate .wav files in batch mode
> (without GUI)?

As others have suggested, sox is a good starting point. Can use sox to 
convert to raw data, then cat the raw data files back into sox to 
reformat at .wav. Would require some scripting. When I have done it, 
was to add a pause at the begining. Simply insert nulls.

The .wav format allows multiple segments within a file, each with its 
own header. The headers describe sample rate, word size, encoding, 
number of channels, all the things needed to play the data. If the 
files you wish to join are at different sample rates or encodings then 
one will have to be resampled to the other's specifications. Sox can do 
this. But if you study the header formats and how to put multiple 
segments in the same file you could create a .wav file which 
automatically switches as needed.

To do so, you will have to write some code. But all you are doing is 
moving data from two files into one with no user interface so it 
shouldn't be very hard at all.

-- 
David Kelly N4HHE, dkelly@hiwaay.net
=====================================================================
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303021710.51995.dkelly>