OP25 OP25 Value error when running ./rx.py

Status
Not open for further replies.

wgbecks

Active Member
Joined
Jan 17, 2005
Messages
1,145
Reaction score
404
Location
NE Wisconsin
Do you have a shebang line?

The op25.liq script packaged with the repo (for use as a template) is correctly formatted. However, we don't know what the OP's file
actually, looks like, and is the reason that I asked him in #18 to post his file with only the password redacted.

If the OP seeks help, then post your op25.liq file that we can check it over, and while you're at it, submit liquidsoap --version from
the command line and post the resultant output from that entry as well.
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
Do you have a shebang line?
9 out of 10 times the issue is a malformed / incorrect shebang...like you passed it something it can't do, or isn't valid.

Code:
#!/usr/bin/liquidsoap
is that the first line of whatever script you are trying to run?
I have to uncomment the shebang don't I? Let me try that
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
The op25.liq script packaged with the repo (for use as a template) is correctly formatted. However, we don't know what the OP's file
actually, looks like, and is the reason that I asked him in #18 to post his file with only the password redacted.

If the OP seeks help, then post your op25.liq file that we can check it over, and while you're at it, submit liquidsoap --version from
the command line and post the resultant output from that entry as well.
Copyright (c) 2003-2019 Savonet team
Liquidsoap is open-source software, released under GNU General Public License.
See <Liquidsoap - Audio & Video Streaming Language> for more information.
 

Attachments

  • Screenshot (26).png
    Screenshot (26).png
    109.8 KB · Views: 11

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
also there's this:


● icecast2.service - LSB: Icecast2 streaming media server
Loaded: loaded (/etc/init.d/icecast2; generated)
Active: active (running) since Sun 2023-10-08 17:36:46 EDT; 13min ago
Docs: man:systemd-sysv-generator(8)
Process: 564 ExecStart=/etc/init.d/icecast2 start (code=exited, status=0/SUCCESS)
Tasks: 5 (limit: 3933)
CPU: 1.089s
CGroup: /system.slice/icecast2.service
└─627 /usr/bin/icecast2 -b -c /etc/icecast2/icecast.xml

Oct 08 17:36:44 raspberrypi systemd[1]: Starting LSB: Icecast2 streaming media server...
Oct 08 17:36:46 raspberrypi icecast2[564]: Starting streaming media server: icecast2.
Oct 08 17:36:46 raspberrypi systemd[1]: Started LSB: Icecast2 streaming media server.
Oct 08 17:36:46 raspberrypi icecast2[627]: [2023-10-08 17:36:46] WARN auth_htpasswd/htpasswd_recheckfile failed to check status of myauth
Oct 08 17:36:46 raspberrypi icecast2[627]: [2023-10-08 17:36:46] WARN CONFIG/_parse_root Warning, <hostname> not configured, using default value "loca>
Oct 08 17:36:46 raspberrypi icecast2[627]: [2023-10-08 17:36:46] WARN CONFIG/_parse_root Warning, <location> not configured, using default value "Eart>
Oct 08 17:36:46 raspberrypi icecast2[627]: [2023-10-08 17:36:46] WARN CONFIG/_parse_root Warning, <admin> contact not configured, using default value
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
!/usr/bin/liquidsoap

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

set("log.stdout", true)
set("log.file", false)
set("log.level", 1)

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

input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.5 -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 = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)

# Normalization
input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.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, icy_metadata="false", host="localhost", port=8000, mount="op25", password="xxxxxx", mean(input))
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
Well its that time I'm putting a pin in this. Rack my brain at work and keep utilizing Bard and chat gpt. I'll do another live stream probably friday or saturday. I refuse to let op25 win. :ROFLMAO: I swear i'm going to make myself an op25 expert after this.
 

a417

Active Member
Joined
Mar 14, 2004
Messages
4,669
Reaction score
3,529
!/usr/bin/liquidsoap

welp, there's your problem.

you're missing something. :)

Untitled.png
That's directly from the git repo. What does yours not have?

You may have thought you were "uncommenting out" a shebang, when in fact, you broke it. That link to the shebang wiki earlier in this thread explains what it does and why.
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
Got my doubts about that, unless you take some time to address your knowledge of linux fundamentals first. Gotta walk before you can run!
I've been teaching myself slowly Obi-Wan one day I too will harness the force.
welp, there's your problem.

you're missing something. :)

View attachment 149369
That's directly from the git repo. What does yours not have?

You may have thought you were "uncommenting out" a shebang, when in fact, you broke it. That link to the shebang wiki earlier in this thread explains what it does and why.
I realized that shortly their after in my defense it was Sunday. Trust I'm also learning python as well I really should've known better. I already got one live stream I'm going to rewatch myself see if I catch myself doing anything wrong and I'll be livestreaming more than likely Saturday night for day 2. I also left it running to see if it fixes itself. It seems in my experience things just randomly start working for me
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
I think I found my problem I didn't change my localhost name to the ip address of where the server is located. I'll be trying that when I get home
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
im so close!!!

2023/10/15 13:44:58 [safe_blank:4] Activations changed: static=[max_duration_10730:sequence_10731:mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)], dynamic=[mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)].
2023/10/15 13:44:58 [max_duration_10730:4] Activations changed: static=[sequence_10731:mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)], dynamic=[].
2023/10/15 13:44:58 [safe_blank:4] Activations changed: static=[sequence_10731:mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:), max_duration_10730:sequence_10731:mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)], dynamic=[mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)].
2023/10/15 13:44:58 [safe_blank:4] Enabling caching mode: two static activations.
2023/10/15 13:44:58 [sequence_10731:4] Activations changed: static=[mksafe:compress_9370:normalize_9373:pulse_out(liquidsoap:):pulse_out(liquidsoap:)], dynamic=[].
2023/10/15 13:45:01 [op25:3] Connecting mount op25 for source@localhost...
2023/10/15 13:45:01 [op25:2] Connection failed: could not connect to host: Connection refused in connect()
 

Falcon4

Member
Joined
May 5, 2017
Messages
117
Reaction score
21
Location
West Chester,PA
@wgbecks or @boatbod I know I'm close op25 is running I can hear audio. I have liquidsoap installed. I have icecast.xml installed. I've edited op25.liq,meta.json and icecast.xml. here are my settings something clearly aint jiving. can someone post their setups so I can see what i'm doing wrong? liquidsoap cant connect to icecast.
 

Attachments

  • Screenshot (26).png
    Screenshot (26).png
    109.8 KB · Views: 6
  • Screenshot (29).png
    Screenshot (29).png
    352.7 KB · Views: 6
  • Screenshot (30).png
    Screenshot (30).png
    40.7 KB · Views: 6
Last edited:
Status
Not open for further replies.
Top