Media Server Tester

		chat: [Domain],[ID],[user object(1)]
	

Media Server Installation Guide

Media Server software (formerly Ray Media Server - RMS), based on open-source Red5. Media Server is required for media streaming features of some modules. Some hosting providers already have it installed, but you may need to install one yourself if you plan to use applications with media streaming.


Start

  • Obtain SHELL access details for your server.
  • Log into your shell account using your favorite SSH client (UNIX) or use a Remote Desktop Connection with your server (WINDOWS).

Note: You need the ports 1935, 1936 and 5080 to be opened/enabled in your firewall or iptables.

Choose a Folder to Install Media Server (UNIX)

  • Choose the folder where RMS will be installed to. You can create a new separate folder for that. It doesn't matter where you create this folder but remember that if you want to prevent the folder from being accessed from a browser you should create it in the root directory of your hosting account (/) or your home directory if root is not accessible or writable (/home/myaccount/).
  • For the purpose of this Installation Guide we assume you have created "ray_server" folder inside "/opt" directory. Now the absolute path to your Media Server folder is /opt/ray_server/.

Uploading Files

  • Download the latest Media Server application suitable for your operating system (it will be an archive for UNIX and an executable file for Windows).
  • If you're installing the UNIX version, unzip the archive and upload the contents of the extracted folder into the folder you created on your server (for example /opt/ray_server).
  • If you're installing the Windows version, run the downloaded executable file on your Windows server. If you have follow the wizard's instructions Media Server would be installed by default at C:\RMS.

Configuration

Make the following changes to the files inside the Media Server directory:

  • access.dat - input all domain names which will be allowed to access RMS. Every domain name should be written on a separate line and should not contain "http://" and "www", just yourdomain.com;
  • red5.sh (UNIX) - set the value for JAVA_HOMEvariable. It should be the path to the folder where JRE is installed. For example:
    JAVA_HOME=/opt/ray_server/jre1.x;
    
  • run_daemon.sh (UNIX) - set the value for RAY_SERVER_PATHvariable. It should be the path to the RMS folder on your server. For example:
    RAY_SERVER_PATH=/opt/ray_server;

Permissions

  • Now you have to add "executable" permissions to all the *.shfiles inside Media Server directory. You can do it by invoking the following command (UNIX only):
    chmod -v 777 *.sh
    
    Make sure your current directory is the Media Server folder.

Test Launch

  • Now you can perform the test of Media Server functionality.

UNIX - invoke command:

./red5.sh

WINDOWS - run (from Media Server directory):

start.exe

You may get the following results:

  • If the server has been launched successfully:
    [INFO] 6413main:( org.springframework.web.context.ContextLoader.info ) RootWebApplicationContext: initialization completed in 84 ms
    [INFO] 6595 main:( org.mortbay.log.info ) StartedSelectChannelConnector @ 0.0.0.0:5080
    [DEBUG] 6596main:( org.red5.server.Standalone.debug ) Startup done in: 6597 ms

    Now you can use Media Server Tester to test if your server responds to remote connections.This tested wouldn't work if you are installing Media Server locally on you computer.

  • If you get "NetConnection.Connect.Success": the server started up successfully and you can proceed to the Running Media Server.
  • If you get "NetConnection.Connect.Failed":

Possible problems may be:

  • the 1935 or 1936 ports are closed on your server
  • your server uses firewall which prohibits the access to it through the 1935 port

In either case you should advise with your hosting provider.

Running Media Server

Cancel the execution of red5.sh or start.exe and run RMS as a service (background application). You can do it by:

UNIX:

./run_daemon.sh

WINDOWS:

run_daemon.exe

You can now execute the following command on UNIX-based OS to make sure that RMS has started:

ps ax | grep red5

The output should contain a line that looks like this:

18247 pts/0    Sl+    0:55 /opt/red5new_555/jre1.x/bin/java -Djava.security.manager -Djava.security.policy=conf/red5.policy -cp red5.jar:conf:. org.red5.server.Standalone

If you don't see such a line, check red5.sh and run_daemon.sh for all the required changes (see Configuring RMS point above). On Windows you should run Task Manager and look for "javaw.exe" process to make sure the server has been started.

  • After you have successfully started RMS, enter application admin -> Settings, tick the Use Media Server checkbox and enter your RMS IP address in the Media Server IP, RMS rtmp port and RMS http port to the respectivefields.

Launching Media Server on Startup

  • Now you should add a task to your server's startup file, so every time your server restarts, RMS could start automatically. On most Linux systems this file is /etc/rc.local. You should input the following lines in it: "cd path_to_rms" and "/path_to_rms/run_daemon.sh", where "path_to_rms" stands for the absolute path to Media Server folder.

For example:

cd /opt/ray_server
./run_daemon.sh

Note: on Windows machines you will have to add the following file "C:\RMS\run_daemon.exe" to Startup.

Stopping/Starting/Upgrading Media Server

  • UNIX (providing that Media Server is installed in the folder ray_server):
    ps ax | grep ray_server
    

Changing Ports

When the default ports 1935, 1936 and 5080 are already in use by some application on your server, you can change them and start Media Server on different ports.

To do so, you need to do the following:

  • Edit the file conf/red5.properties and replace all instances of 1935, 1936 and 5080with different port numbers (you need to make sure that these ports are open). For example:
    rtmp.port=1935
    
    should be replaced with something like
    rtmp.port=10000
    
  • Change the Media Server settings at the application admin panel as it is described above.

Radio installation into Moodle

1. Download Moodle Radio plugin and unzip the package.

2. Copy rzradio folder to <moodle root directory>/local/.

3. Login your site as admin and go to Home -> Administration -> Site Administration -> Notifications, click Upgrade Moodle database now and then Continue.

4. New item called Radio will appear in your site Navigation block.

5. Buy a license and enter it into Settings to remove ads from the plugin.

YouTube installation into Moodle

1. Download Moodle YouTube plugin and unzip the package.

2. Copy rzyoutube folder to <moodle root directory>/local/.

3. Login your site as admin and go to Home -> Administration -> Site Administration -> Notifications, click Upgrade Moodle database now and then Continue.

4. New item called YouTube will appear in your site Navigation block.

5. Buy a license and enter it into Settings to remove ads from the plugin.

6. Create a key for server applications for public API access here and enter it into Settings into YouTube API key field.

Live Camera installation into Moodle

1. Download Moodle Live Camera plugin and unzip the package.

2. Copy rzlivecam folder to <moodle root directory>/local/.

3. Login your site as admin and go to Home -> Administration -> Site Administration -> Notifications, click Upgrade Moodle database now and then Continue.

4. New item called Live Camera will appear in your site Navigation block.

5. Get an Adobe Labs Developer Key, login your site as admin, open Live Camera plugin and add the key to the Settings.

6. Buy a license and enter it into Settings to remove ads from the plugin.