Skip to content
Snippets Groups Projects
Commit d5a8cb83 authored by David Trattnig's avatar David Trattnig
Browse files

Refact: Migrate tests to new settings format

parent 606b3a76
No related branches found
No related tags found
1 merge request!3Liquidsoap 2 migration
#!/usr/bin/env liquidsoap
#
# Aura Engine (https://gitlab.servus.at/aura/engine)
#
# Copyright (C) 2017-now() - The Aura Engine Team.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
settings.init.allow_root.set(true)
settings.init.catch_exn.set(false)
settings.server.telnet.set(false)
settings.server.telnet.bind_addr.set("0.0.0.0")
settings.server.telnet.port.set(1234)
# settings.log.file.path.set("../logs/<script>.log")
# settings.log.level.set(5)
# settings.ffmpeg.log.level.set(5)
...@@ -18,14 +18,8 @@ ...@@ -18,14 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set("init.allow_root", true) %include "base_config.liq"
set("log.file.path", "../logs/<script>.log") settings.frame.audio.samplerate.set(44100)
set("server.telnet", true)
set("server.telnet.bind_addr", "0.0.0.0")
set("server.telnet.port", 1234)
set("frame.audio.samplerate", 44100)
input_fs = single(id="fs", "assets/audio.mp3") input_fs = single(id="fs", "assets/audio.mp3")
output.alsa(id="lineout", device="default", input_fs) output.alsa(id="lineout", device="default", input_fs)
\ No newline at end of file
...@@ -18,12 +18,11 @@ ...@@ -18,12 +18,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set("init.allow_root", true) %include "base_config.liq"
set("log.file.path", "../logs/<script>.log")
# Set this to the value mentioned in the logs after the first run. Watch the logs and double the value if needed. # Set this to the value mentioned in the logs after the first run. Watch the logs and double the value if needed.
# Find more details here: https://gitlab.servus.at/aura/engine-core/-/blob/master/docs/audio-device-configuration.md # Find more details here: https://gitlab.servus.at/aura/engine-core/-/blob/master/docs/audio-device-configuration.md
set("frame.audio.size", 0) settings.frame.audio.size.set(0)
set("frame.video.framerate", 0) settings.frame.video.framerate.set(0)
output.alsa(device="default", bufferize=false, input.alsa(device="default", bufferize=false)) output.alsa(device="default", bufferize=false, input.alsa(device="default", bufferize=false))
\ No newline at end of file
...@@ -18,18 +18,14 @@ ...@@ -18,18 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set("init.allow_root", true) %include "base_config.liq"
set("init.catch_exn", false) settings.audio.converter.samplerate.converters.set(["ffmpeg"])
set("log.file.path", "../logs/<script>.log")
set("log.level", 5)
set("ffmpeg.log.level", 5)
set("audio.converter.samplerate.converters", ["ffmpeg"])
# Successfully tested with Liquidsoap 1.4.4 & ALSA 1.1.3 # Successfully tested with Liquidsoap 1.4.4 & ALSA 1.1.3
# Low latency, no buffer underruns # Low latency, no buffer underruns
set("frame.audio.size", 2048) settings.frame.audio.size.set(2048)
set("alsa.alsa_buffer", 8192) settings.alsa.alsa_buffer.set(8192)
set("alsa.buffer_length", 10) settings.alsa.buffer_length.set(10)
input_analog = input.alsa(device="default", bufferize=true) input_analog = input.alsa(device="default", bufferize=true)
output.alsa(device="default", input_analog, bufferize=true) output.alsa(device="default", input_analog, bufferize=true)
\ No newline at end of file
...@@ -18,18 +18,14 @@ ...@@ -18,18 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set("init.allow_root", true) %include "base_config.liq"
set("init.catch_exn", false) settings.audio.converter.samplerate.converters.set(["ffmpeg"])
set("log.file.path", "../logs/<script>.log")
set("log.level", 5)
set("ffmpeg.log.level", 5)
set("audio.converter.samplerate.converters", ["ffmpeg"])
# Successfully tested with Liquidsoap 1.4.4 + ALSA 1.1.3 # Successfully tested with Liquidsoap 1.4.4 + ALSA 1.1.3
# High latency, no buffer underruns # High latency, no buffer underruns
set("frame.audio.size", 2048) settings.frame.audio.size.set(2048)
set("alsa.alsa_buffer", 8192) settings.alsa.alsa_buffer.set(8192)
set("alsa.buffer_length", 10) settings.alsa.buffer_length.set(10)
input_analog = input.alsa(device="default", bufferize=true) input_analog = input.alsa(device="default", bufferize=true)
input_analog = mksafe(buffer(input_analog)) input_analog = mksafe(buffer(input_analog))
......
...@@ -18,18 +18,14 @@ ...@@ -18,18 +18,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set("init.allow_root", true) %include "base_config.liq"
set("init.catch_exn", false) settings.audio.converter.samplerate.converters.set(["ffmpeg"])
set("log.file.path", "../logs/<script>.log")
set("log.level", 5)
set("ffmpeg.log.level", 5)
set("audio.converter.samplerate.converters", ["ffmpeg"])
# Successfully tested with Liquidsoap 2 & ALSA 1.2.4 # Successfully tested with Liquidsoap 2 & ALSA 1.2.4
# Almost no latency, no buffer underruns # Almost no latency, no buffer underruns
# Doesn't work in Liquidsoap 1.4 because of some calculation bug # Doesn't work in Liquidsoap 1.4 because of some calculation bug
set("frame.audio.size", 7526) settings.frame.audio.size.set(7526)
set("frame.video.framerate", 0) settings.frame.video.framerate.set(0)
input_analog = input.alsa(device="default", bufferize=false) input_analog = input.alsa(device="default", bufferize=false)
output.alsa(device="default", input_analog, bufferize=false) output.alsa(device="default", input_analog, bufferize=false)
\ No newline at end of file
...@@ -18,12 +18,9 @@ ...@@ -18,12 +18,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
%include "base_config.liq"
%include "../src/readini.liq" %include "../src/readini.liq"
set("log.file.path", "../logs/<script>.log")
set("log.level", 5)
set("ffmpeg.log.level", 5)
debug := true debug := true
config = "../config/sample-production.engine-core.ini" config = "../config/sample-production.engine-core.ini"
print("Config file used: #{config}") print("Config file used: #{config}")
......
#!/usr/bin/env liquidsoap #!/usr/bin/env liquidsoap
# #
# Aura Engine (https://gitlab.servus.at/aura/engine) # Aura Engine (https://gitlab.servus.at/aura/engine)
...@@ -18,14 +17,6 @@ ...@@ -18,14 +17,6 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
settings.server.telnet.set(false)
settings.server.telnet.bind_addr.set("0.0.0.0")
settings.server.telnet.port.set(1234)
settings.log.file.path.set("../logs/<script>.log")
settings.log.level.set(5)
settings.ffmpeg.log.level.set(5)
http_starturl = "https://securestream.o94.at/live.mp3" http_starturl = "https://securestream.o94.at/live.mp3"
# http_starturl = "http://stream01.kapper.net:8001/live.mp3" # http_starturl = "http://stream01.kapper.net:8001/live.mp3"
# http_starturl = "https://live.helsinki.at:8088/live160.ogg" # http_starturl = "https://live.helsinki.at:8088/live160.ogg"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment