Using Red 5 Flash media server with Drupal

I am working on a project where I wanted to be able to record audio through a web browser. Not having the $5000 to pay for Adobe Flash Media Server, I decided to try to use Red 5 instead.

My first step was to download Red 5 and get it installed locally. As I'm on a shared computer, I'm developing in Windows so I used the Windows version. It installs relatively easily, and you can check to make sure it is running smoothly by visiting http://localhost:5080, assuming you install it with the default port.

One problem I discovered here was that if you shut down the Red 5 server improperly, ie. not using the batch script provided, you have to re-install Red 5 to get it up and running properly. That one was a big pain until I figured it out. Noticeably, the Red 5 install on Windows did not create a shortcut in my Start menu for shutting down the Red 5 server, so I suggest you set one up yourself. Another issue was that I needed to set the JAVA_HOME and JAVA_VERSION environmental variables, or rather I did, and ended up having fewer problems afterward...

Once I had this all set up and tested, I verified that I could actually record audio + video using the Red 5 demos, available at http://localhost:5080. I checked to see what directory the RTMP stream was being recorded to, and verified that a file was being created when I was recording the demo. This ended up being inside C:\Red5\webapps\oflaDemo\streams as I chose to install Red 5 to the root directory of my Windows installation. The next step was to try and get the audio recorder embedded within a Drupal node.

At first I tried out a module which claims to allow users to record audio and video from a webcam, and although the structure of the module was sound, I discovered a major problem. The URL for the Red 5 server was hard-coded into the SWF which I discovered after using a free tool to decompile the SWF as the module author did not include the source code for his web cam recorder.

So I looked around to see if anyone else had tackled this issue, and sure enough Dennie Hoopingarner had figured it out. He provides some advice, tutorials, and the license to use his scripts for free. Very nice guy! Also, his SWF audio and video recorders allow you to define the location of your Red 5 server using Flashvars, which made it relatively easy to create a module to handle the creation of audio files.

I created a module to handle the creation and display of the audio files. Basically what I do is, on node creation I move the newly created audio.flv file into the Drupal file system (if it exists) and I rely on the SWFTools module (with the JW Mediaplayer v4 installed) to display an audio player for the file when the node is being viewed. It's pretty bare boned without any significant features, but it works.

I used the Audio recorder available from Dennie Hoopingarner's website to provide the Flash ability to create RTMP streams back to my Red 5 media server.

On Linux, you'll have to make sure you set your permissions correctly in your Red 5 application folder so that this module can move the created file over. You may also have to fiddle with the settings initially to get it to work. For example, "Red5 Flash Server IP Address" should really be named "where do you access your Red 5 OFLADemo through a browser" but I just took a bunch of the code from the original module (which remember didn't work) and adapted it to my use case.

Let me know if there are any other issues. This is still a work in progress, but I thought some people might be interested in hearing about using Red 5 with Drupal.

audiorecorder.zip42.65 KB


David, thanks for this. I looked at red5 some time ago, passed it up and completely forgot to re-visit it. I'm helping a friend with a music oriented Drupal site now.

I guess it pays to read comments on Stackoverflow :)

Could not display the flash because does not appear to exist.

Thanks and I think I've made some distance !!

Unfortunately, when trying to add audio-record, ie. /node/add/audio-recorder, I'm getting "".

Is there dependencies or something obvious I may be missing?

Cheers for getting me this far!!


Oppppsss, that should say:

Unfortunately, when trying to add audio-record, ie. /node/add/audio-recorder, I'm getting "Could not display the flash because does not appear to exist." and "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly." under Student Name.

Any ideas would be much appreciated :)

MOD: If possible, I would like that domain URL in the last post removed !? CHEERS, Scott

Hrmm. Yeah there probably

Hrmm. Yeah there probably are. I might have ended up using some other flash player to allow the user to listen to the audio file.

Look inside the audiorecorder_view function (or some function similarly named with a _view suffix) and check to see what the audio player is.

Maybe this module relies on SWFTools? I forget it's been a few months.


Paid Trouble Shooting ?

Hi Dave,

I continue to struggle with this, getting the same message, regardless of what I try....I have SWF Tools installed and depending on what Embed Method I choose, the SWF Tools status works.

I did reference which referred to /shared/flash_media_player/player.swf which is the JW Player 4 and is in place.

In short, I think I have all the pieces yet still can't get this to work....any chance you're interested in a couple of hours of paid troubleshooting ?

Yeah I'm interested, fire me

Yeah I'm interested, fire me a message through my contact form.


audio recorder from Dennie

This is interesting, I was able to use Mr Dennie's recorder to record right from his web page to our red5 server. Would it be possible to make a Drupal module work in the same fashion? This would also be true for the video node recorder. Thanks very much for these useful modules.

This is exactly what this

This is exactly what this module is supposed to do, but there is a small bug somewhere in the file creation stage. I've fixed it on my home computer, but haven't updated this resource with the fix yet. To be honest, I just haven't had time!

Anyway, yes what this should do is allow you to record directly from a website, to a Red 5 server, and then associate the file created with a Drupal node.

not quite there...


I've installed the module and I have RED5 running. However on hitting record, the bar can be seen to be going up and down; so I know the button works and is taking input but when i click play I do not hear anything playing back.

Any ideas?

I assume you've tested the

I assume you've tested the demo recorder which comes with the Red 5 server? As I recall my biggest difficulty was changing the URL in the recorder itself to point in the right direction.


I just published flex & drupal sources for a new red5-drupal module using AMFPHP & Services, red5node.

You can record webcam nodes at node/add/red5node
You can edit / re-record the nodes at node/[nid]/edit
You can create a form element that launches the red5node, giving module developers flexibility to be creative with how to implement it. I wrote it for an application that lets you record multiple audio files and attach them to one fieldset.

Pls provide feedback!

fms with drupal

We are trying to build a video sharing website in Drupal 7 using Adobe Flash Media Server.we have got Adobe FMS pro 5 & a Windows server for PHP + Drupal 7 installed.

we are trying to find out the way to proceed with next step on uploading/browse video to Media server through Drupal 7 & get videos & play it in website.

Your reply is highly appreciated .


David, thanks a million!

David, thanks a million!

Subscribe Subcribe to my blog

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer