Also worth mentioning that if you want a source to connect to a specific Sid on 
a v2 server, you can use the stream specifier as part of the password to map to 
its corresponding sid.

In shoutcast.output:

password = "hackme:#1"

password = "hackme:#2"

password = "hackme:#3"

For Shoutcast v1 you do not have to specify a username, but if you still feel 
the need, you should use "source" as the username

username = "source", password = "hackme"

You also do not need to specify an sid with v1 dnas

But I think maybe your question was more about metadata problems?

Can you detail a little more about what roles centova, liquidsoap, sam 
broadcaster, and Shoutcast dnas play?

Are you looking to replace sam with liquidsoap?

Which app is running the dj port?
Which app is running the 'source port'?
Which app is sending audio data to the dj port?

Im not sure if this is still the case with newer versions of liquidsoap but I 
was never able to get metadata updates to work when broadcasting to a 
liquidsoap created dj port that liquid soap then sends on to a dnas.

I had to create a http harbor that would listen for url based get requests 
containing the song title updates. Then watch a log file for title updates from 
my source software. When it sees a title thats different from the current it 
will curl the url setup in the http harbor with the new title as a url 
parameter.

For example: 

user@host:~ $ curl -s -o /dev/null 
"http://127.0.0.1:8080/setmeta?title=SongTitleGoesHere"; > /dev/null 2>&1

Its the same concept as sending title updates via the admin.cgi url method on 
dnas.


The following is a complete working example.

####################################################################

# local ip address to bind and listen for input (dj or metadata)
set("harbor.bind_addr","127.0.0.1")

# port and pass for live djs to connect to (shoutcast protocol)
live = input.harbor(icy=true,"/",port=8010,password="PASS")

# path to playlist file which contains a list of local mp3's 
(/home/user/mp3/song.mp3)
playlist = playlist("/home/user/mp3/playlist.txt")

# path to failover song if all above fails
emergency = single("/home/user/mp3/backup.mp3")

# do not monitor for silence and specify the fallback/priority order
radio = fallback(track_sensitive=false,[live,playlist,emergency])

# function to manually set the song title
title = insert_metadata(radio)
insert = fst(title)
radio = snd(title)

def set_meta(~protocol,~data,~headers,uri) =
title = url.split(uri)
meta = metadata.export(snd(title))
ret = if meta != [] then insert(meta) "OK!" else "No metadata to add!" end
http_response(protocol=protocol,code=200,headers=[("Content-Type","text/html")],data="#{ret}")
 end

# port and uri to register metadata updates via http
harbor.http.register(port=8080,method="GET","/setmeta",set_meta)

# shoutcast servers to broadcast to
output.shoutcast(%mp3(bitrate=256,samplerate=44100,stereo=true),name="RADIO 
NAME",genre="GENRE",host="127.0.0.1",port = 8000,password = "PASS",radio)

##################################################################################

But after reading https://github.com/savonet/liquidsoap/blob/master/CHANGES it 
looks like it wont be needing the manual method too much longer =]

Cheers,

Alex

