Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Streaming two streams on same port

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Wed Jun 28, 2006 4:02 am    Post subject: Streaming two streams on same port Reply with quote

Hello

I was wondering that is it possible to just have one icecast installed and stream 2-3 stream to it? Right now we set up a new icecast for each stream that is sent through NSV live capture. I am aware that we can relay as many as we went using just one instance of ICECAST, but is there any way that we can STREAM 2-3 channels and just have one icecast installed. Maybe all the channels have the same port but different mountpoint, just wondering. Seems confusing to me. This is so that I don't have to run so many instances of Icecast. Thanks and would appreciate any help
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Jun 28, 2006 11:40 am    Post subject: Reply with quote

I suspect the issue you are seeing is actually the shoutcast protocol communication between your nsv source client and icecast. The protocol requires 2 ports but does not pass a mountpoint so icecast has to assume one, this limits icecast 2.3.1 to one shoutcast-style source client per icecast.

If you really want to allow multiple shoutcast-style source clients to talk to the same icecast then you'll have to use my branch work. You can't get around the multiple ports, each shoutcast source client will need 2 ports but what you can do is the following

Code:

<listen-socket>
    <port>8000</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
</listen-socket>

<listen-socket>
    <port>8002</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream2.nsv</shoutcast-mount>
</listen-socket>


The usual per-mount settings can be applied. Latest tarball is on http://karl.mediacast1.com currently kh6c is the latest snapshot.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Wed Jun 28, 2006 4:15 pm    Post subject: Reply with quote

Hmm, thanks for your help but I had some problems still. Sorry I am a little noobish at this and might not have done it properly. This is what I did:

In my Icecast, I replaced the following code:
Code:
 <listen-socket>
        <!-- Configure the shoutcast DSP with *this* port
             the shoutcast DSP actually will connect the
             encoder to this port + 1 -->
        <port>8020</port>
    </listen-socket>
    <listen-socket>
        <!-- This port *must* be one larger than the one defined
             above and defined as 'shoutcast-compat' -->
        <port>8021</port>
        <shoutcast-compat>1</shoutcast-compat>
    </listen-socket>
       


With this:
Code:
<listen-socket>
    <port>8020</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
</listen-socket>

<listen-socket>
    <port>8030</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream2.nsv</shoutcast-mount>
</listen-socket>


But when I tried to connect to this Icecast on ports 8020 and 8030 using NSV LIVE Capture, nothing happenned at all. All connections, clients, clients_connections remained on 0. In my ICECAST when I am using your code, what do I do with this code in my icecast? Do I change it at all? -->
Code:

    <!-- This is the manufactured mount name for your shoutcast
         compatible stream. Since the shoutcast DSP (and NSV encoder)
         cannot specify a mountpoint, you must enter it here -->
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
    <!-- Use this if you are streaming NSV using the nullsoft NSV encoder
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>


Once again, sorry if Im doing something completely wrong as I'm not that good with Icecast. Thanks
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Jun 28, 2006 7:06 pm    Post subject: Reply with quote

The xml snippet you specified is ok, what I'm wondering about is why certain stats are not increasing. After starting icecast verify 2 things :-

1. use 'netstat -tln' to verify that ports 8020, 8021, 8030, 8031 are being listened on

2. Check that the status page is accessible externally on port 8020 and port 8030.

Also verify that you allow access to icecast through any firewalls or NAT setup that you may have. Your network administrator should be able to fix that, if that is an issue.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Wed Jun 28, 2006 9:43 pm    Post subject: Reply with quote

Hello
I know for sure Icecast is permitted to run and there is no firewall/anything blocking it as I run icecast on my server all the time. I used netstat -tln and my results were this (I was using port 8070 and 8075 in Icecast):

Code:

  TCP    windows-server:8070    windows-server:0       LISTENING
  TCP    windows-server:8075    windows-server:0       LISTENING


