HTML5 MP3 Player Radio KPlayer


Hits: 21832  

1. Install Java

# yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

2. Install Ant

# cd /usr/local/src
# wget http://red5.svnlabs.com/apache-ant-1.8.2-bin.tar.gz
# tar zxvf apache-ant-1.8.2-bin.tar.gz
# mv apache-ant-1.8.2 /usr/local/ant

3. Export path for Ant and Java

Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server ;)

# export ANT_HOME=/usr/local/ant
# export JAVA_HOME=/usr/lib/jvm/java
# export PATH=$PATH:/usr/local/ant/bin
# export CLASSPATH=.:$JAVA_HOME/lib/classes.zip

Also add these lines in /etc/bashrc at last to available every-time logged in to SSH

4. Install SVN

# yum install subversion

5. Install RED5 Server

# cd /usr/local/src
# svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

6. Copy Red5 files

# cp -r dist/conf /usr/local/red5

7. Test Run

# sh red5.sh

ctrl + z

You need to allow port 5080 and 1935 to your server firewall.

# iptables -A INPUT -p tcp -m tcp –dport 5080 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp –dport 1935 -j ACCEPT

Red5 Server Status

# netstat -anp | grep 5080
# ps aux | grep red5

http://yourserver.com:5080/

If you have CentOS 64-bits server and you are getting error like

– Buildfile: build.xml does not exist!
– BUILD FAILED
– Cannot allocate memory

You might need to checkout modified files
# cd /usr/local/src
# svn co http://red5.googlecode.com/svn/java/server/tags/1_0/ red5

