Skip to content

Instantly share code, notes, and snippets.

@dstecholution
Forked from cburmeister/liquidsoap.liq
Created May 31, 2022 18:21
Show Gist options
  • Save dstecholution/ddb351b9fcbe8255612eaadfca40a76a to your computer and use it in GitHub Desktop.
Save dstecholution/ddb351b9fcbe8255612eaadfca40a76a to your computer and use it in GitHub Desktop.
An example `liquidsoap` configuration file with two input streams and two output streams to `icecast`.
#!/usr/bin/liquidsoap
# Activate the live stream input
set('harbor.bind_addr', '0.0.0.0')
# Configure input A
input_a = input.harbor(
'input_a',
port=8001,
password='bigproblem'
)
# Configure input B
input_b = input.harbor(
'input_b',
port=8002,
password='bigproblem'
)
# Send input A to icecast
output.icecast(
%mp3(bitrate=192),
input_a,
host=getenv('ICECAST_HOST'),
port=int_of_string(getenv('ICECAST_PORT')),
password=getenv('ICECAST_SOURCE_PASSWORD'),
mount='stream-a.mp3',
name='',
genre='',
description='',
url='',
fallible=true
)
# Send input B to icecast
output.icecast(
%mp3(bitrate=192),
input_b,
host=getenv('ICECAST_HOST'),
port=int_of_string(getenv('ICECAST_PORT')),
password=getenv('ICECAST_SOURCE_PASSWORD'),
mount='stream-b.mp3',
name='',
genre='',
description='',
url='',
fallible=true
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment