| View previous topic :: View next topic |
| Author |
Message |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Mon Jan 09, 2012 10:48 pm Post subject: Alias mount |
|
|
Hi all just a smiple one I hope.
I want multiple mount points for dj logins. So I am using the alias feature. So the main mount point is /listen
fall back is /offline
So if dj1 logs into mountpoint dj1 it will stream over /listen and when disconnected back to the fallback
But I cannot listen to the dj login for some reason.
here is the config
| Code: |
<icecast>
<limits>
<clients>3</clients>
<sources>2</sources>
</limits>
<authentication>
<source-password>mypass</source-password>
<admin-user>user name</admin-user>
<admin-password>pass</admin-password>
</authentication>
<hostname>recordheadz.net</hostname>
<listen-socket>
<port>xxxx</port>
</listen-socket>
<listen-socket>
<port>xxxx</port>
<shoutcast-compat>1</shoutcast-compat>
</listen-socket>
<mount>
<mount-name>/offline</mount-name>
<password>pass</password>
<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<hidden>1</hidden>
</mount>
<mount>
<mount-name>/dj1</mount-name>
<password>xxxx</password>
<fallback-mount>/offline</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<hidden>1</hidden>
</mount>
<mount>
<mount-name>/listen</mount-name>
<password>liliarogers</password>
<fallback-mount>/offline</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<max-listeners>1</max-listeners>
<dump-file>/tmp/dump-example1.ogg</dump-file>
<hidden>1</hidden>
</mount>
<shoutcast-mount>/offline</shoutcast-mount>
<paths>
<alias source="/" dest="/offline"/>
</paths>
</icecast> |
|
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 1:22 am Post subject: |
|
|
some confusing use of options there. remove all the dump-file references until you know what content you want to store.
I would suggest you have /offline as the fallback, /dj1 as your source client point (any others can be copies of /dj1) where a fallback override to /offline is configured. The configure /listen as a local relay of /offline. listeners will stick to /listen and /listen will bounce between /offline and /dj1.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Tue Jan 10, 2012 11:08 am Post subject: |
|
|
Thanks Karl
Im new to the ice cast. I have always used shoutcast but Ice seems to be more versatile.
Can you just give me a briefe idea of what the alias is for?
The reason why I wanted alias was for different djs to have there own login so I can track who is logging in when.
With shoutcast I can set the name and pass word of the dj but some of my dj's are using sam and with the mount name and password its almost the sam e as a user name and pass. The only other problem is I cannot set up specific times for that particular dj to log in. Its just a password that they can use at any time.
So the problem will also be if a dj leaves the station I would have to change the password for the dj login mount which would effect all other djs.
Whats your thougts
thanks for the help Karl
Dave |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 2:31 pm Post subject: |
|
|
An alias is really for listener requests to be diverted from one place to another, it's really just a simple name translation. It's not used for the source client connections.
As indicated before, the /dj1 would be specific to one broadcaster and /dj2 would be specific to another. Each would have there own username and password and logged as such in the access log.
If you wanted to force a limited period then you need the kh tree as that can take a <max-stream-duration>3600</...> as a mount setting. The downside with that in this situation is that a source client would reconnect taking it again immediately (typically). The other option to use is allowing a more flexible auth with url
In the kh/trunk tree you can use an auth option "stream_auth" to pass a source client auth to a php script. That script can validate the source client based on mount time IP user or pass as passed in via POST. In the kh tree, you can also make the script return a header like
icecast-auth-timelimit: 3600
That will cause an automatic disconnection after 1 hour, whether your script allows them to re-validate is up to you.
So the question really is what is suitable for you. It sounds like you want to force a DJ to stop after a period of time (which may vary depending on which DJ is currently on), but don't want to allow them to reconnect after the slot is complete, so the script approach is suitable for that. All you would need is a list of DJs auth and time periods. a lookup and compare of the times against the clock and that tells you whether to allow or not.
As a single streaming point in such a case then all you would need is /offline and /listen where /listen has the DJ auth script referenced eg
<mount>
<mount-name>/listen</mount-name>
<authentication type="url">
<option name="stream_auth" value="http://....php" />
</authentication>
...
</mount>
I should just re-iterate, 2.3.2 does not have the stream_auth setting, only the kh tree and trunk and trunk does not have the max stream duration. If you want to use the 2.3.2 code then you'll need to the previous approach I mentioned using /offlne and /DJ1 with /listen as a local relay of /offline.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Tue Jan 10, 2012 3:13 pm Post subject: |
|
|
Hi Karl thanks again..
Am I being a bit thick here. I understand when you say set up mount points for each dj ie dj1 dj2 dj3 ect.... but how do I have those broadcast on the listen mountpoint? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 3:51 pm Post subject: |
|
|
Assuming /listen is a relay of /offline. That means that /offline has 1 listener, the relay. If dj1 connects (/dj1) then the override picks that 1 listener from /offline, moves it to /dj1. At this point, /listen is a relay getting content from /dj1. When /dj1 exits, the fallback goes back to /offline. All real listeners stay on /listen. /dj1 and /offline are not externally used by real listeners.
Using the relay on /listen means you have an anchor point which helps listeners joining after the DJ starts and helps if you want to list on a directory as that mountpoint is the point of entry for a listener.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Tue Jan 10, 2012 3:57 pm Post subject: |
|
|
Like this?
<relay>
<server>localhost</server>
<port>8001</port>
<mount>/dj1</mount>
<local-mount>/liten</local-mount>
<username>joe</username>
<password>soap</password>
</relay> |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 4:06 pm Post subject: |
|
|
yes, assuming port 8001 is the normal icecast port. and username/password is required on the internal mountpoints
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Tue Jan 10, 2012 4:21 pm Post subject: |
|
|
sweet thanks Karl. One more for ya today
Is it possible to update the config files without disrupting the server?
BY the way thanks alot for your insight.  |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 5:56 pm Post subject: |
|
|
You can send a HUP signal (kill -HUP pid) or for the kh tree you can also trigger a reload from the admin pages.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Tue Jan 10, 2012 7:53 pm Post subject: |
|
|
Karl I have set up the relay as I stated. I can log in under dj1 and from why I understand the password of both mounts have to math correct?
So it lets me log in but there is no output on the /listen mount. Its just playing the backup stream still. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Jan 10, 2012 9:04 pm Post subject: |
|
|
the question is vague, I would suggest you start with no listener auth at all until you have the stream layout you want. If you have the relay feeding off the /offline mount then you have the start. Next is getting /dj1 running which will be configured with a fallback-mount and fallback override as I originally mentioned and if you wish, a specific username and password for that source client.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Wed Jan 11, 2012 8:31 pm Post subject: |
|
|
<relay>
<server>localhost</server>
<port>8002</port>
<mount>/wildone</mount>
<local-mount>/listen</local-mount>
<password>pass</password>
<fallback-mount>/backuprelay</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
</relay>
I have used the above in the config file. If i tune into /listen mount I dont hear the stream comming in on wildone. any ideas mate? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Jan 11, 2012 10:38 pm Post subject: |
|
|
You do keeping adding entries for unknown reasons, those <fallback-*> entries belong in a <mount> not <relay> and you do not use a fallback setting in the relay in the situation I described. Only the /dj mount had the fallback/override
If /wildone is what was originally /offline then it looks to be ok, ie /listen is a relay of /wildone. I'm not entirely sure of what /backuprelay is supposed to be as the names do not match what was originally discussed.
karl. |
|
| Back to top |
|
 |
