Mean seems to be the same as the simple maths concept:

"Produce mono audio by taking the mean of all audio channels."

So lets say a simplified volume scale of 1 - 10.

L Channel = 8
R Channel = 4

Mean = 6 so you would lose volume on that sample.

I had issues with source conversion when trying stereo = false. I just had an error saying expected source 1:0:0, got 2:0:0 (or something similar). It might have been something I did wrong or just something they improved in newer versions of liquidsoap.

Either way "mean" was the first way I found that worked acceptably so I stuck with it.

I'm not sure if stereo = false would mono'ise or just drop a channel so be careful if you have any tracks that rely on stereo vocals. Definitely worth testing either way.

Regards,

Wayne

On 2014-04-29 19:58, drew Roberts wrote:
On Tuesday 29 April 2014 13:18:37 Wayne Merricks wrote:
Hi,

Just a quick FYI, it looks like you have host and url the wrong way
around in your output.icecast line.

url is usually a link to your website thats put in the stream metadata.

Thanks.

A further point of discussion / learning on my part:

#liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
#liveMono = mean(liveStereo)

output.icecast(%mp3(stereo=false, samplerate=22050,
bitrate=32),liveStream, etc....

When I use the mean() line, volume goes way down.
When I skip that line but leave the stereo=false in the other line,
the stream
is still 1 channel but volume is better.

Thoughts?

Regards,

Wayne Merricks
The Voice Asia

all the best,

drew

On 29/04/14 18:17, drew Roberts wrote:
> On Monday 28 April 2014 18:02:51 Wayne Merricks wrote:
>> Easier than you think.
>>
>> pastebin.com/u/MezzFA0
>>
>> In there is a full guide for JACK, Rotter and Liquidsoap all with
>> startup scripts on Ubuntu
>
> Thanks, I will be looking at that closely and deciding if I need to > switch over to the way you are doing things or adapt what you are doing
> to the way I am doing things on this new box.
>
> Currently I am autologging in a user and running stuff from the
> ~/.config/autostart directory. With qjackctl running some things on start > and other things running in a screen setup that is also started in that
> whole chain.
>
>> or just this link for the liquid soap config:
>>
>> http://pastebin.com/ziNEKF03
>>
>> But the only things you need to do are:
>>
>> #Get an input stream (darkice auto grabs from line in if I remember
>> rightly so I'm assuming ALSA in):
>> liveStream = (input.alsa(id="liquidsoap"):source(1,0,0))
>
> Actually, iirc, darkice can do jack as well. The box I am moving from was > alsa based but the one it replaced was jack based. I moved to alsa years > ago when I needed to run two station streams on one box and could not > figure out how to make rotter log two stations on one box. I ended up > using darkice to do the logging but never liked it as much as the rotter
> way.
>
>> #id can be anything you want, source(1,0,0) is 1 audio, 0 video and 0
>> something else I've forgotten so this would be mono
>> #You might have to take the stereo stream with source(2,0,0) and then
>> mono it with:
>> #liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
>> #liveMono = mean(liveStereo)
>
> This is what I am doing now as a test on the new box:
>
> #!/usr/bin/liquidsoap
>
> #message =
> #  "The Savonet team thanks you for using liquidsoap, " ^
> #  "and we hope you'll enjoy it!"
>
> #set("jack.client_name","liquidsoap")
> set("log.file.path","/home/zloc/basic-radio.log")
>
>
> # We're 48k!
> set("frame.audio.samplerate",48000)
> # Grab JACK input
> # We don't do any fallback here; hardware silence detector is used to
> flip to a backup Rivendell system
> radio = mksafe(input.jack(id="liquidsoap"))
>
> output.icecast(%mp3(bitrate=128), host="localhost", port=8002,
> password="nopass",
> mount="zotz1.mp3", genre="Rockin", url="http://192.168.1.4:8002";,
> name="Rockin Rivendell 4", description="Rockin Rivendell 4",
> format="mp3", icy_metadata="true", radio)
>
>> #Here do any processing to the stream you want, you could silence
>> detect:
>> emergencyFile = mksafe(single("/var/audio/emergency/silentalarm.mp3")) >> #you need to obviously make and put a silentalarm.mp3 in that location
>> or somewhere else accessible
>> # Silence Detection, plays after 30 seconds of silence
>> liveStream = strip_blank(liveStream, length=30.0)
>>
>> #Tell it what to do when its silent (track_sensitive=true will wait for
>> the track to end before cutting back to the main stream):
>> liveStream = fallback(track_sensitive=false, [liveStream,
>> emergencyFile])
>>
>> #You could have a tracklist instead of an emergency file, you can even >> have a ruled tracklist that will play idents on the hour, pick random
>> songs from directories etc but I've never attempted that
>>
>> #Or how about compression:
>> liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
>> threshold=-20.0, knee=0.5, gain=8.0, liveStream)
>>
>> #What if you need a limiter:
>> liveStream = limit(ratio=3.0, attack=38.0, release=85.0,
>> threshold=-3.0,knee=0.5, liveStream)
>>
>> #Finally send it off to icecast
>> output.icecast(%mp3(stereo=false, samplerate=22050,
>> bitrate=32),liveStream, description="Describe me", genre="Give me a >> genre", url="My Website", name="Title Me", mount="what mount point to
>> use", host="localhost", password="my secret password", port=8014)
>>
>> Theres tons of sound processing you can do. You can even automate an >> entire DJ free station by setting up schedule rules and other stuff.
>> The full API is here:
>> http://savonet.sourceforge.net/doc-svn/reference.html
>>
>> But it is a bit cryptic, I still sit there smashing my face on the wall
>> when it should work but just doesn't.
>>
>> Oh you'll need to save this config in a file convention is blah.liq
>> then you can run liquidsoap /path/to/config/blah.liq
>>
>> You can also run liquidsoap -c /path/to/config/blah.liq to get it to
>> check your config and spew out any errors.
>>
>> Regards,
>>
>> Wayne
>>
>> On 2014-04-28 18:45, Rick wrote:
>>> interesting subject #finaly will work on this also next week and try
>>>
>>>
>>> https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsyst
>>>em s.com%2Fpipermail%2Frivendell-dev%2F
>>>
>>> drew Roberts schreef op 28-4-2014 19:45:
>>>> I know some of you folks know more than I do about liquidsoap.
>>>> Perhaps someone
>>>> can help. Anyone know how to match this darkice setup in liquidsoap:
>>>>
>>>> [icecast2-0]
>>>> bitrateMode     = cbr       # constant bit rate
>>>> format          = mp3       # format of the stream: mp3
>>>> bitrate         = 32       # bitrate of the stream sent to the
>>>> server
>>>> sampleRate      = 22050
>>>> channel         = 1
>>>> server          = localhost
>>>>                               # host name of the server
>>>> port = 8014 # port of the IceCast2 server, usually
>>>> 8000
>>>>
>>>> all the best,
>>>>
>>>> drew
>>>> _______________________________________________
>>>> Rivendell-dev mailing list
>>>> [email protected]
>>>> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
>>>
>>> _______________________________________________
>>> Rivendell-dev mailing list
>>> [email protected]
>>> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
>>
>> _______________________________________________
>> Rivendell-dev mailing list
>> [email protected]
>> http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev

Reply via email to