OP25 Liquidsoap 2.2.4-1+dev possible fix?

telvana

Member
Joined
Nov 19, 2014
Messages
90
Greetings,

As some may already know, liquidsoap does not function properly due to recent changes by the team at Liquidsoap. The issue becomes apparent when one updates past a certain version of liquidsoap (not sure which version, but the issue occured to me after trying to use it on Debian 12 or Ubuntu 24.04.1). The fix was pretty simple, really, all that needed changed was removing "icy_metadata="false"". I am not saying this will solve it for everyone else, but this worked for me.
Code:
#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019, 2020 gnorbury@bondcar.com, wllmbecks@gmail.com
#

settings.log.stdout.set(true)
settings.log.file.set(false)
settings.log.file.path.set("")
settings.log.level.set(3)
settings.log.file.append.set(false)

# Make the native sample rate compatible with op25
set("frame.audio.samplerate", 8000)


input = mksafe(input.external.rawaudio(channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23450 -x 4 -s"))


# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.



# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# High pass filter
#input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input_1)

# Low pass filter
#input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input_1)

# Compression
#input = compress(input, attack = 15.0, gain = 2.0, knee = 1.0, ratio = 3.0, release = 60.0, threshold = -24.0)

# Normalization
#input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -40.0)


# LOCAL AUDIO
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
#out (input)
#
# PulseAudio
#output.pulseaudio(input)
#
# ALSA
#output.alsa(input)


# ICECAST STREAMING
# Uncomment to enable output to an icecast server
# Change the "host", "password", and "mount" strings appropriately first!
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
#
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="Police & Fire", genre="Public Safety", url="", fallible=false, host="changeme", port=80, mount="changeme", password="changeme", mean(input))
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,401
Location
Talbot Co, MD
Greetings,

As some may already know, liquidsoap does not function properly due to recent changes by the team at Liquidsoap. The issue becomes apparent when one updates past a certain version of liquidsoap (not sure which version, but the issue occured to me after trying to use it on Debian 12 or Ubuntu 24.04.1). The fix was pretty simple, really, all that needed changed was removing "icy_metadata="false"". I am not saying this will solve it for everyone else, but this worked for me.
So then the question becomes whether I should simply remove "icy_metadata" from the default configuration in the gr310 branch? That would be easy enough to accomplish, but does it impact compatibility with earlier versions?
 

telvana

Member
Joined
Nov 19, 2014
Messages
90
So then the question becomes whether I should simply remove "icy_metadata" from the default configuration in the gr310 branch? That would be easy enough to accomplish, but does it impact compatibility with earlier versions?
Good question, I don't have an easy way to test it right now, but I can spin up a VM over the weekend and test it out, unless someone else has a working copy that's running on the older version that they'd be willing to try it out on
 

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,018
Location
NE Wisconsin
Good question, I don't have an easy way to test it right now, but I can spin up a VM over the weekend and test it out, unless someone else has a working copy that's running on the older version that they'd be willing to try it out on
I am running an instance of op25 with Liquidsoap v2.2.4-1 on Ubuntu 24.04.1 can confirm the required change in the structure of
the output.icecast operator.


Bash:
#!/usr/bin/liquidsoap

# Example liquidsoap v2.2.4-1 streaming from op25 to icecast
# (c) 2019-2024 gnorbury@bondcar.com, wllmbecks@gmail.com
#

settings.log.stdout.set(true)
settings.log.file.set(false)
settings.log.file.path.set("")
settings.log.level.set(3)
settings.log.file.append.set(false)


# Make the native sample rate compatible with op25
settings.frame.audio.size.set(8000)

input = mksafe(input.external.rawaudio(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.25 -s"))


# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.



# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# High pass filter
#input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)

# Low pass filter
#input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)

# Compression
input = compress(input, attack = 15.0, gain = 2.0, knee = 1.0, ratio = 3.0, release = 60.0, threshold = -24.0)

# Normalization
input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -40.0)



# LOCAL AUDIO OUTPUT
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
#out (input)
#
# PulseAudio
output.pulseaudio(input)
#
# ALSA
#output.alsa(input)

# ICECAST STREAMING
# Uncomment to enable output to an icecast server
# Change the "host", "password", and "mount" strings appropriately first!
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
#
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="OP25", genre="Public Safety",
url="", fallible=false, host="localhost", port=8000, mount="op25", password="hackme", mean(input))
 
Top