[nas] Re: help with using sox with nas

Tobias Diedrich ranma at gmx.at
Mon Oct 7 21:17:50 MDT 2002


sibusiso xolo wrote:

> 1) I tried running xawtv  with the following command;
> 
> xawtv  LD_PRELOAD=libaudiooss.so AUDIOSERVER=remotenasserver:0 sox -t raw -r 
> 44100 -c 2 -w -s - -t ossdsp /dev/dsp
> 
> and I get the response  station "-" not found.  if  I start xawtv with  
> -station=n  or started with  -C  -|  before LD_preload   the error disappears 
> but I still  get no sound on the nas server. (Sound only on the  local 
> machine)  (I also tried  changing to mono -r 8000  -c 1 with the same 
> results.) 

It's a wonder it did not complain about the unknown options
parameters "LD_PRELOAD=libaudiooss.so", "AUDIOSERVER=remotenasserver:0",
"sox", "-t", "raw", "-r", "44100", "-c", "2", "-w", "-s", "ossdsp" and
"/dev/dsp"...

I will now assume you are using bash or another sh-compatible shell...

If you want to have it in one line, you have to use the shell keywords
";" and "&" to separate the two commands, with those you can write
combine the two lines

  cmd1
  cmd2

to

  cmd1; cmd2

With the ampersand (&) you can start a command in the background, so
because xawtv only terminates when you close it, you'd have to use:

xawtv &; LD_PRELOAD=libaudiooss.so AUDIOSERVER=remotenasserver:0 sox -t raw -r 44100 -c 2 -w -s - -t ossdsp /dev/dsp

"&;" may be abbreviated to just "&".

> 2) I then tried  your suggested command  
> 
> LD_PRELOAD= sox -w -s -c 2 -r 44100 -t ossdsp /dev/dsp -t raw - |  
> LD_PRELOAD=libaudiooss.so sox -t raw -w -s -c 2 -r 44100 - -t ossdsp
>  /dev/dsp
> 
> I inserted AUDIOSERVER=remotenasserver:0.0 after libausiooss.so 
> (a) the above command  with  xawtv -C  after the first instance of raw and    
> the response was as in (1)  above.

Again, you cannot just add a a shell command at arbitrary positions in
the command line. If you really literally entered the command like you
described above, I also doubt the error msg was like in (1) above.

Rather I'd expect it to be similar to this one:

|ranma at melchior:~$ LD_PRELOAD= sox -w -s -c 2 -r 44100 -t ossdsp /dev/dsp -t raw xawtv -C - | LD_PRELOAD=libaudiooss.so sox -t raw -w -s -c 2 -r 44100 - -t ossdsp /dev/dsp
|sox: Known effects: avg band bandpass bandreject chorus compand copy
|dcshift deemph earwax echo echos fade filter flanger highp highpass lowp
|lowpass map mask pan phaser pitch polyphase rate resample reverb reverse
|silence speed stat stretch swap synth trim vibro vol
|
|sox: Effect '-C' is not known!

> (I get the same response in every case whether I define  the sound card  with 
> xawtv  -C /dev/dsp (or as  above with sox)  or  with  -C  /dev/video (i.e. 
> sound card disconnected  from the line-out of  the bt848 card).

xawtv only uses the dsp device when you record the video to disk, also
"-C /dev/video" will not work because /dev/video is not a dsp device.

I can only repeat my advice regarding your mixer settings, here is a
similar quote from /usr/share/doc/xawtv/README.recording.gz:

|Recording movies
|================
|
|
|Audio
|=====
|
|If you don't get sound when recording avi movies, double-check the
|mixer settings first.  The record source defaults to micro on many
|linux sound drivers, you probably have to change this to line-in with
|one of the available mixer tools.  Some sound cards have a separate
|input gain control which needs to be set to some approximate value.
|Also keep in mind that ALSA has all mixer controls at 0 (i.e. muted)
|by default.
|
|/me uses kmix (because it doesn't need much space on the screen).
|The inputs where the sound cards record from have a red background
|color.  With the right mouse botton you'll get a menu where you can
|change the settings.  FreeBSD has a aumix version with X11 GUI in
|the ports collection which is very nice too (aumix-gtk in debian).
|
|If you want to see something while playing with the mixer settings you
|can use the record utility (ncurses terminal application, in the tools
|subdirectory), it has a nice input level meter.  motv has one build-in
|too (Menu -> Tools -> Record level monitor).
|
|Note on stereo:  xanim seems not be able to playback stereo sound
|correctly.

Make sure recording of your TV-Cards sound works locally.
If it doesn't work locally it won't work over the network either.

Hoping to help (and I'm hoping my english is understandable enough, I
think I sometimes have problems to properly describe what I mean),

-- 
Tobias								PGP: 0x9AC7E0BC
This mail is made of 100% recycled bits



More information about the Nas mailing list