feat(playout): use jinja to configure liquidsoap outputs

This commit is contained in:
jo 2023-02-25 16:10:13 +01:00 committed by Kyle Robbertze
parent 85aa0174c3
commit 00b5c08647
10 changed files with 285 additions and 894 deletions

View file

@ -11,84 +11,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = false
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = ""
s1_user = "source"
s1_pass = ""
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = ""
s1_description = ""
s1_genre = ""
s1_url = ""
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = ""
s2_user = "source"
s2_pass = ""
s2_channels = "stereo"
s2_type = "ogg"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = false
s4_output = "icecast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = ""
s4_channels = "stereo"
s4_type = "ogg"
s4_bitrate = 256
s4_name = ""
s4_description = ""
s4_genre = ""
s4_url = ""
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = false
output_sound_device_type = "alsa"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -108,6 +33,10 @@
%include "/fake/1.4/ls_script.liq"
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config1-1.4]
@ -122,84 +51,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = true
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = "main"
s1_user = "source"
s1_pass = "hackme"
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = "LibreTime!"
s1_description = "LibreTime Radio! Stream #1"
s1_genre = "various"
s1_url = "https://libretime.org"
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = "second"
s2_user = "source"
s2_pass = "hackme"
s2_channels = "stereo"
s2_type = "mp3"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = false
s4_output = "icecast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = ""
s4_channels = "stereo"
s4_type = "ogg"
s4_bitrate = 256
s4_name = ""
s4_description = ""
s4_genre = ""
s4_url = ""
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = false
output_sound_device_type = "alsa"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -219,6 +73,33 @@
%include "/fake/1.4/ls_script.liq"
# icecast:1
output_icecast_1_source = s
output.icecast(
id="icecast:1",
host="localhost",
port=8000,
mount="main",
user="source",
password="hackme",
fallible = true,
name="LibreTime!",
description="LibreTime Radio! Stream #1",
genre="various",
url="https://libretime.org",
on_connect=make_ouput_on_connect_handler("1"),
on_error=make_ouput_on_error_handler("1"),
%vorbis(
quality=0.8,
channels=2
),
output_icecast_1_source,
)
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config2-1.4]
@ -233,84 +114,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = false
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = ""
s1_user = "source"
s1_pass = ""
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = ""
s1_description = ""
s1_genre = ""
s1_url = ""
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = ""
s2_user = "source"
s2_pass = ""
s2_channels = "stereo"
s2_type = "ogg"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = true
s4_output = "shoutcast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = "hackme"
s4_channels = "stereo"
s4_type = "mp3"
s4_bitrate = 256
s4_name = "LibreTime!"
s4_description = ""
s4_genre = "various"
s4_url = "https://libretime.org"
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = false
output_sound_device_type = "alsa"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -330,6 +136,31 @@
%include "/fake/1.4/ls_script.liq"
# shoutcast:1
output_shoutcast_1_source = s
output.shoutcast(
id="shoutcast:1",
host="localhost",
port=8000,
user="source",
password="hackme",
fallible = true,
name="",
genre="various",
url="https://libretime.org",
on_connect=make_ouput_on_connect_handler("1"),
on_error=make_ouput_on_error_handler("1"),
%mp3(
bitrate=256,
stereo=true
),
output_shoutcast_1_source,
)
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config3-1.4]
@ -344,84 +175,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = true
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = "main"
s1_user = "source"
s1_pass = "hackme"
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = ""
s1_description = ""
s1_genre = ""
s1_url = ""
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = ""
s2_user = "source"
s2_pass = ""
s2_channels = "stereo"
s2_type = "ogg"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = true
s4_output = "shoutcast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = "hackme"
s4_channels = "stereo"
s4_type = "mp3"
s4_bitrate = 256
s4_name = ""
s4_description = ""
s4_genre = ""
s4_url = ""
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = false
output_sound_device_type = "alsa"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -441,6 +197,54 @@
%include "/fake/1.4/ls_script.liq"
# icecast:1
output_icecast_1_source = s
output.icecast(
id="icecast:1",
host="localhost",
port=8000,
mount="main",
user="source",
password="hackme",
fallible = true,
name="",
description="",
genre="",
url="",
on_connect=make_ouput_on_connect_handler("1"),
on_error=make_ouput_on_error_handler("1"),
%vorbis(
quality=0.8,
channels=2
),
output_icecast_1_source,
)
# shoutcast:2
output_shoutcast_2_source = s
output.shoutcast(
id="shoutcast:2",
host="localhost",
port=8000,
user="source",
password="hackme",
fallible = true,
name="",
genre="",
url="",
on_connect=make_ouput_on_connect_handler("2"),
on_error=make_ouput_on_error_handler("2"),
%mp3(
bitrate=256,
stereo=true
),
output_shoutcast_2_source,
)
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config4-1.4]
@ -455,84 +259,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = false
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = ""
s1_user = "source"
s1_pass = ""
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = ""
s1_description = ""
s1_genre = ""
s1_url = ""
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = ""
s2_user = "source"
s2_pass = ""
s2_channels = "stereo"
s2_type = "ogg"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = false
s4_output = "icecast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = ""
s4_channels = "stereo"
s4_type = "ogg"
s4_bitrate = 256
s4_name = ""
s4_description = ""
s4_genre = ""
s4_url = ""
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = true
output_sound_device_type = "pulseaudio"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -552,6 +281,17 @@
%include "/fake/1.4/ls_script.liq"
# pulseaudio:1
%ifdef output.pulseaudio
output.pulseaudio(id="pulseaudio:1", s)
%else
log("output.pulseaudio is not defined!")
%endif
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config5-1.4]
@ -566,84 +306,9 @@
input_show_mount = "show"
input_show_port = 8002
# Output s1
s1_enable = false
s1_output = "icecast"
s1_host = "localhost"
s1_port = 8000
s1_mount = ""
s1_user = "source"
s1_pass = ""
s1_channels = "stereo"
s1_type = "ogg"
s1_bitrate = 256
s1_name = ""
s1_description = ""
s1_genre = ""
s1_url = ""
# Output s2
s2_enable = false
s2_output = "icecast"
s2_host = "localhost"
s2_port = 8000
s2_mount = ""
s2_user = "source"
s2_pass = ""
s2_channels = "stereo"
s2_type = "ogg"
s2_bitrate = 256
s2_name = ""
s2_description = ""
s2_genre = ""
s2_url = ""
# Output s3
s3_enable = false
s3_output = "icecast"
s3_host = "localhost"
s3_port = 8000
s3_mount = ""
s3_user = "source"
s3_pass = ""
s3_channels = "stereo"
s3_type = "ogg"
s3_bitrate = 256
s3_name = ""
s3_description = ""
s3_genre = ""
s3_url = ""
# Output s4
s4_enable = false
s4_output = "icecast"
s4_host = "localhost"
s4_port = 8000
s4_mount = ""
s4_user = "source"
s4_pass = ""
s4_channels = "stereo"
s4_type = "ogg"
s4_bitrate = 256
s4_name = ""
s4_description = ""
s4_genre = ""
s4_url = ""
# Outputs
icecast_vorbis_metadata = false
# System output
output_sound_device = false
output_sound_device_type = "alsa"
# Settings
auth_path = "/fake/liquidsoap_auth.py"
@ -663,5 +328,9 @@
%include "/fake/1.4/ls_script.liq"
gateway("started")
'''
# ---