Announcement

Collapse
No announcement yet.

NSV + Flash = yes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • you got this in your web.xml file?

    code:


    <servlet>
    <servlet-name>stats</servlet-name>
    <description></description>
    <servlet-class>com.thebitstream.shoutcast.Servlet</servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>stats</servlet-name>
    <url-pattern>/stats</url-pattern>
    </servlet-mapping>

    Comment


    • Yes...just to be sure, here is the complete file (untouched from your source).

      PHP Code:
      <?xml version="1.0" encoding="UTF-8" ?>
      <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee [url]http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd[/url]">

          <display-name>Shoutcast</display-name>
          

          <servlet>
            <servlet-name>stats</servlet-name>
            <description></description>
            <servlet-class>com.thebitstream.shoutcast.Servlet</servlet-class>     
          </servlet>    

          <servlet-mapping>
              <servlet-name>stats</servlet-name>
              <url-pattern>/stats</url-pattern>
          </servlet-mapping>    
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>Forbidden</web-resource-name>
                  <url-pattern>/WEB-INF/*</url-pattern>
              </web-resource-collection>
              <auth-constraint />
          </security-constraint>

          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>Forbidden</web-resource-name>
                  <url-pattern>/persistence/*</url-pattern>
              </web-resource-collection>
              <auth-constraint />
          </security-constraint>
          
          <security-constraint>
              <web-resource-collection>
                  <web-resource-name>Forbidden</web-resource-name>
                  <url-pattern>/streams/*</url-pattern>
              </web-resource-collection>
              <auth-constraint />
          </security-constraint>
      </web-app>

      Comment


      • Boy, I dont know, that's strange. Did you copy the application to the 'dist/webapp' folder? No problems here: http://fatdot.com:5080/shoutcast/stats

        Comment


        • couple that with this, and you can see it does count. http://www.thebitstream.com/radio_tacoma.html

          Comment


          • Well here works that /shoutcast/stats - but 0 Listeners :-)

            but how do i configure it to get the stream from our nsv?
            Which files in /WebApps/Shoutcast do i have to modify ?

            In : Web-INF/red5-web.xml i edited:

            code:

            <bean id="shoutcast.stream_1" class="com.thebitstream.shoutcast.StreamConfiguration">
            <property name="outputName" value="BeatNet" />
            <property name="port" value="7520" />
            <property name="password" value="nsvpassword" />
            </bean>

            and in Application.java i removed "//" and edited to this, but Live3 wont get startet at Red5


            code:

            Shoutcast.openExternalURI(scope, "live3", "hxxp://s1.joe-stream.de:7520/;stream.nsv");
            System.out.println("Starting App with server count: "+serverPorts.size());
            for(int i=0;i<serverPorts.size();i++)
            {

            When i Start Red5 Server at the end i become this to see:

            [CODE]
            [INFO] [Launcher:/installer] org.red5.server.service.Installer - Installer servi
            ce created
            Starting App with server count: 1
            Starting stream name BeatNet-Radio

            as far as good, but when I now start the Shoutcastserver on the Mainserver i got these Errormessages:

            code:

            java.net.BindException: Address already in use: JVM_Bind
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at java.net.ServerSocket.<init>(ServerSocket.java:97)
            at org.red5.server.plugin.shoutcast.parser.NSVThread.listen(NSVThread.ja
            va:149)
            at org.red5.server.plugin.shoutcast.parser.NSVThread.execute(NSVThread.j
            ava:214)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.process(NSVConsum
            er.java:119)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.run(NSVConsumer.j
            ava:104)
            at java.lang.Thread.run(Thread.java:619)
            java.net.BindException: Address already in use: JVM_Bind
            at java.net.PlainSocketImpl.socketBind(Native Method)
            at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
            at java.net.ServerSocket.bind(ServerSocket.java:319)
            at java.net.ServerSocket.<init>(ServerSocket.java:185)
            at java.net.ServerSocket.<init>(ServerSocket.java:97)
            at org.red5.server.plugin.shoutcast.parser.NSVThread.listen(NSVThread.ja
            va:149)
            at org.red5.server.plugin.shoutcast.parser.NSVThread.execute(NSVThread.j
            ava:197)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.process(NSVConsum
            er.java:119)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.run(NSVConsumer.j
            ava:104)
            at java.lang.Thread.run(Thread.java:619)
            Exception in thread "Thread-2" java.lang.NullPointerException
            at org.red5.server.plugin.shoutcast.parser.NSVThread.execute(NSVThread.j
            ava:202)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.process(NSVConsum
            er.java:119)
            at org.red5.server.plugin.shoutcast.stream.NSVConsumer.run(NSVConsumer.j
            ava:104)
            at java.lang.Thread.run(Thread.java:619)

            Okay I Finally found the Problem : It is Port 7520 of our Shoutcast server - how to fix that, without chaning our mainstream port ?
            Last edited by DJTOMCAT; 1 December 2009, 00:43.

            Comment


            • The beans only open ports, and since you already have shoutcast there, it will have a bind error.

              If you want the un-commenting to work, you need to recompile it with javac or eclipse or ant.

              Comment


              • Hi

                well it is port 7520/7521 from the Stream which cause that error. Does something else needed on this port by Red5 ?

                How can i Recompile this , never made this before ;( Chaging the Port is not good for our listeners.

                When i try to Compile it with "JAVAC Application.java"

                Only get Errors... like
                code:

                application.java:47: cannot find symbol
                symbol : class StreamConfiguration
                location: class com.thebitstream.shoutcast.Application
                List<StreamConfiguration> serverPorts;

                Which Java Do i Need to Compile ? I use jdk-6u2-windows-i586-p.exe. I also tried DJ Java Compiler , wont work, too
                Last edited by DJTOMCAT; 1 December 2009, 03:50.

                Comment


                • You need to compile against the entire source folder, not just the application class file. You have the source file right next to the application file. I use eclipse.

                  Comment


                  • Hi,

                    I'll do it in german for DJ Tomcat, i've read already some other posts from hin around the internet and we're both german, so i think its easier
                    Originally posted by DJTOMCAT
                    Which Java Do i Need to Compile ? I use jdk-6u2-windows-i586-p.exe. I also tried DJ Java Compiler , wont work, too
                    Du musst dir bei allem im klaren sein, dass das hier keine Anfängersachen ala 1-Klick-Fertig sind.

                    Du solltest dich mit folgenden Sachen vertraut machen, bevor du dich hierran wagst:
                    - Red5
                    - Subversion
                    - Umgang mit Eclipse
                    - Java programmieren
                    - Eclipse Red5 Plugin
                    - Compilieren von Red5 in einer Eclipseumgebung

                    Zu deinen Fragen aus dem Adobe / Flowplayer Forum:
                    Das ist eine eigens für das Webradio programmierte Lösung. Und nein: Flowplayer ist nicht das "Programm" was den Flashstream erzeugt. Es geht auch mit jedem anderen Flashplayer, ich fand den Flowplayer nur schön zu konfigurieren

                    Wie Smelter schon sagte: Damit du dieses Red5 Plugin als Client für einen existieren Stream nutzen kannst, musst du es recompilieren. Damit der 0-Listener Bug behoben wird, musst du darüber hinaus noch Änderungen am Red5 Core vornehmen und Red5 neu kompilieren. Das geht alles aber nicht ohne fundierte Vorkenntnisse.

                    Deine aktuellen Fehlermeldungen sagen, dass du zwar das Plugin kompilieren willst, aber java noch Abhändigkeiten lösen will, die es nicht findet. Hast du die red5.jar in deinem Eclipse Projekt mit eingebunden beim compilieren?

                    Comment


                    • hi.
                      I'll anwer in English, so that everybody else can read it, too

                      Reading a bit in the red5 code repository i found the new icyplugin which seems to do excately the same as the shoutcast plugin. It would, if it wasn't throwing nullpointer exceptions

                      In this Plugin there are a few lines of code, flipping the nsv video frame so that it isn't upide down (i think). Maybe this could be useful solving the current issue?

                      The code is here:


                      btw: Is there a way flipping the video in flowplayer?

                      Comment


                      • @oLRi, I wrote you a PM, because i dont want to spam this thread in german, but will post my successes in english here.

                        Comment


                        • Hi Patrice,
                          Originally posted by dr.allgood
                          Reading a bit in the red5 code repository i found the new icyplugin which seems to do excately the same as the shoutcast plugin. It would, if it wasn't throwing nullpointer exceptions
                          The icyplugin is based on the shoutcast.jar by smelter. And as far as i know it will be published with the new Version of Red5. As soon as the plugin-system is ready.

                          Comment


                          • and the plugin is ready imho
                            Couldn't get it working yet

                            Comment


                            • Originally posted by Smelter
                              Boy, I dont know, that's strange. Did you copy the application to the 'dist/webapp' folder?
                              Sure it did.
                              Maybe i found something:
                              Eclipse tells me, that <description> is "wrong". Maybe something with the XML Definition in Eclipse / Java? I'm using Eclipse Ganymade

                              Comment


                              • I wrote the shoutcast stuff into the red5 core and gave it to the red5 team. They were already building the plugin system, and decided to make my shoutcast code into a plugin. The last I heard , they had decided to rewrite the code from scratch, to be more in line with the red5 'mina' usage. In the process I think it was broken and fixed a couple times. I re-sent my version again as a plugin, but I stopped hearing or asking about updates.

                                Not satisfied with an unfinished and broken icy plugin, I decided to kill the h264 video and Mp3 audio mysteries for myself.

                                Some notes:
                                The ICY plugin doesn't flip the video for you. It only gives you negative numbers if the video is VPx.

                                The ICY plugin, may or may not support h264 and mp3.

                                The icy plugin might support Icecast aac audio streams.

                                The source code from the icy plugin looks old. I dont know if it is even being developed anymore. It appears to be a combination of my patches and the rewrite.

                                So with that said, I would advise to not use the icy plugin.
                                The shoutcast jar starts from where Icy plug-in ended.

                                Comment

                                Working...
                                X