Showing posts with label red5. Show all posts
Showing posts with label red5. Show all posts

Saturday, June 9, 2012

Wowza and Red5 same server

Sometimes it is useful to have  Wowza and Red5 on the same server. As both use the same ports, you have to change them in one applicattion.

Wowza default ports:

The following ports are used by default by Wowza Media Server 3 for streaming. You will need to open up these ports on your firewall to enable streaming. 

  • TCP 1935: RTMP (all variants), RTSP, Smooth and Cupertino Streaming
  • UDP 6970-9999: RTP UDP Streaming
  • TCP 8084-8085: JMX/JConsole Monitoring and Administration
  • TCP 8086: HTTP Administration

Red5 default ports:
  • RTMP: 1935
  • RTMPT: 8088
  • HTTP servlet engine port: 5080
  • Debug proxy port: 1936





Here is how to do change ports in Red5:



The first file we need to modify is the server properties file located in the conf directory:
red5/conf/red5.properties
  • Locate the http.port key and change it to 80 (or whatever you want)instead of 5080
  • Locate the proxy.source_port an change it to 1937 (or whatever you need)
  • Do not change the rtmpt.port entry, it should be 8088
  • Save and close the file
  • If you have any webapps do not forget to modify the ports in the red5/webapps/yourapp/config.xml
  • restart Red5





Sunday, November 27, 2011

Startup Script Red5 working with ubuntu 11.x

You may  wish have red5 started at boot.
This script should help you.
It is assumed that your red5 script is located at /usr/share/red5:


cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code
#! /bin/sh
# /etc/init.d/red5
#
# Check for missing file
RED5_DIR=/usr/share/red5
test -x $RED5_DIR/red5.sh || exit 5

case "$1" in
   start)
      echo -n "Starting Red5 Service"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
      sleep 2
       ;;
   stop)
       echo -n "Shutting down red5"
       echo -n " "
       su -s /bin/bash -c "killall -q -u red5 java" red5
       sleep 2
       ;;
   restart)
       ## Stop the service and regardless of whether it was
       ## running or not, start it again.
       $0 stop
       $0 start
       ;;
 esac

then you maybe need

useradd red5

and use like
service red5 start
service red5 stop
service red5 restart