- Real Time Messaging Protocol
Real Time Messaging Protocol (RTMP) is a proprietary protocol developed by
Adobe Systems for streaming audio, video and data over the Internet, between a Flash player and a server.The RTMP protocol has three variations:
# The "plain" protocol which works on top of TCP and uses port number 1935
# RTMPT which is encapsulated withinHTTP requests to traverse firewalls
# RTMPS which works just like RTMPT, but over a secure HTTPS connection.While the primary motivation for RTMP was a persistent protocol for Flash, it is also used in some other applications, such as the
Adobe LiveCycle Data Services ES .Operation
The raw TCP-based RTMP protocol maintains a single persistent connection and allows real-time communication. To guarantee smooth delivery of video and audio streams, while still maintaining the ability to transmit bigger chunks of information, the protocol may split video and data into fragments. The size of the fragments used can be negotiated dynamically between the client and server, and even disabled completely if desired, although the default fragment sizes are 128 bytes for video and most other data types, and 64-bytes for audio data. Fragments from different streams may then be interleaved and
multiplexed over a single connection. With longer data chunks, the protocol would then only carry a one-byte header per fragment, thus incurring very little overhead. In practice however, individual fragments are not typically interleaved. Instead, the interleaving and multiplexing is done at the packet level, with RTMP packets across several different active channels being interleaved in such a way to ensure that each channel meets its bandwidth, latency, and other quality of service requirements. Packets interleaved in this fashion are treated as indivisible, and are not interleaved on the fragment level.The RTMP protocol defines several channels on which packets may be sent/received, and which operate independently of each other. For example, there is a channel dedicated for handling RPC requests and responses, a channel for video stream data, a channel for audio stream data, a channel for out-of-band control messages (fragment size negotiation, etc.), and so on. During a typical RTMP session, several channels may be active simultaneously at any given time. When RTMP data is packetized, a packet header is generated. The packet header specifies, among other things, the id of the channel that it is to be sent on, the timestamp at which is was generated (if necessary), and the size of the packet payload. This is then followed by the packet payload, which is fragmented according to the currently agreed-upon fragment size before it is serialized over the connection. The packet header itself is never fragmented, and its size does not count towards the data in the packet's first fragment. In other words, only the actual packet payload data is subject to fragmentation.
At a higher level, the RTMP protocol encapsulates
MP3 andFlash Video multimedia streams, and can makeremote procedure call s (RPCs) using theAction Message Format .Other RPC services are made asynchronously with a single client/server request/response model, so real-time communication is not necessary.Clarifyme|date=March 2008 [cite journal|title=Using RPC services in Flex Data Services 2|url=http://www.adobe.com/devnet/flex/articles/rpc_service_02.html|accessdate=2007-04-16]
HTTP tunneling
Many corporate network firewalls block connections via unrecognised ports and protocols; for this reason, a variant called RTMPT (RTMP Tunneled) was developed. This protocol encapsulates the RTMP data in valid
HTTP requests, and by default communicates on port 80. While RTMPT requires slightly higher bandwidth due to the addition of HTTP headers, the protocol can be used successfully in environments where security measures would block RTMP. This approach also works on secured HTTPS connections, in which case it is called RTMPS (RTMP Secure).RTMP client software
The most well-know RTMP client is Adobe's Flash player which can stream video and audio from RTMP servers. Recently, the
open source media playerXBMC has acquired preliminary support for playing RTMP streams in itsSVN version (see the [http://xbmc.org/trac/ticket/4905 patch] ).RTMP server software
Currently, the only full implementation RTMP servers are the
Adobe Flash Media Server , Wowza Media Server and WebORB Integration Server (free and available for .NET, Java and ColdFusion) both commercial and closed source implementations.There is a
reverse engineered open source project calledRed5 which aims to produce a feature-complete implementation written in Java. As of October 2007, the majority of the functionality is implemented, although the project is still in thebeta stage .There are some other RTMP-servers with basic functionality available over at [http://code.google.com/search/#q=RTMP%20Server Google Code]ee also
Real Time Media Flow Protocol (RTMFP) based on User Datagram Protocol (UDP)References
* [http://www.adobe.com/devnet/flex/articles/rpc_service_05.html Using RPC services in Flex Data Services 2] - Adobe Flex Article
* [http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16631 HTTP Tunneling protocols] - Adobe TechNoteExternal links
* [http://www.osflash.org/rtmp/protocol OSFlash - RTMP Protocol]
* [http://www.osflash.org/rtmp_os OSFlash - RTMP OS]
* [http://wiki.gnashdev.org/wiki/index.php/RTMP/AMF/SOL Gnash Project Wiki - RTMP/AMF/SOL]
* [http://sunil-gupta.blogspot.com/2008/03/rtmp-protocol-flavours.html RTMP Flavors]
Wikimedia Foundation. 2010.