> On Mar 19, 2017, at 9:17 16AM, neralex <[email protected]> wrote:
> 
> I'm working without Centova Cast and I build my own management with 
> liquidsoap without any external software and there it works as I 
> pointed. So I guess the issue is based on the source of Centova Cast or 
> on the source-client itself.
> 
> BTW: liquidsoap is an v1 source, it doesn't handle the v2 protocol.
> 
> Open another port wher you can connect directly with a streaming 
> source-client like winamp-dsp or butt and pass meta-data, then compare 
> the output with your Centova Cast output in the logfiles. If should it 
> work, then the issue is based on the source of Centova Cast.
> 
> 
> Am 19.03.2017 um 15:20 schrieb Alan Fahrner:
>> Thanks for the suggestion neralex.  I gave it a shot, but it didn’t
>> change the behavior.
>> 
>> I suspected it wouldn’t…basically, if you don’t give it the icy_id, then
>> it defaults to 1.
>> 
>> It’s all very odd given if I connect to the source port, all is well.  I
>> connect to the Centova Cast DJ port…meta data issues.
>> 
>> I’m curious, does anyone know if there is a way to force
>> output.shoutcast() to connect v1 versus v2?  The way SAM Broadcaster
>> works is by connecting v1 (and the Centova Cast page says to connect
>> v1).  But, I could not get liquidsoap to do that.
>> 
>> Either way, still can use help. :-)
>> 
>> My best,
>> 
>> Alan
>> 
>> 
>> *From: *neralex <[email protected] <mailto:[email protected]>>
>> *Subject: **Re: [Savonet-users] Broadcasting to a SHOUTCast DJ Port*
>> *Date: *March 19, 2017 at 5:19:12 AM MDT
>> *To: *[email protected]
>> <mailto:[email protected]>
>> *Reply-To: *[email protected]
>> <mailto:[email protected]>
>> 
>> 
>> Hey!
>> 
>> You have to set the "ic_id" parameter in the output.shoutcast function
>> to pass it directly to the SHOUTcast2 mountpoint (sid) like this:
>> 
>> #port and pass for djs
>> live =
>> input.harbor(icy=true,icy_metadata_charset="UTF-8","/",port=8610,password="hackme")
>> 
>> #fallback
>> emergency = single("/home/shoutcast/emergency/jingle_001.mp3")
>> 
>> radio = fallback(track_sensitive=false,[live,emergency])
>> 
>> Here is an example for an 192kbit mp3 stream, which is using the 1st
>> mountpoint (sid=1) on the DNAS/port:
>> 
>> output.shoutcast(
>> %mp3(
>> bitrate=192,
>> samplerate=44100,
>> stereo=true
>> ),
>> icy_id=1,
>> name="station name",
>> genre="genre",
>> host="127.0.0.1",
>> port=8000,
>> password="hackme",
>> url="http://www.domain.tld/fish";,
>> radio
>> )
>> 
>> The same way for the 2nd mountpoint (sid=2), which is used for an 96kbit
>> mp3 stream on the same DNAS/port:
>> 
>> output.shoutcast(
>> %mp3(
>> bitrate=96,
>> samplerate=44100,
>> stereo=true
>> ),
>> icy_id=2,
>> name="station name",
>> genre="genre",
>> host="127.0.0.1",
>> port=8000,
>> password="hackme",
>> url="http://www.domain.tld/fish";,
>> radio
>> )
>> 
>> 
>> Am 19.03.2017 um 01:24 schrieb Alan Fahrner:
>>> Hi folks,
>>> 
>>> First, I’ve been having a great time experimenting with liquidsoap.
>>> Thanks to everyone behind this.
>>> 
>>> I am running into two issues, one especially problematic.
>>> 
>>> The problematic one is that when I connect to the Centova Cast DJ port,
>>> the server is not getting any data…and is throwing an error.  From the
>>> log you can see the successful connection:
>>> 
>>> 2017/03/18 18:11:01 [output(dot)shoutcast:3] Connecting mount sid#1 for
>>> ******@158.69.227.214...
>>> 
>>> However, whenever the song changes:
>>> 
>>> 2017/03/18 18:11:01 [output(dot)shoutcast:3] Metadata update may have
>>> failed with error: 404, Not Found: Weblet (HTTP/1.0)
>>> 
>>> On the SHOUTCast server side, it’s clear the end result is it got
>>> nothing meta-wise.
>>> 
>>> I’ve searched and searched all over the place and have not seen anything
>>> exactly like it.  I’ve tried all types of things based on what sounded
>>> even close, but no luck.  Some notes:
>>> 
>>> * It works fine if I use the source port
>>> * The connection on the DJ port is supposed to be SHOUTCast v1, which
>>>   means I shouldn’t give a name, but provide the password as
>>>   “username:password” - that never worked…I finally was able to
>>>   connect providing it separately as a user and a password
>>> * If I set icy_metadata to “false” the error is no longer thrown, but
>>>   still no meta data gets the server
>>> * If I set icy_id to 0, I cannot figure out a way to login (which is
>>>   probably fine, I had read something that made me wonder if I should
>>>   try 0)
>>> 
>>> Any ideas?
>>> 
>>> I will ask my other question in another e-mail to keep the string clean.
>>> 
>>> Thanks!
>>> 
>>> Alan
>>> 
>>> 
>>> 
>>> 
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org
>>> <http://Slashdot.org>! http://sdm.link/slashdot
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Savonet-users mailing list
>>> [email protected]
>>> <mailto:[email protected]>
>>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> 
>> 
>> 
>> _______________________________________________
>> Savonet-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/savonet-users
>> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Savonet-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/savonet-users

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to