I tried a bunch of things and failed to be able to use input.alsa() for
this.  Just to close the loop on the thread, I did have success with
input.external and ended up with the config below.  Note that this script
is a little different but has the functionality I wanted to end up with.
 The real issue ended up being the liquidsoap Linux user's inability to
access the virtual ALSA sound device, but only with certain tools and not
others.  And yes, as noted earlier, the liquidsoap user is already a
(confirmed) member of the audio group.  Kind of a hack having to use sudo,
but sudo use is pretty limited.

Thanks again for all this functionality in LS - many ways to do things!

Thanks,
Dave

#!/usr/local/bin/liquidsoap -v
set("log.file.path", "/tmp/liquidsoap/log")

left = input.external("sudo /usr/local/bin/sox -q -t alsa pcm.channel3 -c 1
-r 44100 -t raw -",channels=1)
right = input.external("sudo /usr/local/bin/sox -q -t alsa pcm.channel4 -c
1 -r 44100 -t raw -",channels=1)

s = mux_mono(mono=left,right)

output.icecast(%mp3(samplerate=44100, bitrate=24, stereo=true),host="
xxx.xxxx.com",port=xxxx,password="xxxxx",mount="teststream",
icy_metadata="true", url="http://xxx.xxxx.com";, name="Test",
description="Test", fallible=true, public=false,s)


On Wed, Nov 14, 2012 at 11:41 AM, Romain Beauxis <[email protected]>wrote:

> Hi,
>
> 2012/11/14 Dave Pascoe <[email protected]>:
> > Thanks, Romain...somehow I have the syntax wrong for this.
> >
> > with...
> >
> > s = ((input.alsa(device="pcm.channel1"):source(1,0,0)))
> >
> > I get:
> >
> > At line 11, char 295:
> >   this value has type
> >     source(audio=1,...) (infered at line 9, char 21-43)
> >   but it should be a subtype of
> >     source(audio=2+_,...)
> >
> > I thought the mono/stereo mismatch would generate a different error than
> my
> > originally reported error, but if I can get the syntax right for this
> test I
> > can confirm whether the issue seems to be mono/stereo mismatch.
>
> The problem is probably that your use s as a stereo source in later
> parts of the script. For instance, this would not work:
>
> s = (input.alsa(device="pcm.channel1"):source(1,0,0))
>
> output.file(%mp3,"/path/to/file",s)
>
> This is because the %mp3 encoder expects stereo sources by default.
> Thus, you need to do:
>
> s = (input.alsa(device="pcm.channel1"):source(1,0,0))
>
> output.file(%mp3(channels=1),"/path/to/file",s)
> # or:
> # output.file(%mp3(mono),"/path/to/file",s)
>
> Romain
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to