Red5 Open Source Flash Server

56 %
44 %
Information about Red5 Open Source Flash Server

Published on May 24, 2008

Author: sunil



Red5 is an open source flash server

Saturday, May 24, 2008 09:25 GMT Red5 Open Source Red5-An open source flash server Save Video Images To Server Using Red5 and Flex Saturday, May 24, 2008 09:25 GMT / Created by Page 1 of 17

Here is a small tutorial telling how to save video preview images from Flex client to Red5 server. The work is to take a snapshot of a video stream from the client and some how get it to be a saved image on the server. There are ways to acheive this using ffmpeg or using a scripting language in combination with Red5. But this is the simplest one as it does not require any additional library. Flex does everything. You can get a PNG or JPEG file saved to the Red5 server the following way- Client Side (Development took place on Free flex sdk So lets assume that you already have a netconnection to your serverside application. You also have a camera opened and attached to a UI component in the browser. I have it so when a button called quot;Take sceen shotquot; is clicked the function quot;handleScreenShotquot; is called. NOTE: SharedVideo is a public var of type Video. When I attached the video from the camera to the UI, I copied it into Shared video. private function handleScreenShot():void { // Clear out any previous snapshots pnlSnapshot.removeAllChildren(); var snapshotHolder:UIComponent = new UIComponent(); var snapshot:BitmapData = new BitmapData(320, 240, true); var snapshotbitmap:Bitmap = new Bitmap(snapshot); snapshotHolder.addChild(snapshotbitmap); pnlSnapshot.addChild(snapshotHolder); snapshot.draw(SharedVideo); pnlSnapshot.visible = true; // Here is how you encode the bitmapimage to a png or jpeg ByteArray and send it to the server //var jpgEncoder:JPEGEncoder = new JPEGEncoder(75); //var jpgBytes:ByteArray = jpgEncoder.encode(snapshot); var pngEncoder:PNGEncoder = new PNGEncoder(); var pngBytes:ByteArray = pngEncoder.encode(snapshot);;Save_ScreenShotquot;, null, pngBytes); } Saturday, May 24, 2008 09:25 GMT / Created by Page 2 of 17

Server Side Ok now the server side code for the function quot;Save_ScreenShotquot;. I have this right inside the main java file of my Red5 applicationNOTE: You must import the following classes. import import javax.imageio.ImageIO import import java.awt.image.BufferedImage public String Save_ScreenShot(ByteArray _RAWBitmapImage) { // Use functionality in to get parameters of the ByteArray int BCurrentlyAvailable = _RAWBitmapImage.bytesAvailable(); int BWholeSize = _RAWBitmapImage.length(); // Put the Red5 ByteArray into a standard Java array of bytes byte c[] = new byte[BWholeSize]; _RAWBitmapImage.readBytes(c); // Transform the byte array into a java buffered image ByteArrayInputStream db = new ByteArrayInputStream(c); if(BCurrentlyAvailable > 0) { System.out.println(quot;The byte Array currently has quot; + BCurrentlyAvailable + quot; bytes. The Buffer has quot; + db.available()); try{ BufferedImage JavaImage =; // Now lets try and write the buffered image out to a file if(JavaImage != null) { // If you sent a jpeg to the server, just change PNG to JPEG and Red5ScreenShot.png to .jpeg ImageIO.write(JavaImage, quot;PNGquot;, new File(quot;Red5ScreenShot.pngquot;)); } } catch(IOException e) {;Save_ScreenShot: Writing of screenshot failed quot; + e); System.out.println(quot;IO Error quot; + e);} } return quot;End of save screen shotquot;; This is one way, You can also make it working for the other way i.e. getting images from server to client. Thanks to Charles Palen for posting the snippet of this code in Red5 community.Technology Update Red5 And RTMFP( Real Time Media Flow Protocol): Will It Be? Saturday, May 24, 2008 09:25 GMT / Created by Page 3 of 17

Just two days back, Adobe made a prerelease of Adobe Flash Player 10. There are many new significent features, improvements. Some of the features like RTMFP(Real Time Media Flow Protocol) just discussed but not shared the deatil yet by Adobe. This prerelease from Adobe gave great news to Open Source Flash community(, more Specifically red5 community and they already started talking about it here and here. What is p2p RTMFP? You can get good idea about it here at - and But from the release notes, it seems that many new features will be available only to FMS users with future release of FMS, so it will be another challenge for the red5 team.Technology Update Building Red5 Applications- Video I found a video of Chris Allen that walks you through getting started actually using Red5 server, so i thought of sharing it here. This video will help you to better understand what is Red5 and how can you start building applications using Red5. Reference:- Building Red5 Applications Technology Update Embedded Tomcat In RED5 Saturday, May 24, 2008 09:25 GMT / Created by Page 4 of 17

The development of Red5 server is on the fast track. Red5 developers are adding more and more functionality in order to make Red5 server, a tough competitor of FMS. Paul Gregoire from Red5 has worked on Embedded Tomcat in Red5. Now we have a choice between Jetty and Tomcat as a web container, Previously Jetty was the only web container with Red5. Though emebeded Tomcat won't impact your application in terms of functionality. But it gives you the option to choose between web containers and an advantage that it will now be easier to run the Edge/ Origin setup from the embedded Tomcat as opposed to the Tomcat standalone container. How to change the settings to make it working with Tomcat? Go to red5.xml in conf directory and comment the jetty server and uncomment the Tomcat server like below- ${http.port} ${https.port} false Saturday, May 24, 2008 09:25 GMT / Created by Page 5 of 17

The discussion over embeded Tomcat in Red5 is going on Red5 mailing list.Technology Update Open Source SIP Phone With Red5 And Flex3 Saturday, May 24, 2008 09:25 GMT / Created by Page 6 of 17

Few days back, i wrote an interesting post talking about implementation of open source SIP phone with Red5 and Flex3. This was possible with latest release of Red5 plugin for Openfire that features a completely open-source implementation of a web-based SIP softphone written in Flex3. The below diagram shows how the implementation works- More detail information over its working and the technologies behind its implementation are available here at- Flash-based Audio in Openfire part IITechnology Update Red5 Showcase-- Applications Using Red5 Continues... Saturday, May 24, 2008 09:25 GMT / Created by Page 7 of 17

In my previous post of Red5 showcase, I shared the information of many applications that are using Red5 media server as a part of their development. This post will showcase few more such applications. Pixelquote( is an application based on Red5. It's a huge Pixelwall where visitors can simply add Pixels with their Messages. is a website of Italian singer. The website uses Red5 VOD Protected Streaming and audio/video recording widgets. Dimdim( is an open source web conferencing system that uses Red5. Dimdim is available for free so everyone- not just big companies with big budgets - can use it. And Dimdim is available as open source software so you can extend and improve it freely. ePresence ( is both a webcasting and web conferencing system that supports full duplex, multi-point audio and video conferencing + desktop sharing. This new functionality has been added by integrating an Open Source real-time communications platform Red 5 with ePresence Server. Gchats Visichat( is a live video chat community that connects you with people from around the world. Connecting is easy with public and private chat rooms. With breakthrough video and voice technology which gives you a real and natural experience. Zingaya( is a VOIP server built on Red5 for Flashphone. Sticko( is a multimedia content manager. You can manage your live video webcasts, photos, and videos from one place. Its a video portal with widgets for popular social networking sites like facebook, mySpace, Blogger, LiveSpace, WordPress, vBulletin and more. Sprasia( is a website where you can edit videos and can add effects on top of it and share it with whole world. You can directly import videos from YouTube and can apply cool effects on top of these videos. Red5 is being used as a part of their development. VPlace( is an E-Learning system with Flex and Red5 with features like file sharing, nice laser pointer, chat, etcetera and live Screen Sharing feature in process. The website is in Portuguese. Red5 is hot and many companies around the world are showing interest in building applications based on Red5. I will again showcase Red5 based applications as soon as I hear any new. You can also contribute to Red5 showcase, if you are aware of any application that is based on Red5 and not listed here, just drop a comment with little details, I will include that in Red5 showcase. Saturday, May 24, 2008 09:25 GMT / Created by Page 8 of 17

Related Posts:- New Version Of Dimdim's Open Source Community Edition Going To Release Sprasia Now Open For All- Public Beta Released Previous Post- Red5 ShowCase:- Red5 Showcase-- Applications using Red5Technology Update 10 Quick Reasons Of Why To Choose Red5 Media Server Over Flash Media Server Why to choose Red5, an open source flash media server over Adobe Flash Media server. few weeks back, Red5 has released version 0.7.0 final which has many new features and bugfixes. The complete changelog is here. Here is a quick list of why to choose Red5 over FMS. 1. Red5 can stream as well as Flash Media Server. 2. No delay in Audio/Video brodcast with latest versions. 3. The server side is Java, much more popular than Adobe server side action scripting for flash media server. 4. Strong community support for Red5 as you can see in Red5 showcase, some of the big companies are also working on Red5 based application. 5. Red5 is not just a streaming server, its much more powerful, You can build many useful applications( whiteboard, Chat, Poll, Desktop Sharing, ...) over Red5, which does things more than just streaming. 6. Red5 uses MRTMP now to cluster the stream data with Terracotta, now you can do a load balancing with red5. 7. Red5 team is working to release the version of Red5 which will support H.264. 8. There are good Red5 support and hosting companies now available which can provide support and can host your Red5 based applications. 9. Red5 is an open source project(, so you can contribute to its development. 10. Red5 is fun, Red5 is free. So if someone is in dilemma of selection between Red5 and FMS, share this information with him. You are welcome to put comments or suggest some more points to add to this list. Reference:- Red5 HomepageTechnology Update Saturday, May 24, 2008 09:25 GMT / Created by Page 9 of 17

Red5 And Load Balancing - Not The Load Balancer Way In one of my previous post, I discussed about the load balancing of stream data using Terracotta. There are many red5 users who do not want this solution because this soulution is too advance for them. They dont have such a huge load on their server that they need this soultion. For those who just want to keep distributing the incoming requests to any of the available server they have, Lets call it static load balancing, because we know to which server we have to map the request. We will not use any kind of load balancer like Pound or something else. Below is simple way to acheive the load balancing of Red5 without using any load balancer. Round-Robin:- Suppose we have 4 Red5 servers and we want to distribute the incoming client request to one of these server in Round-robin fashion. So the possible table could be like below- Request Red5-1 Red5-2 Red5-3 Red5-4 1 Yes No No No 2 No Yes No No 3 No No Yes No 4 No No No Yes ------------------------------------ 5 Yes No No No ----------------------------------- As you can see the fifth request will again map to first red5 server and so on. This was the simplest solution to distribute the load on Red5 server but it has some limitations. This approach does not know which server is loaded much or exhausted. it simply passes the incoming request to any of the server based on round-robin. The other efficient way to load balance red5 could be- 1. Add in your application a function that returns the amount of rooms/instances/scopes and connected users. 2a. Develop a (php-)script that calls that function on your red5 server(s) using AMFPHP via cron(job) once every xx minutes. 2b. Calculate the result (e.g. server A has 70 users and server B has 120 users) and store it in a small status-file (or db). 3a. Have your flash-client-application call the (php-)script 3b The script reads the status-file or db. 3c The script returns 'go connect to server A. 4 The flash client connects to server A , thus offloading server B. The second solution is taken from the discussion in Red5 forum over load balancer. See Also:- Red5 clustering of stream data with Terracotta MRTMP- Red5 load balancingTechnology Update Saturday, May 24, 2008 09:25 GMT / Created by Page 10 of 17

Red5 With MySQL Red5 flash server with MySQL database. A very good tutorial that you can follow to start working with Red5 and MySQL 5.0 was posted few months back on by Milan Toth. Read more about this good post here. It's very detailed article with both client and server side sample code. Hope it will help for those who are looking for MySQL along with red5 flash server.Technology Update Create a Poll application in Red5 and Flash Saturday, May 24, 2008 09:25 GMT / Created by Page 11 of 17

Red5 flash server is not just a server written to deliver the streaming of's much more powerful server. Here i am writing about how we can create a shared poll application using Red5 flash server which can be a part of Video conference application. Note:-This article assumes that you have working knowledge of Red5 server and Flash. Lets assume a typical video conference application , where a host and few other users are participating. Host has given access to create a poll. As soon as host creates a poll, it will broadcast to every user including host in that conference and every user will participate in poll. Flash Client Side Work:- Create a user interface for creating the Poll. A typical user interface for 3 kinds of Poll ( Single Answer, Multiple Answer and Free Text ) could be similar to the below diagrams. Sample Poll creation window When host click on next after selecting single answer or multiple answer. the screen may be like this. For Free Text type, It may be like below screen. All these screens will give the idea of a sample Poll user interface. Now we move to second step, the XML representation of this UI. XML description of UI could be like this. The above XML will be created when host will select either Single Answer or Multiple Answer question. We will pass this XML String to Red5 server. For Free text type question we can use the XML like below. Saturday, May 24, 2008 09:25 GMT / Created by Page 12 of 17

Red5 server Side Work:- Now we move to Red5 server side. Red5 side application will pick this XML and will distribute this XML among all users including Host. Flash Client Side Work:- Once again this XML is on the flash client side with every user of the conference. Now client application will parse this application and build the user interface for participating in Poll based on type of question and number of options. A sample poll participation screens for the above XML could be same as in below diagram. Sample for Single answer type. For Multiple answer type, we can replace the radio buttons with check boxes. Sample for Free Text answer For collecting the result data, we can use XML again. This way we can build a shared poll application with Red5 and Flash. Note:- For distributing XML string to every user in conference, we can use the concept of shared object in Red5. Interested to create a shared whiteboard application using Red5 and Flash? It is hereTechnology Update Red5 Showcase-- Applications using Red5 Saturday, May 24, 2008 09:25 GMT / Created by Page 13 of 17

Today many of well known applications are using Red5 flash server. Few of them are listed below. - a Rapid Application Development System that supports the creation of Red5 applications. - Open source video Conference. Detail post about openmeetings is here. Dokeos is a learning management system used in more than 600 companies and public administrations to manage e-learning and blended learning programmes. http://spreed.comMeet and Present Any Time, Any Where - At a Push of a Button spreed is the world´s first free web meeting service. spreed provides a free and worldwide Web 2.0 meeting service for consumers and professionals. Video Chat BlipBack is a video comment widget that you can embed on any number of social network sites or blogs you have. Blipback lets you or your friends record short video comments directly to your page. Bridge AIR applications to the Java runtime. Facebook is a social utility that connects people with friends and others who work, study and live around them. People use Facebook to keep up with friends, upload an unlimited number of photos, share links and videos, and learn more about the people they meet.Video uploading/recording/messaging system that allows you to record a video on the upload page or send a private message to another user and attach a video. Streaming video chat software script is a RED5 based system that allows you to build a comprehensive pay per minute / pay per view video chat site. - Classical fridge magnet toy. - Video blogging application - Red5 Flash Audio/Video Chat Software - Red5 bandwidth checker with upload/download and latency tests - Red5 Flash Video streaming - Red5 Flash Php/MySql/Ajax driven scheduled & streamed multi channel TV - VideoFlashChat - Red5 version for Web Based Video Chat - VideoGirls BiZ - Red5 version for Pay Per View Video Chat Software. Saturday, May 24, 2008 09:25 GMT / Created by Page 14 of 17

For detail list of applications using Red5, visit at red5 official showcase page here.Technology Update Red5 Project Roadmap Red5 flash server is a free alternate of Flash Media server and its gaining popularity among open source users. Below is the project roadmap of the Red5 server development. RED5 ? Project Roadmap Current Release: 0.7.0 Next Release: 0.7.1 0.1 Echo, Echo, Echo Released Early October 2005 Proof of concept release showing RTMP and AMF support. Standalone server Spring and Mina integrated to form server base AMF data encoding and decoding RTMP packet encoding and decoding Service invocation layer Echo service exposed using RTMP Read more at Red5 official roadmap page hereTechnology Update Red5 support and Hosting service Red5 is an open source flash server with a large community of users behind it. provides complete Red5 support and hosting service. They have dedicated and cluster solution for supporting many simultaneous connections.They have solutions for disk space and Bandwidth transfer also. Their service works from anywhere in the world.To know more about red5 hosting and support, follow the link of red5server here.Technology Update Red5 and RTMPE -- Just a thought Saturday, May 24, 2008 09:25 GMT / Created by Page 15 of 17

Adobe released the Flash media server 3 and it features RTMPE(Real time messaging protocol with encryption), an enhanced version of RTMP for higher performance and 128 bit encryption to increase the security of streamed media. It's going to be very important feature for every FMS user who is concern about the security of his content. Good post about DRM feature of flash media server from flashcomguru is here. Just a thought, Will Red5 flash server( The open source alternate to FMS) support this new protocol. Technology Update Red5 Tutorials Below is the link from where you can download many good Red5 tutorials in pdf format. Download Red5 Tutorials Enjoy!!Technology Update Red5 clustering of stream data with Terracotta Red5 is an open source flash server and alternate of flash media server from Adobe.Red5 load balancing was required to cluster the stream data.For this Red5 team has worked with Terracotta and now they have comeup with load balancing of Red5 in the red5 v 0.7.0 final release using MRTMP(Multiplex RTMP). More information on reference links. 1.Terracotta Red5 2.Red5 and Terracotta POC 3.Clustering Red5 4.Edge origin solution on TerracottaTechnology Update Red5 now in V0.7.0 Final Red5 has released the version 0.7.0 final. Below are the details of the changes.Red5 v0.7.0 final 02.23.2008 The Red5 Team is proud to announce the release of Red5 0.7.0 Major changes since 0.6.3: Initial Edge/Origin clustering support for multiple Edges with a single Origin New Flex admin tool Added a multi-threaded ApplicationAdapter that allows multiple clients to connect simultaneously to the same application Added stream listeners that can get notified about received packets Fixed a critical memory leak bug in networking due to MINA ExecutorFilter Added new Flash Player 9 statuses NetStream.Play.FileStructureInvalid and NetStream.Play.NoSupportedTrackFoundTechnology Update Saturday, May 24, 2008 09:25 GMT / Created by Page 16 of 17 Saturday, May 24, 2008 09:25 GMT / Created by Page 17 of 17

Add a comment

Related pages

Red5 Media Server

Red5 Media Server 1.0 delivers a powerful video streaming and multi-user solution to the ©Adobe ©Flash ... By using the Open Source Red5 Media Server, ...
Read more

Red5 – Streaming mit dem Open Source-Server ...

Einführung: Red5 ist ein Open Source-Server basierend auf Java. Er unterstützt Video- und Audio-Streaming, das Aufzeichnen von Client-Streams, Shared ...
Read more

GitHub - Red5/red5-server: Red5 Server core

... Red5 server core. Red5 is an Open Source Flash Server written in Java that supports: Streaming Video (FLV, F4V, MP4, 3GP) Streaming Audio (MP3, F4A ...
Read more

Red5 Flash Server | - Drupal - Open Source CMS ...

Note: As of 2010/07/20, this module appears to no longer be supported. If you are interested in taking this module over, or you as the module maintainer ...
Read more

Jabber Video-Chat How-To & Red5 Plugin Download

Mittels Red5, einem Open Source Flash Server, ist es jedem User von möglich folgende Dienste zu nutzen: Desktop Screening / Viewing ;
Read more

Red5 Media Servers

Red5 Media Servers. Red5 is open source media server written in Java which supports streaming audio/video, recording client streams, video chat and ...
Read more

Red5 - Reference Documentation - GitHub

Red5 - Reference Documentation. Red5 Open Source Flash Server. ... Getting Red5 Flash Demo Source 6.2.4. Running the ant build
Read more

Red5 Flash media server development: How to install and ...

Red5 Flash media server development: How to install and configure ? What is red5 server ? Red5 is an Open Source Flash Server written in Java that supports:
Read more

Red5 Server | Fully Managed Red5 Servers

Red5 Server is the leading provider of Managed Red5 Servers. Red5 Server
Read more

Red5 - How people build software · GitHub

Personal Open source Business Explore Sign up Sign in. Pricing Blog Support Search GitHub. This organization. Red5. ... Red5 Server core Updated May 9, 2016.
Read more