daverogers
Joined: 09 Jan 2012 Posts: 17
|
Posted: Wed Jan 11, 2012 10:51 pm Post subject: |
|
|
Sorry karl i copied an old section let me start over here and thanks again.
| Code: |
<icecast>
<limits>
<clients>5</clients>
<sources>5</sources>
</limits>
<authentication>
<source-password>****</source-password>
<admin-user>******</admin-user>
<admin-password>*******</admin-password>
</authentication>
<hostname>recordheadz.net</hostname>
<listen-socket>
<port>****</port>
</listen-socket>
<listen-socket>
<port>*****</port>
<shoutcast-compat>1</shoutcast-compat>
</listen-socket>
<mount>
<mount-name>/offline</mount-name>
<password>******</password>
<max-listeners>1</max-listeners>
<hidden>1</hidden>
<public>0</public>
</mount>
<mount>
<mount-name>/listen</mount-name>
<password>*******</password>
<fallback-mount>/offline</fallback-mount>
<fallback-override>1</fallback-override>
<fallback-when-full>1</fallback-when-full>
<max-listeners>1</max-listeners>
<public>0</public>
<hidden>1</hidden>
</mount>
<shoutcast-mount>/offline</shoutcast-mount>
<relay>
<server>localhost</server>
<port>*****</port>
<mount>/wildone</mount>
<local-mount>/listen</local-mount>
<password>****</password>
</relay>
</icecast> |
ok with the above I will always have a stream playing on the offline mount. which plays via the listen mount.
My listener will be on the /listen mount.
When wildone logs on he will take over the listen mount from the offline mount.
he problem I am having is I cannot seem to get the relay to pass thru to the listen mount.
cheers |
|
| Back to top |
|
 |
|