Discussion:
[RDD] OT: darkice and liquidsoap configs
drew Roberts
2014-04-28 17:45:29 UTC
Permalink
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
Rick
2014-04-28 17:45:57 UTC
Permalink
interesting subject #finaly will work on this also next week and try

https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsystems.com%2Fpipermail%2Frivendell-dev%2F
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
Wayne Merricks
2014-04-28 22:02:51 UTC
Permalink
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

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))

#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)

#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
Post by Rick
interesting subject #finaly will work on this also next week and try
https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsystems.com%2Fpipermail%2Frivendell-dev%2F
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
David Klann
2014-04-29 03:44:25 UTC
Permalink
Wayne,

This is an amazing set of liquidsoap/jack/rotter stuff. I wasn't aware
of the rotter utility, I simply have a separate output "clause" for
archives in the liquidsoap script. I'm going to look into using JACK for
input/output for monitoring the stream more easily.

I've recently discovered the magic of "clocks" in liquidsoap. The way I
understand them is that they enable multiple outputs that are timed
independently of each other. In our example (see below) I'm sending the
output to 1) our Internet stream, 2) a local instance of Icecast, and 3)
an hourly-rotating archive file. I noticed in the past that the
reliability of the internet connection would affect the other streams. I
believe using clocks has fixed this situation.

I've pasted my "stream encoder" script for another liquidsoap example at
http://pastebin.com/sRVDC6SP (the last clause in the script is the
hourly rotation to the local archive).

Cheers,

~David Klann
Post by Wayne Merricks
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
Post by Wayne Merricks
http://pastebin.com/ziNEKF03
#Get an input stream (darkice auto grabs from line in if I remember
liveStream = (input.alsa(id="liquidsoap"):source(1,0,0))
#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
Post by Wayne Merricks
#You might have to take the stereo stream with source(2,0,0) and then
#liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
#liveMono = mean(liveStereo)
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
Post by Wayne Merricks
# 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
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
Post by Wayne Merricks
liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
threshold=-20.0, knee=0.5, gain=8.0, liveStream)
Post by Wayne Merricks
liveStream = limit(ratio=3.0, attack=38.0, release=85.0,
threshold=-3.0,knee=0.5, liveStream)
Post by Wayne Merricks
#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)
Post by Wayne Merricks
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.
Post by Wayne Merricks
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.
Post by Wayne Merricks
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
Post by Wayne Merricks
You can also run liquidsoap -c /path/to/config/blah.liq to get it to
check your config and spew out any errors.
Post by Wayne Merricks
Regards,
Wayne
Post by Rick
interesting subject #finaly will work on this also next week and try
https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsystems.com%2Fpipermail%2Frivendell-dev%2F
Post by Wayne Merricks
Post by Rick
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
drew Roberts
2014-04-29 17:17:10 UTC
Permalink
Post by Wayne Merricks
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.
Post by Wayne Merricks
http://pastebin.com/ziNEKF03
#Get an input stream (darkice auto grabs from line in if I remember
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.
Post by Wayne Merricks
#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
#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)
Post by Wayne Merricks
#Here do any processing to the stream you want, you could silence
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
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
liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
threshold=-20.0, knee=0.5, gain=8.0, liveStream)
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.
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
Post by Rick
interesting subject #finaly will work on this also next week and try
https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsystem
s.com%2Fpipermail%2Frivendell-dev%2F
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
--
This is drew's personal email account and is not related to Tribune Radio Ltd.
Wayne Merricks
2014-04-29 17:18:37 UTC
Permalink
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.

Regards,

Wayne Merricks
The Voice Asia
Post by drew Roberts
Post by Wayne Merricks
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.
Post by Wayne Merricks
http://pastebin.com/ziNEKF03
#Get an input stream (darkice auto grabs from line in if I remember
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.
Post by Wayne Merricks
#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
#liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
#liveMono = mean(liveStereo)
#!/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)
Post by Wayne Merricks
#Here do any processing to the stream you want, you could silence
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
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
liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
threshold=-20.0, knee=0.5, gain=8.0, liveStream)
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.
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
Post by Rick
interesting subject #finaly will work on this also next week and try
https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsystem
s.com%2Fpipermail%2Frivendell-dev%2F
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
drew Roberts
2014-04-29 18:58:50 UTC
Permalink
Post by Wayne Merricks
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?
Post by Wayne Merricks
Regards,
Wayne Merricks
The Voice Asia
all the best,

