savonet / liquidsoap

Liquidsoap is a statically typed scripting general-purpose language with dedicated operators and backend for all thing media, streaming, file generation, automation, HTTP backend and more.
http://liquidsoap.info
GNU General Public License v2.0
1.41k stars 130 forks source link

Update metadata from BUTT (input.harbor) #710

Closed 10kes closed 5 years ago

10kes commented 5 years ago

Hi, I've been looking for a while but I have not found anything yet, I'm using Liquidsoap and Icecast2 on Ubuntu and my problem is when I start a live (with input.harbor) like this: "live = input.harbor("live1")

radio

radio = fallback(track_sensitive=false, [live,radio])"

the metadata displayed are still the last track played on "radio" and don't update from "live".

How to update metadata from BUTT (the encoder that I use for the live) in liquidsoap.

I don't know if I was very clear, sorry for my bad english. Regards,

toots commented 5 years ago

Hi!

Could you bump you log level to 4:

set("log.level",4)

and send us some logs around the time your DJ connects to the harbor?

Also, what version of liquidsoap are you using?

Thanks!

10kes commented 5 years ago

yes of course, here it is: "2019/02/13 07:36:59 [harbor:4] Header: Host, value: localhost:PORT. 2019/02/13 07:36:59 [harbor:4] Header: User-Agent, value: butt 0.1.17. 2019/02/13 07:36:59 [harbor:4] Header: Content-Type, value: audio/mpeg. 2019/02/13 07:36:59 [harbor:4] Header: ice-name, value: in the mix. 2019/02/13 07:36:59 [harbor:4] Header: ice-public, value: 0. 2019/02/13 07:36:59 [harbor:4] Header: ice-url, value: (null). 2019/02/13 07:36:59 [harbor:4] Header: ice-genre, value: Dnb. 2019/02/13 07:36:59 [harbor:4] Header: ice-description, value: Yo. 2019/02/13 07:36:59 [harbor:4] Header: ice-audio-info, value: ice-bitrate=128;ice-channels=2;ice-samplerate=44100. 2019/02/13 07:36:59 [harbor:4] Client logged in. 2019/02/13 07:36:59 [harbor:4] SOURCE request on /live. 2019/02/13 07:36:59 [harbor:4] Adding source on mountpoint "/live" with type "audio/mpeg". 2019/02/13 07:36:59 [decoder:4] Trying method "WAV" for "audio/mpeg"... 2019/02/13 07:36:59 [decoder:4] Trying method "PCM/BASIC" for "audio/mpeg"... 2019/02/13 07:36:59 [decoder:4] Trying method "FLAC" for "audio/mpeg"... 2019/02/13 07:36:59 [decoder:4] Trying method "OGG" for "audio/mpeg"... 2019/02/13 07:36:59 [decoder:4] Trying method "MAD" for "audio/mpeg"... 2019/02/13 07:36:59 [decoder:3] Method "MAD" accepted "audio/mpeg". 2019/02/13 07:36:59 [threads:3] Created thread "harbor source feeding" (3 total). "

10kes commented 5 years ago

and the version is 1.1.1, I used the "apt-get install liquidsoap" command in ubuntu

PB-SF commented 5 years ago

Hi.

We have been using BUTT for a very long time. How do you do the meta update? From a file or manually?

Interestingly enough, some of our moderators update the meta without any problems directly when connecting to the server. For some others, it does not work without rereading the file or reentering the meta.

Which BUTT version do you use?

Greetz

10kes commented 5 years ago

Hi, I'm using BUTT 0.1.17 (on windows). I can't updyte metadata on liquidsoap, it doesn't take effect and stays on the last track played from the playlist. In BUTT I I enter manually the "stream infos" and I would like this one be reflected on the liquidsoap metadata (in my case:[harbor:4] Header: ice-name, value: in the mix.).

toots commented 5 years ago

ice-name and ice-description cannot be updated unless you reconnect the stream. unfortunately.

toots commented 5 years ago

Will close here then, let me know if you need more info.

10kes commented 5 years ago

Hi sorry I’m not sure to understand, there is impossible to update metadata on liquidsoap when a dj connects on the stream without a liquidsoap restart? I would like to: when a dj connect on input.harbor with butt, the ice-description become the liquidsoap metadata. Also how we can automaticly update metadata as « dj in mix » when he connect on liquidsoap with harbor on the mount?

toots commented 5 years ago

Hi,

ice-name and ice-description are set per-stream and usually not passed down to the listener and displayed like track and artist name.

If you want these values to be displayed you have several options:

  1. Re-send them as track metadata
  2. Use the on_connect parameter from input.harbor to receive the values and insert them as stream metadadata
PB-SF commented 5 years ago

Hi.

Could it be that you confuse the ICE metadata with the title information?

The ICE metadata are entered in BUTT via the "stream info". These are not passed on to the listener and are not displayed in any player. That's why I'm not sure what you want to do with them in liquidsoap?

Do you mean the title information displayed to the listener in the player (VLC, etc.) in the title bar, which will be passed to Liquidsoap in BUTT via the Stream tab. Either manually in the field "Update song name manually" or per file in the field "Update song name from file"

Maybe you have more detailed information about the metadata you use and what you want to do with it.

I do not think it's a problem with Liquidsoap. Should that be the case, we can also gladly continue this directly by email and @toots can close this here.

Greetz

10kes commented 5 years ago

Hi, Thanks a lot! Have a nice day!

stollr commented 4 years ago

@toots ice-name and ice-description aren't passed to the listener, but to the icecast server. Those information can then be requested by external scripts via the /admin/stats web endpoint to get the server name. This is often used to show the name of the current DJ who is on air.

Or is their another way to achieve this?

Update I have found #381. I suppose that this is what I (and @10kes) want to achieve?