Red5 Media Streaming Custom Files Location

Red5 is a media streaming server and it has been used as a core streaming engine for most popular video conferencing solutions like Apache OpenMeetings, BigBlueButton and many others. Sometimes you have to use the core engine just to stream files without adding extra layers on top of it. The way you can do so is as follows:

  • Install Red5 Server
  • Create New Application for Red5
  • Install the Red5 application
  • Restart the Red5 Server

Red5 Server Installation:

Installing Red5 on Debian based machines is quite simple. You need to run the following command:

For Ubuntu 14.04, there is a known bug due to which standard installation does not work. You can simply download the release from this site and can start server from sudo red5.sh.

Create A New Application For Red5:

For creating a new application for Red5, you need to install Eclipse for Java EE and create a standard dynamic web application. Setup the file structure as given below:

Now follow the steps given below:

  1. Set WEB-INF\classes\ as default build target
  2. Right click on src and choose Build Path -> Configure Output Folder. Paste WEB-INF/classes in the “Specify output folder” field
  3. Right click on Project and choose Properties from the Menu. Click on Java Build Path and choose Librarise tab
  4. Click on Add External JARs. You should add red5.jar from your red5 directory (/usr/share/red5/red5.jar). You may add all the files from lib directory (/usr/share/red5/lib) as External JARs to let your new application see all the available Red5 classes methods

Now start building your application in src directory. Below is the default application class:

The file which actually makes stream from custom path is as follows:

To get these things workable, the configuration for web.xml is as follows:

The configuration for Red5 is as follows:

At the end, build the project from Eclipse, upload full directory to /usr/share/red5/webapps/. After uploading the directory, start the server by using sudo service red5 restart command. All the files present in /home/deploy/backup/streams/ will now be ready for stream.