drew
Post by Wayne Merricks
Post by drew Roberts
Post by Wayne Merricks
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.
Post by Wayne Merricks
http://pastebin.com/ziNEKF03
#Get an input stream (darkice auto grabs from line in if I remember
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.
Post by Wayne Merricks
#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
#liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
#liveMono = mean(liveStereo)
#!/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)
Post by Wayne Merricks
#Here do any processing to the stream you want, you could silence
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
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
liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
threshold=-20.0, knee=0.5, gain=8.0, liveStream)
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.
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
Post by Rick
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
Post by drew Roberts
I know some of you folks know more than I do about liquidsoap. Perhaps someone
[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
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
--
This is drew's personal email account and is not related to Tribune Radio Ltd.
Wayne Merricks
2014-04-29 23:35:42 UTC
Permalink
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
Post by drew Roberts
Post by Wayne Merricks
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.
#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?
Post by Wayne Merricks
Regards,
Wayne Merricks
The Voice Asia
all the best,
drew
Post by Wayne Merricks
Post by drew Roberts
Post by Wayne Merricks
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
Post by drew Roberts
switch over to the way you are doing things or adapt what you are
doing
Post by drew Roberts
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
Post by drew Roberts
and other things running in a screen setup that is also started in
that
Post by drew Roberts
whole chain.
Post by Wayne Merricks
http://pastebin.com/ziNEKF03
#Get an input stream (darkice auto grabs from line in if I
remember
Post by drew Roberts
Post by Wayne Merricks
liveStream = (input.alsa(id="liquidsoap"):source(1,0,0))
Actually, iirc, darkice can do jack as well. The box I am moving
from was
Post by drew Roberts
alsa based but the one it replaced was jack based. I moved to alsa
years
Post by drew Roberts
ago when I needed to run two station streams on one box and could
not
Post by drew Roberts
figure out how to make rotter log two stations on one box. I ended
up
Post by drew Roberts
using darkice to do the logging but never liked it as much as the
rotter
Post by drew Roberts
way.
Post by Wayne Merricks
#id can be anything you want, source(1,0,0) is 1 audio, 0 video
and 0
Post by drew Roberts
Post by Wayne Merricks
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
Post by drew Roberts
Post by Wayne Merricks
#liveStereo = (input.alsa(id="liquidsoap"):source(2,0,0))
#liveMono = mean(liveStereo)
#!/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
Post by drew Roberts
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)
Post by Wayne Merricks
#Here do any processing to the stream you want, you could silence
emergencyFile =
mksafe(single("/var/audio/emergency/silentalarm.mp3"))
Post by drew Roberts
Post by Wayne Merricks
#you need to obviously make and put a silentalarm.mp3 in that
location
Post by drew Roberts
Post by Wayne Merricks
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
Post by drew Roberts
Post by Wayne Merricks
liveStream = fallback(track_sensitive=false, [liveStream,
emergencyFile])
#You could have a tracklist instead of an emergency file, you can
even
Post by drew Roberts
Post by Wayne Merricks
have a ruled tracklist that will play idents on the hour, pick
random
Post by drew Roberts
Post by Wayne Merricks
songs from directories etc but I've never attempted that
liveStream = compress(ratio=3.0, attack=38.0, release=85.0,
threshold=-20.0, knee=0.5, gain=8.0, liveStream)
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
Post by drew Roberts
Post by Wayne Merricks
genre", url="My Website", name="Title Me", mount="what mount
point to
Post by drew Roberts
Post by Wayne Merricks
use", host="localhost", password="my secret password", port=8014)
Theres tons of sound processing you can do. You can even
automate an
Post by drew Roberts
Post by Wayne Merricks
entire DJ free station by setting up schedule rules and other
stuff.
Post by drew Roberts
Post by Wayne Merricks
http://savonet.sourceforge.net/doc-svn/reference.html
But it is a bit cryptic, I still sit there smashing my face on
the wall
Post by drew Roberts
Post by Wayne Merricks
when it should work but just doesn't.
Oh you'll need to save this config in a file convention is
blah.liq
Post by drew Roberts
Post by Wayne Merricks
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
Post by drew Roberts
Post by Wayne Merricks
check your config and spew out any errors.
Regards,
Wayne
Post by Rick
interesting subject #finaly will work on this also next week and
try
https://www.google.nl/#q=liquidsoap+site:http:%2F%2Fcaspian.paravelsyst
Post by drew Roberts
Post by Wayne Merricks
Post by Rick
em s.com%2Fpipermail%2Frivendell-dev%2F
Post by drew Roberts
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
[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
Post by drew Roberts
Post by Wayne Merricks
Post by Rick
Post by drew Roberts
8000
all the best,
drew
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
Post by drew Roberts
Post by Wayne Merricks
Post by Rick
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
Rob Landry
2014-04-30 17:16:20 UTC
Permalink
Post by Wayne Merricks
"Produce mono audio by taking the mean of all audio channels."
That's effectively the same as the sum of left and right, which is how we
derive mono from stereo in the analog world. Dividing by a constant merely
changes the level.
Post by Wayne Merricks
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.
I was in an apocalyptic mood one day, so I used Audacity to create a test
audio cut consisting of 666 Hz on the left channel and 777 Hz on the
right. Most of the AM stations I deal with want to stream their audio in
stereo, but their transmitted signals are mono. If I put even a little of
the test cut on the air, I can tell immediately whether I'm hearing the
sum of left and right or just one or the other.


Rob

Loading...