[asterisk-users] merge gsm files
Mojo with Horan & Company, LLC
mojo at horanappraisals.com
Thu Dec 20 12:54:16 CST 2007
Tzafrir Cohen wrote:
> On Tue, Dec 11, 2007 at 11:26:21PM +0800, Rilawich Ango wrote:
>
>> Hi,
>> How can I merge 2 gsm files into a single file? I have tried to use
>> soxmix as below but failed.
>> soxmix 1.gsm 2.gsm 1-2.gsm
>>
>
> The GNU coreutils are shipped with a special[1] tool for this task:
>
> cat 1.gsm 2.gsm >1-2.gsm
>
> [1] Honestly, it is special. I bet the BSD cat can't do that. And I bet
> that the busybox one can't do that either.
>
>
I thought he meant mix so they play simultaneously, not concatenate them
together.
To clarify Tzafrir's comment a little, I think that 'cat' will only work
for sound files if all involved are headerless. I'm not 100% sure which
ones are and which ones aren't headerless, but generally, this shouldn't
work for a standard wave file. An image showing WHY it won't work can
be found at http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/
Keep in mind that some files that were once headerless, like .au, can
now be found with six 32-bit words prepended as a header, sort of a
'new' .au format. These would NOT be concatenatable either, unless
those first words were stripped from the second file. Further, the
first file would need its third 32-bit word modified to either
0xffffffff or the actual *new* size of the data in bytes.
Sorry, but I can't help with mixing them rather than concatenating them :)
Mojo
More information about the asterisk-users
mailing list