I actually got this to work this morning finally. The problem was on my auth server. I see the source auth hook being sent a lot, is there anyway to get the current metadata in that hook? Ideally, every time the source is updated, I'd like to get a hook so I can track the songs that are being played. Alternatively, the only way I can see doing it, is to make a get request every X seconds and watch for the song to change. Alex On 11/7/2018 9:38 AM, Philipp Schafft wrote:> Good afternoon, > > On Wed, 2018-11-07 at 08:08 -0500, Alex Hackney wrote: >> When I stream with winamp, it appears to ask for a username and password >> Everytime. If I just set the return to true no matter what, will it prevent >> the client from asking for a password? > This sounds like there is a configuration problem. Icecast by itself > does not send a 401 without a negative reply from the server (or a > backend failure). > > Maybe you can share your <mount> block (with passwords removed (if any)) > with us? > > Please also check your error.log for any problems. Related lines should > include "auth" somewhere in them. > > With best regards, > > >> On Sun, Nov 4, 2018, 06:57 Thomas B. Rücker <thomas at ruecker.fi wrote: >> >>> >>> On 11/02/2018 11:41 PM, Alex Hackney wrote: >>>> I am looking for a way that I can use to send a hook to my api when >>>> particular things happen. >>>> >>>> For instance, i need to know when listeners or sources connect or >>>> disconnect and when song meta data changes on a stream. >>>> >>>> I see this data on the log and can write a script to do it by >>>> monitoring the log but does icecast have a better way? >>>> >>>> Almost looks like the auth block could do it but I don't want to >>>> prompt listeners for a login. >>>> >>> That's actually how you do it. You use the URL-auth backend and always >>> return positive authentication. >>> >>> Please make sure that you are running version 2.4.4 though. Older >>> versions have a security issue in the URL-auth code! > > > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20181108/49d4ee7f/attachment.html>
Good morning, On Thu, 2018-11-08 at 12:45 -0500, Alex Hackney wrote:> I actually got this to work this morning finally. The problem was on my > auth server.Perfect. :)> I see the source auth hook being sent a lot, is there anyway to get the > current metadata in that hook?No. The auth happens long before the client is attached to any source. In fact in Icecast 2.5.x the auth backend can even redirect the client to other resources.> Ideally, every time the source is updated, I'd like to get a hook so I > can track the songs that are being played. Alternatively, the only way I > can see doing it, is to make a get request every X seconds and watch for > the song to change.There currently isn't one. For 2.5.x there already is a ticket[0] for that. What you can do is polling the status XML. You can also use the STATS interface[1]. Also there is the playlist log. You can watch and follow that file to see when updates are made. With best regards, [0] https://gitlab.xiph.org/xiph/icecast-server/issues/2189 [1] Try it with: wget -qO - --method=STATS http://admin:hackme at icecast.example.org:8000/ -- Philipp Schafft (CEO/Geschäftsführer) Telephon: +49.3535 490 17 92 Löwenfelsen UG (haftungsbeschränkt) Registration number: Bickinger Straße 21 HRB 12308 CB 04916 Herzberg (Elster) VATIN/USt-ID: Germany DE305133015 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: This is a digitally signed message part URL: <http://lists.xiph.org/pipermail/icecast/attachments/20181109/5bd54b4f/attachment.sig>
Couldn't you also just have a client stream locally from icecast that can do things on metadata change? I mean it's a bit icky but it'd work. ---- Philipp Schafft wrote ---->Good morning, > >On Thu, 2018-11-08 at 12:45 -0500, Alex Hackney wrote: >> I actually got this to work this morning finally. The problem was on my >> auth server. > >Perfect. :) > > >> I see the source auth hook being sent a lot, is there anyway to get the >> current metadata in that hook? > >No. The auth happens long before the client is attached to any source. >In fact in Icecast 2.5.x the auth backend can even redirect the client >to other resources. > > >> Ideally, every time the source is updated, I'd like to get a hook so I >> can track the songs that are being played. Alternatively, the only way I >> can see doing it, is to make a get request every X seconds and watch for >> the song to change. > >There currently isn't one. For 2.5.x there already is a ticket[0] for >that. > >What you can do is polling the status XML. You can also use the STATS >interface[1]. Also there is the playlist log. You can watch and follow >that file to see when updates are made. > >With best regards, > > > >[0] https://gitlab.xiph.org/xiph/icecast-server/issues/2189 >[1] Try it with: wget -qO - --method=STATS >http://admin:hackme at icecast.example.org:8000/ > > >-- >Philipp Schafft (CEO/Geschäftsführer) >Telephon: +49.3535 490 17 92 > >Löwenfelsen UG (haftungsbeschränkt) Registration number: >Bickinger Straße 21 HRB 12308 CB >04916 Herzberg (Elster) VATIN/USt-ID: >Germany DE305133015 > >_______________________________________________ >Icecast mailing list >Icecast at xiph.org >http://lists.xiph.org/mailman/listinfo/icecast-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.xiph.org/pipermail/icecast/attachments/20181109/b2a8d824/attachment.html>