From 8f5e2a6739198be668d2b9e20d19ab32c421b325 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 26 Jul 2011 18:39:26 +0200 Subject: [PATCH] CC-2590 : Make bitrate for liquidsoap and show-recorder adjustable from the config file --- python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg | 6 +++--- python_apps/pypo/liquidsoap_scripts/ls_script.liq | 10 +++++----- python_apps/show-recorder/recorder.cfg | 2 +- python_apps/show-recorder/recorder.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg b/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg index 8ca2206f6..ef4b26b62 100644 --- a/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg +++ b/python_apps/pypo/liquidsoap_scripts/liquidsoap.cfg @@ -10,9 +10,9 @@ output_icecast_vorbis = true output_icecast_mp3 = false output_shoutcast = false -output_bitrate = 128 -output_samplerate = 44100 -output_stereo = true +#output_bitrate = 128 +#output_samplerate = 44100 +#output_stereo = true ########################################### # Logging settings # diff --git a/python_apps/pypo/liquidsoap_scripts/ls_script.liq b/python_apps/pypo/liquidsoap_scripts/ls_script.liq index e67713ee5..2256bdf57 100644 --- a/python_apps/pypo/liquidsoap_scripts/ls_script.liq +++ b/python_apps/pypo/liquidsoap_scripts/ls_script.liq @@ -58,8 +58,8 @@ end if output_icecast_mp3 then - #%mp3(bitrate=32, samplerate=22050, stereo=false) - ignore(output.icecast(%mp3(bitrate=output_bitrate, samplerate=output_samplerate, stereo=output_stereo), + #format = %mp3(bitrate=192, samplerate=44100, stereo=false) + ignore(output.icecast(%mp3, host = icecast_host, port = icecast_port, password = icecast_pass, @@ -76,7 +76,7 @@ end if output_icecast_vorbis then if output_icecast_vorbis_metadata then - ignore(output.icecast(%vorbis(bitrate=output_bitrate, samplerate=output_samplerate, stereo=output_stereo), + ignore(output.icecast(%vorbis, host = icecast_host, port = icecast_port, password = icecast_pass, @@ -93,7 +93,7 @@ if output_icecast_vorbis then #remove metadata from ogg source and merge tracks to fix bug #with vlc and mplayer disconnecting at the end of every track s = add(normalize=false, [amplify(0.00001, noise()),s]) - ignore(output.icecast(%vorbis(bitrate=output_bitrate, samplerate=output_samplerate, stereo=output_stereo), + ignore(output.icecast(%vorbis, host = icecast_host, port = icecast_port, password = icecast_pass, @@ -110,7 +110,7 @@ if output_icecast_vorbis then end if output_shoutcast then - ignore(output.shoutcast(%mp3(bitrate=output_bitrate, samplerate=output_samplerate, stereo=output_stereo), + ignore(output.shoutcast(%mp3, host = shoutcast_host, port = shoutcast_port, password = shoutcast_pass, diff --git a/python_apps/show-recorder/recorder.cfg b/python_apps/show-recorder/recorder.cfg index faf063439..762c01da3 100644 --- a/python_apps/show-recorder/recorder.cfg +++ b/python_apps/show-recorder/recorder.cfg @@ -19,7 +19,7 @@ rabbitmq_password = 'guest' ############################################ # Recorded Audio settings # ############################################ -record_bitrate = 128 +record_bitrate = 256 record_samplerate = 44100 record_channels = 2 record_sample_size = 16 diff --git a/python_apps/show-recorder/recorder.py b/python_apps/show-recorder/recorder.py index e4e9c4d33..83ae5e1f5 100644 --- a/python_apps/show-recorder/recorder.py +++ b/python_apps/show-recorder/recorder.py @@ -75,7 +75,7 @@ class ShowRecorder(Thread): #-f:16,2,44100 #-b:256 - command = "ecasound -f:%s,%s,%s -b:%s -i alsa -o %s -t:%s" % (ss, c, sr, br, filepath, length) + command = "ecasound -f:%s,%s,%s -i alsa -o %s,%s000 -t:%s" % (ss, c, sr, filepath, br, length) args = command.split(" ") self.logger.info("starting record")