Skip to content

Instantly share code, notes, and snippets.

@cburmeister
Created October 4, 2018 16:59
Show Gist options
  • Save cburmeister/ab7fc01f59d910db607ab6f0947ae9a8 to your computer and use it in GitHub Desktop.
Save cburmeister/ab7fc01f59d910db607ab6f0947ae9a8 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
)
@cburmeister
Copy link
Author

Please do, someday I would like to have working examples with local media files in a repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment