CC-2397: Support output to Shoutcast

Simply added some config file variables and added the output type in
the liquidsoap script.
This commit is contained in:
Paul Baranowski 2011-06-20 17:34:16 -04:00
parent 4c09054dca
commit 1bb2e79a78
2 changed files with 55 additions and 33 deletions

View File

@ -1,46 +1,51 @@
########################################### ###########################################
# liquidsoap config file # # Liquidsoap config file #
########################################### ###########################################
###########################################
# Output settings #
###########################################
output_sound_device = false
output_icecast_vorbis = true
output_icecast_mp3 = false
output_shoutcast = false
########################################### ###########################################
# general settings # # Logging settings #
########################################### ###########################################
log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log" log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log"
log_level = 3 log_level = 3
########################################### ###########################################
# stream settings # # Icecast Stream settings #
########################################### ###########################################
icecast_host = "127.0.0.1" icecast_host = "127.0.0.1"
icecast_port = 8000 icecast_port = 8000
icecast_pass = "hackme" icecast_pass = "hackme"
########################################### # Icecast mountpoint names
# webstream mountpoint names #
###########################################
mount_point_mp3 = "airtime.mp3" mount_point_mp3 = "airtime.mp3"
mount_point_vorbis = "airtime.ogg" mount_point_vorbis = "airtime.ogg"
########################################### # Webstream metadata settings
# webstream metadata settings #
###########################################
icecast_url = "http://airtime.sourcefabric.org" icecast_url = "http://airtime.sourcefabric.org"
icecast_description = "Airtime Radio!" icecast_description = "Airtime Radio!"
icecast_genre = "genre" icecast_genre = "genre"
########################################### # Audio stream metadata for vorbis/ogg is disabled by default
#liquidsoap output settings # # due to a number of client media players that disconnect
########################################### # when the metadata changes to a new track. Some versions of
output_sound_device = false # mplayer and VLC have this problem. Enable this option at your
output_icecast_vorbis = true # own risk!
output_icecast_mp3 = false
#audio stream metadata for vorbis/ogg is disabled by default
#due to a large number of client media players that disconnect
#when the metadata changes to that of a new track. Some versions of
#mplayer and VLC have this problem. Enable this option at your
#own risk!
output_icecast_vorbis_metadata = false output_icecast_vorbis_metadata = false
###########################################
# Shoutcast Stream settings #
###########################################
shoutcast_host = "127.0.0.1"
shoutcast_port = 9000
shoutcast_pass = "testing"
# Webstream metadata settings
shoutcast_url = "http://airtime.sourcefabric.org"
shoutcast_genre = "genre"

View File

@ -58,8 +58,10 @@ end
if output_icecast_mp3 then if output_icecast_mp3 then
out_mp3 = output.icecast(%mp3, out_mp3 = output.icecast(%mp3,
host = icecast_host, port = icecast_port, host = icecast_host,
password = icecast_pass, mount = mount_point_mp3, port = icecast_port,
password = icecast_pass,
mount = mount_point_mp3,
fallible = true, fallible = true,
restart = true, restart = true,
restart_delay = 5, restart_delay = 5,
@ -70,11 +72,12 @@ if output_icecast_mp3 then
end end
if output_icecast_vorbis then if output_icecast_vorbis then
if output_icecast_vorbis_metadata then if output_icecast_vorbis_metadata then
out_vorbis = output.icecast(%vorbis, out_vorbis = output.icecast(%vorbis,
host = icecast_host, port = icecast_port, host = icecast_host,
password = icecast_pass, mount = mount_point_vorbis, port = icecast_port,
password = icecast_pass,
mount = mount_point_vorbis,
fallible = true, fallible = true,
restart = true, restart = true,
restart_delay = 5, restart_delay = 5,
@ -87,16 +90,30 @@ if output_icecast_vorbis then
#with vlc and mplayer disconnecting at the end of every track #with vlc and mplayer disconnecting at the end of every track
s = add(normalize=false, [amplify(0.00001, noise()),s]) s = add(normalize=false, [amplify(0.00001, noise()),s])
out_vorbis = output.icecast(%vorbis, out_vorbis = output.icecast(%vorbis,
host = icecast_host, port = icecast_port, host = icecast_host,
password = icecast_pass, mount = mount_point_vorbis, port = icecast_port,
password = icecast_pass,
mount = mount_point_vorbis,
fallible = true, fallible = true,
restart = true, restart = true,
restart_delay = 5, restart_delay = 5,
url = icecast_url, url = icecast_url,
description = icecast_description, description = icecast_description,
genre = icecast_genre, genre = icecast_genre,
s) s)
end end
end end
if output_shoutcast then
out_shoutcast = output.shoutcast(%mp3,
host = shoutcast_host,
port = shoutcast_port,
password = shoutcast_pass,
fallible = true,
restart = true,
restart_delay = 5,
url = shoutcast_url,
genre = shoutcast_genre,
s)
end