Re: [ecasound] downsampling 44khz live jack input to 8khz

From: Sergei Steshenko <sergstesh@email-addr-hidden>
Date: Sun Aug 31 2008 - 16:05:22 EEST

--- On Sun, 8/31/08, Adeel N <adeeln@email-addr-hidden> wrote:

> From: Adeel N <adeeln@email-addr-hidden>
> Subject: [ecasound] downsampling 44khz live jack input to 8khz
> To: ecasound-list@email-addr-hidden
> Date: Sunday, August 31, 2008, 3:00 AM
> Hi,
> I have an m-audio usb mobilepre, and have JACK running at
> 16bit, 44.1khz stereo with no problems. I can even get
> ecasound to record from jack and do all the basic tasks, but
> I can't seem to find a way to take the 16bit 44.1khz
> input from JACK and get ecasound to output an 8khz mono
> (u-law) format. I've tried using the resample-hq method
> on the input & output, but to no avail. Using the
> command: ecasound -i jack_alsa -f 8,1,8000 -o mono.wav gets
> me an 8 bit, mono stream but at 44.1khz still. I can't
> seem to find any information on downsampling in linux, or
> even any program that can do it via CLI for that matter. If
> anyone could point me in the right direction it'd be
> greatly appreciated.
>
>
> Adeel
> _________________________________________________________________
> Get ideas on sharing photos from people like you. Find new
> ways to share.
> http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Ecasound-list mailing list
> Ecasound-list@email-addr-hidden
> https://lists.sourceforge.net/lists/listinfo/ecasound-list

There is a number of possibilities to do resampling in Linux,
'sox' and 'resample' programs, for example.

'mplayer' is capable of doing resampling too.

Oh, you should probably start from

libsamplerate-0.1.4 -> sndfile-resample :

"
install/libsamplerate-0.1.4/binsh/sndfile-resample --help

  A Sample Rate Converter using libsndfile for file I/O and Secret
  Rabbit Code (aka libsamplerate) for performing the conversion.
  It works on any file format supported by libsndfile with any
  number of channels (limited only by host memory).

       libsamplerate-0.1.4 (c) 2002-2008 Erik de Castro Lopo
       libsndfile-1.0.17

  Usage :
       sndfile-resample -to <new sample rate> [-c <number>] <input file> <output file>
       sndfile-resample -by <amount> [-c <number>] <input file> <output file>

  The optional -c argument allows the converter type to be chosen from
  the following list :

       0 : Best Sinc Interpolator
       1 : Medium Sinc Interpolator (default)
       2 : Fastest Sinc Interpolator
       3 : ZOH Interpolator
       4 : Linear Interpolator
".

Regarding ecasound - first try to resample without jack. If it works,
you can cascade two scasound instances through pipe - the left instance
will deal with jack and will output to stdout, the right instance will
read from stdin and will do resampling.

Regards,
  Sergei.

      

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Sun Aug 31 16:15:05 2008

This archive was generated by hypermail 2.1.8 : Sun Aug 31 2008 - 16:15:05 EEST