Re: [ecasound] resampling question

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] resampling question
From: Kai Vehmanen (k_AT_eca.cx)
Date: Wed Jan 08 2003 - 00:55:16 EET


On Thu, 26 Dec 2002, The Eye wrote:

> another question .. is there a way to resample a wav or raw file from,
> say, 48000 Hz to 44100 Hz using ecasound? or should I use sox for that
> or some such tool?

As mentioned in my previous mail, ecasound is not the best tool for this
job. This might change in the future (i.e. if support for libsamplerate is
added), but definitely not until I get 2.2.0 out.

> what I found in the manpage was to use something like
> ecasound -f:s16_le,2,44100 -i:resample,48000,in.wav -o:out.wav

Yup, this works, but the quality is not very good. Ecasound uses simple
linear interpolation, which is fast but poor quality. It's not so bad for
simple cases like 44100->22050 (division by 2), but for instance
48000->44100 will not sound nice. You can somewhat improve the results
by adding a lowpass filter (for 48000->44100, add -efl:22050), but that
won't do miracles.

> is this just technically not possible (but then, how do they do it when
> they transfer Music from DAT to CD?), am I doing something wrong, or is

Certainly possible, just computationally heavy. The recently released
libsamplerate [1] aims to bring high-quality resampling to all FOSS apps.

[1] http://www.mega-nerd.com/SRC/

-- 
 http://www.eca.cx
 Audio software for Linux!


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jan 08 2003 - 00:50:02 EET