It is only listening to the ports specified, not port +1, is that fine?

I checked and the status page is accessible externally for ports 8070 and 8075. But there are no mountpoints in there - the mountpoint section is empty even though I am streaming on that port.

On the icecast itself, all the values continue to remain at 0 (even when I'm streaming).

This is my exact code in the Icecast:


Code:

<!-- This config file can be used to configure icecast
     in shoutcast compatibility mode which will allow
     you to connect the Shoutcast DSP (or other Nullsoft
     encoders such as the NSV encoder). Note this is just
     a minimal config, check the main icecast.xml.dist file
     for a complete list of possible configuration options -->
<icecast>
    <limits>
        <sources>12</sources>
    </limits>
    <authentication>
        <!-- Configure the shoutcast DSP to use this password -->
        <source-password>pass</source-password>
        <!-- This is used for icecast's web interface -->
        <admin-user>user</admin-user>
        <admin-password>password</admin-password>
    </authentication>
   
    <!-- This is the manufactured mount name for your shoutcast
         compatible stream. Since the shoutcast DSP (and NSV encoder)
         cannot specify a mountpoint, you must enter it here -->
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
    <!-- Use this if you are streaming NSV using the nullsoft NSV encoder
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
    -->
    <!-- This is the hostname other people will use to connect to your server.
    It affects mainly the urls generated by Icecast for playlists and yp
    listings. -->
    <hostname>localhost</hostname>
    <!-- You MUST define 2 ports, port and port +1 -->


<listen-socket>
    <port>8070</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream1.nsv</shoutcast-mount>
</listen-socket>

<listen-socket>
    <port>8075</port>
    <!-- defining shoutcast-mount in here will make icecast automatically allocate <port> and <port>+1 -->
    <shoutcast-mount>/stream2.nsv</shoutcast-mount>
</listen-socket>

           <fileserve>1</fileserve>
    <paths>
        <logdir>./logs</logdir>
        <webroot>./web</webroot>
        <adminroot>./admin</adminroot>
    </paths>
    <logging>
        <accesslog>access.log</accesslog>
        <errorlog>error.log</errorlog>
         <loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
    </logging>
    <security>
        <chroot>0</chroot>
    </security>
</icecast>



Thanks.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Jun 28, 2006 11:39 pm    Post subject: Reply with quote

That exact xml works here on all 4 ports, are you sure you are running the right version?

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Thu Jun 29, 2006 2:40 am    Post subject: Reply with quote

I am running Icecast 2.3.1
Hmm, are you using NSV Live Capture to stream as well? I don't know what's wrong then....-confused-

It works fine when I'm just using one port though. And with the two-port code you gave, how come in netstal -a there is nothing "listening" to the Port +1?

Thanks...
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jun 29, 2006 1:32 pm    Post subject: Reply with quote

2.3.1 won't do this, as I said before, if you really want multiple nsv streams from different shoutcast style source clients (eg nsvcap) at the same time then you'll have to use my branch (kh6c being the latest)

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Thu Jun 29, 2006 10:53 pm    Post subject: Reply with quote

Hmm, but that is the source one right? Because when I download Icecast on my server, I used "Windows Setup : icecast2_win32_v2.3.1_setup.exe" from icecast.org. So what should I use instead of that? Sorry I'm a little confused. The one you said - icecst 2.3.kh6c, using that I am unable to open the icecast.exe (with the buttons Stop Server/Start Server) and edit config. Thanks for your help...but im a little confused again Sad
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jun 30, 2006 12:36 am    Post subject: Reply with quote

So what you really need is a prebuilt win32 release. Win32 builds have been done by oddsock in the past, I would build one however my VC setup is not doing right thing at the moment *grr

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vbwrong



Joined: 28 Jun 2006
Posts: 20

PostPosted: Sat Jul 01, 2006 12:15 am    Post subject: Reply with quote

oh okay...thanks anyway.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber