Re: [ecasound] lossless conversion broken?

From: Kai Vehmanen <kvehmanen@email-addr-hidden>
Date: Wed Oct 27 2010 - 21:52:01 EEST


On Mon, 25 Oct 2010, Dan Muresan wrote:

> Mostly for peace of mind, yes, but there is a use case -- fixing the
> WAV header in files recorded by jackrec or arecord; such tools store
> zeros for the RIFF chunk-length fields, since they can't know in
> advance when the user will stop recording (by pressing Ctrl-C.)

hmm, that's actually a bug/feature in jackrec and arecord. I mean you can
record with ecasound and press ctrl-c at any time, and ecasound will
update the RIFF header before eventually exiting. And at least based on a
quick check, at least arecord does the proper thing if it receives ctrl-c.

Btw, ecasound will do a fast/forced exit if you issue ctrl-c multiple
times (then RIFF header might not be updated). But this is not the default
case (normal as in ctrl-c is business as usual when user wants to stop

As for fixing the headers, here's one hack to fix the header without
touching the PCM samples of a file at all:

echo "cs-connect" |ecasound -i null -o foo.wav -c

As ecasound opens outputs in update mode by default, this won't overwrite
foo.wav, but instead just opens and closes it. And as a side-effect
ecasound will also fix up the RIFF header when closing the file.

Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
Ecasound-list mailing list
Received on Thu Oct 28 00:15:01 2010

This archive was generated by hypermail 2.1.8 : Thu Oct 28 2010 - 00:15:02 EEST