Replies: 2 comments 1 reply
-
Hi @sk8ter75, s1 = sine()
s2 = input.harbor("radio", port=8000, password="hackme")
def title(m)
title = m["title"]
[("title", "#{title} - LIVE-ON-AIR")]
end
s3 = metadata.map(title, s2)
s = fallback(track_sensitive=false, [s3, s1])
output.icecast(%mp3, s, host="icecast", mount="test") When To test the ffmpeg \
-hide_banner \
-re -f lavfi -i "sine=frequency=1000:duration=100" \
-b:a 320k -c:a mp3 \
-f mp3 icecast://source:hackme@localhost:8000/radio To update the metadata I use curl \
'http://source:hackme@localhost:8000/admin/metadata?mode=updinfo&mount=/radio&song=Test' After that, icecast shows Currently playing: Test - LIVE-ON-AIR. |
Beta Was this translation helpful? Give feedback.
-
Hi vitoyucepi, Thank you for your reply. I just tested it, and indeed using the curl command to update the metadata in icecast works perfectly. Thank you again, I can quickly fix the metadata problem on the webradio. But is there an "internal" solution to liquisoap, without launching another script? Philippe |
Beta Was this translation helpful? Give feedback.
-
Hello,
I recently migrated from Liquidsoap (version 1.4.4 -> version 2.2.4), but I am encountering an issue with the input.harbor() function: it does not behave as it did in version 1.4.4. Often, it does not properly retrieve the metadata from the stream it decodes.
Below is an example of the script I am using:
############## My script, 2 playlists (Day and Night) and a harbor input for MP3 live sessions:
set("log.file.path","/home/radio/logs/test.log")
day = playlist(mode='randomize', "/home/radio/mp3/PLS/Day/")
night = playlist(mode='randomize', "/home/radio/mp3/PLS/Night/")
jingles = playlist("/home/radio/mp3/PLS/Jingles/")
radio = fallback([switch(track_sensitive=false,
[
({ 24h-6h }, night),
({ 6h-24h }, day),
]),
])
radio = random(weights = [1, 4],[jingles, radio])
live1 = input.harbor(icy=true, icy_metadata_charset = "UTF-8", metadata_charset = "UTF-8", replay_metadata=true, send_icy_metadata=true, password="pass_harbor", port=6050, buffer=15., max=20., "/live1")
############
def append_title(m)=
title=m["title"]
[("title","#{title} - LIVE-ON-AIR")]
end
live1 = metadata.map(append_title,live1)
############
radio = fallback(track_sensitive=false, [live1, radio])
output.icecast(%mp3(bitrate=128), host="localhost", port=8000, password="password", mount="/stream", name="My WebRadio test", fallible=true, radio
In the logs, the metadata content is indeed present:
2024/05/10 11:56:59 [input.harbor:3] Decoding...
2024/05/10 11:56:59 [input.harbor:3] New metadata chunk TazDev_music -- TazDev_music - Techno Driver.
2024/05/10 11:57:14 [switch.5:3] Switch to metadata_map.2 with transition.
2024/05/10 11:57:14 [replay_metadata.10:3] Content type is {audio=pcm(stereo)}.
2024/05/10 11:57:14 [metadata_map:3] Inserting missing metadata.
I am indeed retrieving the metadata: "TazDev_music -- TazDev_music - Techno Driver"
What should I add to my code to be able to display the mix title + the string "- LIVE-ON-AIR"?
Because with my script, only the string "- LIVE-ON-AIR" is displayed on the Icecast stream. The Title appears to be empty even though it is displayed in the logs
Thanks in advance !
Phil
Beta Was this translation helpful? Give feedback.
All reactions