Red5 - Reference Documentation

Red5 Open Source Flash Server

Paul Gregoire

0.8

distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

2012-05-28


1. Introduction
1.1. 0.8 Public Beta Release
I. Getting Started
2. Frequently Asked Questions
2.1. Questions
2.1.1. General
2.1.2. Documentation
2.1.3. Configuration
2.1.4. Streaming
2.1.5. Codecs
2.1.6. Database
2.1.7. Scripting
2.1.8. Shared Objects
2.1.9. Legal
2.1.10. Red5 WAR version
2.1.11. Misc
2.1.12. Troubleshooting
2.2. Answers
2.2.1. General
2.2.1.1. What is Red5?
2.2.1.2. What does Red5 stand for?
2.2.1.3. Is there a migration guide from FMS to Red5?
2.2.1.4. How do I create new applications?
2.2.1.5. What are configuration files?
2.2.1.6. Is there a mailing list?
2.2.1.7. What Ports does Red5 use?
2.2.1.8. I'm interested in helping the project. How can I help?
2.2.1.9. Who is on the Red5 Team?
2.2.2. Documentation
2.2.2.1. Where is the official documentation?
2.2.2.2. Can I get the documentation in PDF format?
2.2.2.3. Where can I find the latest javadocs?
2.2.3. Configuration
2.2.3.1. How to disable Socket policy checking for 443 (rtmps and https)?
2.2.4. Streaming
2.2.4.1. How do I stream to/from custom directories?
2.2.4.2. How to detect the end of recording ?
2.2.4.3. How can I record RTMP streams from Red5?
2.2.4.4. Does Red5 support multicast streaming?
2.2.4.5. Can Red5 stream using UDP?
2.2.5. Codecs
2.2.5.1. What Codecs does Red5 Support?
2.2.5.2. What is RTMFP and when will it be available in Red5?
2.2.6. Database
2.2.6.1. What databases are supported?
2.2.6.2. Can I use Hibernate with Red5?
2.2.7. Scripting
2.2.7.1. What scripting languages are available?
2.2.7.2. Does Red5 support Actionscript 1?
2.2.7.3. Does Red5 support Actionscript 3?
2.2.8. Shared Objects
2.2.8.1. How do you setup a Remote SharedObject?
2.2.9. Legal
2.2.9.1. Licence Information
2.2.9.2. Is Red5 Legal?
2.2.10. Red5 WAR version
2.2.10.1. Is there any documentation on the Red5 war version?
2.2.11. Misc
2.2.11.1. Is there an IRC channel?
2.2.11.2. Are there any examples on the web?
2.2.11.3. Is there any professional support?
2.2.11.4. Are there hosting solutions?
2.2.11.5. Are there forums?
2.2.11.6. What is Jedai?
2.2.11.7. Are there any frameworks that I can start with?
2.2.11.8. Are there development tools?
2.2.11.9. What is Paperworld3D ?
2.2.11.10. What Red5 groups can I join?
2.2.12. Troubleshooting
2.2.12.1. Why am I receiving "closing due to long handshake?
3. Configuration Files
3.1. Directory "conf"
3.1.1. jetty.xml
3.1.2. keystore
3.1.3. log4j.properties
3.1.4. realm.properties (Jetty)
3.1.5. tomcat-users.xml (Tomcat)
3.1.6. red5.globals
3.1.7. red5.properties
3.1.8. red5.xml
3.1.9. red5-common.xml
3.1.10. red5-core.xml
3.1.11. red5-rtmpt.xml
3.1.12. web.xml (Tomcat)
3.1.13. web-default.xml (Jetty)
3.2. Webapp config directory
3.2.1. red5-web.xml
4. Migration Guide
4.1. Application callbacks
4.1.1. Interface IScopeHandler
4.1.2. Class ApplicationAdapter
4.1.2.1. Execution order of connection methods
4.1.3. Accepting / rejecting clients
4.2. Current connection and client
4.3. Additional handlers
4.3.1. Handlers in configuration files
4.3.2. Handlers from application code
4.4. Calls to client methods
4.5. SharedObjects
4.5.1. Serverside change listeners
4.5.2. Changing from application code
4.6. Persistence
4.7. Periodic events
4.8. Remoting
4.8.1. Remoting server
4.8.2. Remoting client
4.9. Streams
5. Red5 Libraries
5.1. Spring scripting support
5.2. Groovy
5.3. Beanshell
5.4. Ruby
5.5. Jython / Python
5.6. Java 5 Libraries
5.7. Script related JSR's
5.8. Javascript / Rhino
6. Building Red5
6.1. Build Environment Setup
6.1.1. Ant
6.1.2. Java
6.1.3. Red5
6.2. Building
6.2.1. Getting Red5 Source
6.2.2. Getting Red5 Demo Applications Source
6.2.3. Getting Red5 Flash Demo Source
6.2.4. Running the ant build
6.2.5. Current Ant Targets
6.2.6. Ant and Ivy
6.3. How to build with eclipse
6.3.1. Recommended Eclipse Plugins
6.3.2. Importing the Red5 Project
6.3.3. Updating the Red5 source from Eclipse.
6.3.4.
6.3.5. Ant, Ivy and Eclipse
7. Releasing Red5
8. Recommended System Requirements
8.1. Java Memory Tweaking
II. Red5 Core Components
9. Create new applications in Red5
9.1. The application directory
9.2. Configuration
9.2.1. webAppRootKey
9.3. Handler configuration
9.3.1. Context
9.3.2. Scopes
9.4. Handlers
9.5. Logging
10. Logging Setup
10.1. Web applications
10.2. Imports
10.3. Logger Instantiation
11. Deploying Red5 To Tomcat
11.1. Preface
11.2. Deployment
11.3. Context descriptors
11.4. Red5 Configuration
11.4.1. Spring contexts
11.4.2. Default context
11.4.3. Web context
11.4.4. External applications
11.5. Creating and deploying your application
11.5.1. Remote application
11.5.2. Local application
11.5.3. Example Source
11.6. Additional web configuration
11.7. Troubleshooting
11.8. Definitions
11.9. Bibliography
12. Customize Stream Paths
12.1. Filename generator service
12.2. Custom generator
12.3. Activate custom generator
12.4. Change paths through configuration
13. Security
13.1. Stream Security
13.1.1. Stream playback security
13.1.2. Stream publishing security
14. Scripting Implementations
14.1. I. Select a scripting implementation
14.2. II. Configuring Spring
14.3. III. Creating an application script
14.3.1. 1. Application adapter
14.3.2. 2. Application services
14.4. Creating your own interpreter
14.5. Links with scripting information
15. Clustering
15.1. Server Configuration
15.1.1. Configuration Files
15.2. Configure Edge Server
15.2.1. Edge on a different Server from Origin
15.2.2. Edge on the same Server as Origin
15.3. Configure Origin Server
15.4. Use Your Appliation
16. Management
16.1. JMX Classes
16.2. Spring configuration
16.3. RMI Authentication
16.4. JMX / RMI / SSL
16.5. jConsole / JMX Client
16.5.1. Local Management
16.5.2. Remote Management
16.5.3. SSL Remote Management
16.6. Links
17. Red5 Demo Applications
17.1. Getting Red5 Demo Applications Server-Side and Client-Side Source
17.1.1. List Of Available Demo Applications (Server Side)
17.1.2. List Of Available Demo Applications (Client Side)
17.2. Environment Build Setup
17.3. Building The Demo Application
17.4. Updating The Applications Registry
17.5. Demo Applications Documentation
17.5.1. Bandwidth Check Application
17.5.1.1. Source Code
17.5.1.2. Bandwidth Check Service Methods
17.5.1.3. ServerClientDetection
17.5.1.4. ClientServerDetection
18. Testing Red5
18.1. Overview
18.2. How to Start Testing Without Reading This Chapter
18.3. Who Should Read This Chapter In Depth?
18.4. Red5 Testing Strategy
18.5. Red5 Testing Props
18.6. Unit Testing
18.6.1. Purpose
18.6.2. Technology
18.6.3. Running Tests
18.6.4. Creating New Tests
18.6.5. Running unit tests from eclipse
18.6.6. Guidelines for New Unit Tests
18.6.7. Submitting New Unit Tests
18.6.8. Suggesting New Unit Tests
18.7. Integration Testing
18.7.1. Purpose
18.8. System Testing
18.8.1. Purpose
18.9. Technology
18.10. Running Tests
18.11. Creating New Tests
18.12. A Sample System Test
18.13. Guidelines for New System Tests
18.14. Submitting New System Tests
18.15. Suggesting New System Tests
18.16. Continuous Integration
18.16.1. Overview
18.16.2. Technology
18.16.3. How To Run The Continuous Build
18.16.4. How to Submit New Jobs for Continuous Building
18.17. How you can help with Continuous Building
18.17.1. How to Set up a Continuous Build Server
19. Plugins
19.1. Loading
19.2. Configuring
19.3. Developing
19.3.1. Plugin Main Class
19.3.2. Factory Method Class
A. RTMP Specification
B. RTMPT Specification
B.1. URLs
B.2. Request / Response
B.3. Polling interval
B.4. Initial connect (command "open")
B.5. Client updates (command "send")
B.6. Polling requests (command "idle")
B.7. Disconnect of a session (command "close")
C. AMF Specification
C.1. AMF0 Specification
C.2. AMF3 Specification
D. Data Type Mappings
E. FLV
F. H264
F.1. Does Red5 plan to support H.264/ACC streams in the next release, maybe 0.7.1?
F.2. why are .mp4 files also listed in oflaDemo webapp grid as possible streams?
F.3. howto convert to h.264 using ffmpeg?
F.4. Does anyone have a link to an explaination of h264 licensing?
F.5. Someone already created a demo?
F.6. Some more Info about Seek and possible solutions
F.7. Are audio files supported?
F.8. How do I request an h264 file?
F.9. Does red5 support h264 live streaming?
F.10. Links
G. Speex Codec
G.1. Setting Up Flex SDk / Flex Builder
G.1.1. Get Flex 3 SDK
G.1.2. Config Flex Config To Target Flash Player 10
G.2. Code Example
G.3. FFMpeg and Speex
G.4. Links