Closed periode closed 1 month ago
Hi @periode,
The aot = "mpeg4_hev2_aac"
is invalid, it should be one of the
mpeg4_aac_lc
mpeg4_he_aac
mpeg4_he_aac_v2
mpeg4_aac_ld
mpeg4_aac_eld
mpeg2_aac_lc
mpeg2_he_aac
mpeg2_he_aac_v2
Could you share where you found this value?
Hi @vitoyucepi
To be honest, I don't remember. But I just tried with mpeg4_he_aac_v2
, and I tried previously without the aot
field, in order to fallback to the default setting, and the result is the same.
Just installed 4.14.2
switch and LS to test. If I have mpeg4_hev2_aac
I get
At test25.liq, line 9, char 10-26:
aot = "mpeg4_hev2_aac",
Error 8: Invalid aot value
With valid value everything works as expected.
Hi @gAlleb, I agree with your conclusion. There's something wrong with the script, but not with the reference snippet.
@periode,
Could you post the full broadcaster.liq
script so I can test it locally?
Also, could you post the result of lsb_release -a
, maybe there's something wrong with your OS.
Here's the full script
variables that are included in env.liq
are:
library_dir
(folder with songs)harbor_port
(i guess you could remove this, and the request handler with it)fallback_track
(single mp3 file)host
, port
and password
%include "env.liq"
settings.decoder.priorities.ogg.set(20)
settings.harbor.bind_addrs.set(["127.0.0.1"])
current_track = ref([])
def log_current_track(m)
current_track := [
("title", m["title"]),
("artist", m["artist"])
]
end
def handle_current(_) =
let curr = current_track()
let data = json()
data.add("title", curr["title"])
data.add("artist", curr["artist"])
str = json.stringify(data)
http.response(content_type="application/json", data=str)
end
harbor.http.register.simple(port=harbor_port, "/current", handle_current)
fallback_track = single("#{fallback_track}")
radio =
playlist(mode="normal", reload_mode="watch", loop=true, "#{library_dir}")
radio = mksafe(radio)
radio = fallback([radio, fallback_track])
radio.on_track(log_current_track)
# outputs
# output.icecast(
# %fdkaac(
# channels = 2,
# samplerate = 44100,
# bandwidth = "auto",
# aot = "mpeg4_he_aac_v2",
# bitrate = 128,
# ),
# mount="/stream.aac",
# description="ufo radio stream (aac)",
# host=icecast_host,
# port=icecast_port,
# password=icecast_password,
# radio
# )
output.icecast(
%opus(
samplerate = 48000,
bitrate = 128,
vbr = "none",
application = "audio",
channels = 2,
signal = "music",
max_bandwidth = "full_band"
),
mount="/stream.opus",
description="ufo radio stream (opus)",
host=icecast_host,
port=icecast_port,
password=icecast_password,
radio
)
lsb_release -a
gives:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
Thanks for the help!
I've found the reason for this problem. Ubuntu:24.04 switched from fdk-aac to fdk-aac-free, which has no support for aac-he.
Oh, how interesting!
Description
Hello!
I'm trying to stream an AAC-encoded file, and I get the following error:
2024/07/23 10:08:16 [/stream_aac:2] Error while sending data: Lang.Runtime_error { kind: "encoder", msg: "Invalid configuration: aot", pos: [at script/broadcaster.liq, line 39 char 2 - line 44 char 3] }!
Meanwhile, there's also an OPUS stream that works perfectly.
This is the relevant part of the script (I've tried to remove the
aot
field, and I get the same error)Steps to reproduce
Expected behavior
Creates an AAC stream and outputs it to Icecast
Liquidsoap version
Liquidsoap build config
Installation method
From OPAM
Additional Info
Tried to downgrade to 2.2.1, and same issue.