[nas] Re: help with using sox with nas-piping sound

sibusiso xolo sibxol at b-vol.co.uk
Sat Oct 5 07:35:09 MDT 2002


Dave Richards wrote:
We have
> 400 NCD thin clients here with NAS, and have always thought it would be
> cool to build a tv server host, build a Linux system, with 4 PCI/WinTV
> cards and then be able to distribute them out to any of the 400
> terminals.

this depends on your network.  If you are using gigabit: fine.  at 100MBit,  
you will more than  struggle  with 4.  .
(perhaps you could have a go with 1 and let me know if you managed to get 
sound!)

Tobias Diedrich wrote:
>If the remote supports the XVideo extensions and your LAN is fast enough
>it should work. Maybe it even works without the XVideo extensions, but
>then you need even more bandwidth

This might also prove a useful link: http://www.MediaApplicationServer.net/

The above however seems to be more peer-to-peer  and require a heavier client.  
NAS/libaudioss  therefore  probably hase some potential   So here is my 
wishlist for  future extensions of NAS/libaudiooss:

a)  future extensions of libaudiooss be made that fragment size and number be 
set externally rather than recompiling the program
b) the use of  sox (or another sound conversin program)  to work with audio 
input from the  tv/radio card
c) ability to define multiple  audioservers  (on different ports)  to enable 
broadcasting
d) 44.1 kHz CD quality input to nas server

back to my pressing problem,  The difficulty I have is with the sound.
The suggestion of Tobias Diedrich namely:

>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   

does not work on the machines I have tried.  I have varied sound quality etc  
and I have recording  enabled on the line-input of the sound mixer of the 
client.  I expected the  execution of sox to hang in the terminal whilst it 
pipes sound but it  returns to command prompt  soon after  command execution.   
All  suggestion welcomed.
  
On Friday 04 October 2002 21:09, Dave Richards wrote:
> Okay all, I have to jump in here. ;)
>
>    I have always thought that it would be way cool to run Xawtv over to
> a remote display, but just assumed (maybe incorrectly) that it was doing
> a low level open of the local video card on the console and would not
> work on a remote display.   Are you saying that you are getting the
> video to go over there??   What does it look like if it works.  We have
> 400 NCD thin clients here with NAS, and have always thought it would be
> cool to build a tv server host, build a Linux system, with 4 PCI/WinTV
> cards and then be able to distribute them out to any of the 400
> terminals.
>
> Thanks for any info!
> Dave
>
> On Fri, 2002-10-04 at 17:24, sibusiso xolo wrote:
> > On Wednesday 02 October 2002 13:58, Tobias Diedrich wrote:
> > > sibusiso xolo wrote:
> > > > I am trying to route sound from a bt848 tv/radio card  (using v4l) to
> > > > a remote nas server:
> > >
> > > In this case it is not good to globally export the LD_PRELOAD line
> > > because this means libaudiooss is linked agains every app you start
> > > after that and it always tries to redirect accesses to /dev/dsp to the
> > > server.
> > > auplay does seem to have some problems with playing from stdin, but
> > > this should work:
> > >
> > > 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
> > >
> > > Here the first sox command is used without libaudiooss preloaded so
> > > that it will access your real soundcard and the second is used with
> > > libaudiooss preloaded so that the output will get redirected to the
> > > server.
> >
> > I  expected the above command when executed to  hang and allow the start
> > of xawtv in another terminal and the piping of sound.  There seems to be 
> > a delay needed in  the above command to allow resampling of the sound.  I
> > read the man page of sox  but the use of resample  is not
> > straightforward.  I would be grateful for  you suggestions .
> >
> > regards
> > sibu




More information about the Nas mailing list