Obtaining Red5 media server - rajdeeprath/red5-development-series GitHub Wiki
This lesson deals with acquiring the red5 open source media server. If you are interested in Red5Pro, it can be downloaded from its official website. Information pertaining to Red5pro setup / installation is also provided on Red5pro official website.
You can obtain red5 open source media server from its GitHub repository: GITHUB PAGE:. This page is actively developed and maintained by the red5 team and posts all references to get your RED5 up and running. * Always download the latest stable release from the GIT download page. * Once you have downloaded the release archive use a unzip utility such as 7zip / WinZip to unpack the archive on your system. * You should now be in a good position to install / run the Red5 media server on your system.
- Intel® Pentium® dual core processor or faster
- 64-bit operating systems: 4GB of RAM (8GB recommended)
- 1Gb Ethernet card recommended (multiple network cards and 10Gb card also supported)
- Java 1.7 or greater is required to run Red5
- OS: Windows , Linux, Macintosh
For Linux: Any standard distribution can be used, although Ubuntu is recommended.
- Java 1.7 or greater must be installed on your system and JAVA_HOME must be set.
- PORTS:5080 (HTTP servlet), 1935 (RTMP service)
- Flash player must be installed for running client-side demos (OPTIONAL)
You generally have 2 ways of running Red5 media server. The first one is to just run the server from the extracted archive and the other one is to install it ass a service on the system and run it.
-
Unpack the downloaded red5 archive package to an accessible (having sufficient permissions) location on your system hard drive.
-
Navigate to Red5 root folder
-
Run red5-debug.sh / red5-debug.bat (Make sure you have read/write/execute permissions before executing the shell scripts)
-
If all requirements are met, you should be able to see the server booting up with detailed logging in the console.NOTE: It is good to use red5-debug.x vs red5.x when trying out red5 for the first time or when developing an application. In debug mode Red5 will provide more detailed logging output to help capture errors. This is how we should use the server when developing applications.
Installing and running red5 as a service is preferred when you plan to deploy your application for production use.Once installed as a service, Red5 will start with the operating system and shut down with it.
WINDOWS: TO DO
LINUX: Guide to installing red5 as a service on Linux platform is provided here: https://github.com/Red5/red5-server/wiki/Installation-on-Linux
Once your bootstrap is complete and the server is running fine, you can verify the same by navigating to http://localhost:5080
on the same system. If you went well you should be able to see the server home page.
-
Up till this point, we can be sure that the Red5 HTTP servlet is working. Now we must verify that the RTMP port is open and the RTMP service is working fine.It is more important for the RTMP service to be working than the HTTP service otherwise RTMP client applications cannot connect to the media server. To verify RTMP service do the following.
-
Navigate to,
http://localhost:5080/demos/publisher.html
in your browser (This is a demo application provided with red5 open source media server) -
In the application UI, locate the "Location" field and change it to,
rtmp://localhost/live
-
Press Connect button next to it and watch the white console screen for logging.
-
If you see a NetConnection.Connect.Success message in the console then it means that your
RTMP
service is working fine.
Wondering what just happened ? No worries!. What we just did now was changing the RTMP service URL to point to a red5 application called live
. This application comes prepackaged with Red5 media server. In most cases, it is sufficient to just use this for streaming and data communication unless you have special needs and require you own custom application. To shutdown, the server execute the red5-shutdown.sh / red5-shutdown.bat
file (from the same location as the red5-debug.x script) A RTMP URL generally has 3 parts to it.:
- RTMP: The protocol or the scheme
- HOST: The host or IP where the media server is accessible (localhost)
- APPLICATION: The red5 application to which we wish to connect to.(live). An application is technically called a
SCOPE
.A scope can have sub-scopes (like chat rooms). These are nothing but virtual demarcation for usability. All scopes, of course, share the same system resources.
Hope you got your Red5 setup and ready to go. In the next episode, we shall cover some details on setting up a development environment to create our own custom red5 application.