Build Failed (Life saver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Cannot run program “chmod”: java.io.IOException: error=12, Cannot allocate memory

# export _JAVA_OPTIONS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’
# export ANT_OPTS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’

Try solution here… http://code.google.com/p/red5/issues/detail?id=337

How to install Red5 Demos?

# cd /usr/local/red5/webapps/root
# svn checkout http://red5.googlecode.com/svn/java/server/tags/0_9_1/webapps/root/demos/

Then go to http://yourserver.com:5080/demos/

Please check all comments below for more help ;)







  • Sandeep Verma

    How to install Red5 Demos?

    Just checkout inside “/usr/local/red5/webapps/root”

    http://red5.googlecode.com/svn/java/server/tags/0_9_1/webapps/root/demos/

  • Sandeep Verma

    JAVA OPTIONS are Life Saver :) 

  • Sandeep Verma

    1. Ant directory
    2. echo $PATH
    3. Java Version -> open java

  • Sandeep Verma

    yum whatprovides */javac

  • Sandeep Verma

    oflaDemo not working =?>  Copied META-INF, WEB-INF, streams, loggertest.jsp  From Working examples  ;)

  • Sandeep Verma

    BUILD FAILED
    /usr/local/red5/build.xml:209: The following error occurred while executing this line:
    /usr/local/red5/build.xml:230: Error running /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/javac compiler

  • Sandeep Verma

    export PATH=$PATH:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin

  • Sandeep Verma

    # yum info ant

  • Sandeep Verma

    rtmp://localhost/oflaDemo

  • http://www.facebook.com/svnlabs Sandeep Verma

    Find Red5 Init Script here 
    http://www.sohailriaz.com/downloads/red5.txt

  • http://twitter.com/svnlabs Sandeep Verma

    service WowzaMediaServer status  (if exists and running)

    Could not start Red5 oflaDemo-> oflaDemo installed but folder emptyred5 dead but pid file exists 
    rtmp.RTMPHandler – Scope oflaDemo not found /var/log/messages

  • Venerablewarrior

    Hi Verma,
    Could you help me with my problem?
    I’ve installed the latest version of ant 1.8.4, installed RED5 0.91. 
    I have a CentOS 5.8 dedicated server with 512mb ram.
    I applied this code “export _JAVA_OPTIONS=”-Xms32m -Xmx128m”

    But in the end after I input “ant dist”, i always get these error:
    /usr/local/red5/build.xml:217: The following error occurred while executing this line:/usr/local/red5/build.xml:238: Error running /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/javac compilercould you help me with this please? It’s driving me crazy :(

  • Paul

    Followed this guide exactly (except ant is now 1.8.4 not 1.8.2), then went to my server port 5080 and it just “loads” forever.   iptables is turned off completely.  What could be going on?

    netstat results:

    [root@myserver:twitter  red5]# netstat -anp | grep 5080
    tcp        0      0 :::5080                     :::*                        LISTEN      14081/java
    tcp      343      0 ::ffff:192.168.2.111:5080   ::ffff:***.***.***.***:61186 ESTABLISHED –
    tcp      343      0 ::ffff:192.168.2.111:5080   ::ffff:***.***.***.***:60670 ESTABLISHED –
    tcp      294      0 ::ffff:192.168.2.111:5080   ::ffff:192.168.2.2:60699    ESTABLISHED –
    NOTE: (added *** to protect actual IP)

    ps results:

    [root@myserver:disqus  red5]# ps aux | grep red5
    root     14081  0.4  6.6 2324248 243864 pts/0  Tl   08:59   0:07 /usr/lib/jvm/java/bin/java -Dpython.home=lib -Dred5.root=/usr/local/red5 -Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector -Dcatalina.useNaming=true -Djava.security.debug=failure -cp /usr/local/red5/boot.jar:/usr/local/red5/conf:.:/usr/lib/jvm/java/lib/classes.zip org.red5.server.Bootstrap
    root     15126  0.0  0.0 103232   860 pts/0    R+   09:28   0:00 grep red5

  • Paul

     I used the init script below and now I can get to the Red5 default page at myserver:5080, however the small test video on that page is just black.   What could be causing this?  How can I determine what is causing this?

  • I am

    my process was ran perfectly till step 6.
    in some point of step 7; it says following.
    what may be the problem and how i get this job done?

    org.springframework.remoting.rmi.RmiRegistryFactoryBean – Unexporting RMI registryException org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.core’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.FatalBeanException: Editor class not found; nested exception is java.lang.ClassNotFoundException: org.apache.mina.integration.beans.InetSocketAddressEditor

    in step 3 i type these four lines also and run.

    echo ‘export ANT_HOME=/usr/local/ant’ >> /etc/bashrcecho ‘export JAVA_HOME=/usr/lib/jvm/java’ >> /etc/bashrcecho ‘export PATH=$PATH:/usr/local/ant/bin’ >> /etc/bashrcecho ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ >> /etc/bashrc 

    Thanks

  • I am

    What is your ram capacity?

  • Paul

     4GB

    The issue was just that I installed the Red5 on a different server than I was accessing it from and all of the client demos (including the box on the test page) try to access RTMP@localhost:twitter.  So, the client demos only work if you’re accessing them from the same computer Red5 is installed on.   

    I was able to upload my own Red5 Server app to the server and it worked great.

  • i am

    seems your issue has been fixed. can you tell me did u followed above guide fully when installing red5? is there some change?

  • Rnt

    I did everything exactly as u said and I get this error after running red5.sh

    Exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusObjectService’ defined in class path resource [red5-common.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/mina/core/buffer/IoBuffer

  • Rnt

    Solved.

    Instead of using Red5 subversion download as described on the guide I downloaded Red5 RC1 on the official page and it works!

  • Linux_zcy

    I also encountered this kind of problem, how to solve? Solve method can send my mailbox? 894988965 @qq.com

  • Linux_zcy

    Exception org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘statusObjectService’ defined in class path resource [red5-common.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/mina/core/buffer/IoBuffer
    ??????????I encountered this kind of problem, how to solve?The teacher can put the solution to my mailbox? 894988965 @qq.com thank you!

  • I am

    run ./red5.sh at the dist forlder. not in the red5 folder
    reply results.

  • Linux_zcy

    You are in/usr/local/red5 directory decompression of red5? Want to install look at red5. Sh is executable file green color files

  • Linux_zcy

    The more mistakes you solve?

  • I am

    yes it is green color. but i am not talking aout red5 folder. after go to red5 then type cd dist and press enter. you will get into dist folder then you can see another red5.sh green color file there also
    so excute it using this command ./red5.sh

    good luck and reply result

  • Eng Sysamouth

    Very good tutorial

  • Whatkai

    Hello ALL ,
    this is the error im getting when I try to run sh red5.sh or ./red5.sh in the /usr/local/red5/dist folder. 

    —-error from copied page —-
    … 53 common frames omitted[INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory – Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@54083e1e: defining beans [placeholderConfig,red5.server,rmiRegistry,mbeanServer,org.springframework.jmx.support.ConnectorServerFactoryBean#0,mbeanExporter,serializer,deserializer,minaEncoder,minaDecoder,statusObjectService,rtmpCodecFactory,rtmptCodecFactory,remotingCodecFactory,streamableFileFactory,filePersistenceThread,sharedObjectService,streamService,providerService,consumerService,schedulingService,warDeployService,remotingClient,object.cache,keyframe.cache,flv.impl,flvreader.impl,mp4reader.impl,mp3reader.impl,org.springframework.beans.factory.config.MethodInvokingFactoryBean#0,org.springframework.beans.factory.config.MethodInvokingFactoryBean#1,streamExecutor,fileConsumer,playlistSubscriberStream,clientBroadcastStream]; root of factory hierarchy[INFO] [main] org.springframework.jmx.support.ConnectorServerFactoryBean – Stopping JMX connector server: javax.management.remote.rmi.RMIConnectorServer@785e8d7d[INFO] [main] org.springframework.remoting.rmi.RmiRegistryFactoryBean – Unexporting RMI registry[INFO] [main] org.springframework.beans.factory.support.DefaultListableBeanFactory – Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@193936e1: defining beans [placeholderConfig,red5.common,red5.core,context.loader,pluginLauncher,tomcat.server]; root of factory hierarchyException org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘red5.common’ defined in class path resource [red5.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.context.support.FileSystemXmlApplicationContext]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘mbeanExporter': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘schedulingService’ defined in class path resource [red5-common.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot run without an instance id.
    ……—-
    don’t know what to do now … so any help please email me whatkai@yahoo.com . and post here to help others 

  • Anonymous

    Please try Java Buffer settings before start red5 ;)

  • Erkan

    Hello,

    Doing everything as you said. But constantly having trouble with an error like this ..

    Checked out revision 4541.
    [root@srv src]# mv red5 /usr/local/
    [root@srv src]# cd /usr/local/red5
    [root@srv red5]# ant prepare
    Buildfile: build.xml does not exist!
    Build failed

    The files looks as follows;

    [root@srv red5]# ls -l
    total 32
    -rw-r–r– 1 root root  1871 Jan 24 13:57 build.properties
    -rw-r–r– 1 root root  1324 Jan 24 13:57 license.txt
    -rw-r–r– 1 root root 19926 Jan 24 13:57 pom.xml
    drwxr-xr-x 5 root root  4096 Jan 24 13:57 src

    The correct version of Java installed,

    ant 1.8.4 installed,

    Svn board,

    System is not installed anything else.

    My system, CentOS 6 64-bit. There directadmin.

    Regards,
    Erkan

  • http://www.facebook.com/svnayak Sandeep Verma

    Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server  ;)

  • Erkan

    Hi,

    OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-1.50.1.11.5.el6_3-x86_64)OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

    Apache Ant(TM) version 1.8.4 compiled on May 22 2012

    And I’m sure it’s the right home paths ..

    I think I do not have any idea? :)

    Thanx

  • Michael Schinis

    hello, how do you make it run by default when you reboot the server?

  • thibault martin

    Bonjour , pour l’installation vous avez plus simple fiable et garanty a 100%

    Quel et le prix ?
    Gratuit !
    Ya t’il une inscription ?
    NON
    Comment faire dans ce cas ?

    Ouvré une console SSH

    Command 1 :
    wget http://tchat200.heberg.fr/install/red5.sh
    Command 2 :
    chmod 777 red5.sh
    Command 3 :
    sh red5.sh

    Ensuite ?
    allez boire votre café en attendent que l’installation ce termine

    En cas de probléme admin@tchatlove.fr << envoyer mon un email je vous aiderai sous quelques minutes et gratuitement

  • giva

    Can you tell me why this happeded when tring to install?
    $ ant prepare
    Buildfile: build.xml does not exist!
    Build failed

    instead of Bulid successfull.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...