Liquidsoap Transcoder Relays

Post Reply
Author
Message
westjgames
Offline
Member
Posts: 37
Joined: Wed Feb 08, 2012 8:43 pm
IRCBot Version I Use: v5
IRCBot Platform: Linux/Ubuntu
Location: Australia
Contact:

Liquidsoap Transcoder Relays

Post by westjgames »

Alright. I previously posted on how to use Radiobot as a transcoder relay, but I found a much more efficient method that uses a different program: LiquidSoap.

You can grab it from here: http://savonet.sourceforge.net/

It's probably the best toolkit you can have for streaming, and it's capabilities far outstrip that of just being a relay, but you can discover those uses for yourself.

Alrighty, lets get started.

On DEBIAN-BASED systems:

Ubuntu allows you to install using aptitude:

Code: Select all

sudo apt-get update
sudo apt-get install liquidsoap

This should install all that you need. Some codecs, such as AAC+, may need further installation steps (see here: http://savonet.sourceforge.net/doc-svn/ ... rmats.html)

For RHEL/FEDORA and others:

You're going to need to build the software and codecs from source. See this for more information: http://savonet.sourceforge.net/download.html

Alrighty, now that we're installed, lets get started.

Setting up the script:

We need to have the script file put in the install folder of Liquidsoap. This is usually either /etc/liquidsoap, /etc/init.d/liquidsoap or /var/log/liquidsoap. In your terminal, change to that directory, and type the following:

Code: Select all

touch transcoder.liq
nano transcoder.liq
Now that we have nano open, type the following:

Code: Select all

url = "<SOURCE STREAM>"
input = mksafe(input.http(url))

output.shoutcast(
  %aacplus(channels=2, bitrate=<BITRATE>),
  host="<DESTIP>", port=<DESTPORT>, password="<PASSWORD>",
  input)
where <SOURCE STREAM> is your existing shoutcast server you want to relay, <BITRATE> is the desired transcoded bitrate, <DESTPORT> is the port of the destination Shoutcast server, <DESTIP is the destination IP and <PASSWORD> is the destination server password.

This will relay in AAC+ audio, which is a lot better than MP3 for low bandwidth. Good bitrates to use here are 96, 64 and 32.

Now, save the file, and quit to the terminal. You can now run the following command:
sudo /etc/init.d/liquidsoap start
Now you have a running relay up! This will run in daemon mode as a background application. If you aren't comfortable with editing files outside of home, you can place the file elsewhere (i.e /home/user/) and use the following command:

Code: Select all

liquidsoap -d /path/to/filename.liq
The program will run in daemon mode from the script you specified.

There you have it, a working transcoder!
http://fillydelphiaradio.net/
The best P0N-3 Music

Image

Post Reply