Ready to use – Red5 streamer with stream security


As RTMP continues to grow, and Red5 triumphs as the only open source RTMP server alive, there are concerns to protect your application from misuse. The following red5 application implements stream security for both playback and publishing.

You can edit the files – allowedHTMLdomains.txt and allowedSWFdomains.txt and add the domain names that you want to be able to playback/publish using your application. Each domain name must be added in a  new line.

The application also lets you allow/disallow publishing entirely. To do so edit the file red5-web.xml and set enable publish as true/false according to your needs:

<bean class="org.red5.core.security.PublishSecurity" init-method="init" id="publishSecurity">
<property name="application" ref="web.handler" />
<property name="htmlDomains" value="/WEB-INF/allowedHTMLdomains.txt" />
<property name="swfDomains" value="/WEB-INF/allowedSWFdomains.txt" />
<property name="publishNames" value="/WEB-INF/allowedPublishNames.txt" />
<property name="enablePublish" value="true" />
</bean>

You can also set stream publish security by defining specif stream names that are allowed for recording/broadcasting in the file allowedPublishNames.txt

Note : putting a * in any of the three security files will disable security for the particular context. Eg: Putting a * in allowedPublishNames.txt means that stream check is disabled.

This application is created for a quick and easy deployment, with guidance from red5.org.

Download:

Customstreamer_domaincontrol_source_0.8

Customstreamer_domaincontrol_deployable_0.8 [rtmp application name: domaincontrol]

Or generate your own with Red5 – Online Application Generator

Ready to use – Red5 streamer application

Following Red5 Developer series from Dominick Accattato, and a neat explaination from Red5.org on CustomFilenameGenerator, Here is a ready to use, fully capable pre-compiled Red5 application for anyone who wishes to set up Flash streaming with Red5 , but does not know where to start.

The application is tested on Red5 0.8. to use it in 0.9 you may have to remove the bandwidth-setting code in main Application class and recompile it.

How to configure Stream/Record paths:


1. Edit the file file red5-web.xml in the WEB-INF directory

2. Move down to the “streamFilenameGenerator” bean definition and adjust values of recordPath and playbackPath as you wish.

3. To use absolute paths, set “absolutePath” property as true.

Downloads:

Customstreamer_deployable_0.8

CustomStreamer_source_0.8

# Update : Customstreamer for Red5 0.9:

Customstreamer_deployable_0.9

CustomStreamer_source_0.9

# Update : Customstreamer for Red5 0.7: [Updated June 17 2010]

Customstreamer_deployable_0.7

*Try out the new Red5 application generator HERE

Note:  To compile source, use eclipse J2ee build.