10th March, 2014 3 Min read
Book a Demo
Real Time Messaging Protocol or RTMP is mainly serving for high speed transmission of audio, video and data between flash player and a server. Initially developed by Macromedia, the protocol is now owned by Adobe, and specifications about it have only partially been released for public use.
Reduce your AWS costs by over 50%
Discover your Cloud Saving Potential – Answer just 5 simple questions. AppsFlyer, Playtika, Lufthansa, IBM, top leading companies are already using our FinOps services.
According to those specifications, the RTMP protocol has multiple variations, i.e. the “plain” RTMP protocol, RTMPS which is RTMP over an TLS/SSL connection, RTMPE which is RTMP encrypted using Adobe’s own security mechanism, and RTMPT which is encapsulated within HTTP requests to traverse firewalls.
The use of RTMP is to avoid latency in communication, mainly, deliver audio or video streams smoothly, and by splitting them in fragments, make them interleaved and multiplexed over a single connection. Also, you save bandwidth.
Interleaving and multiplexing is done at the packet level, with RTMP packets across several different active channels being interleaved in such a way as to ensure that each channel meets its bandwidth, latency, and other quality-of-service requirements. RTMP defines several virtual channels on which packets may be sent and received, and which operate independently of each other. During a regular RTMP session, several channels may be active simultaneously at any given time.
RTMP is also considered the original flash streaming protocol as developed by Macromedia, then Adobe for streaming audio, video, and data, between Flash media Server and Flash player. A two way connection is established between Flash server and Flash player which allows for a real-time communication back and forth. Example of data that can be communicated is:
Flash player first contacts the Flash media server and an RTMP connection is then established. An RTMP connection is said to begin with a “handshake”. Flash player requests a specific stream, for example – video. Once the media server receives the request (for the stream), it is sent to Flash SWF directly over the RTMP connection. The same stream can be sent to any number of clients that request it, provided the bandwidth is good enough on both sides to deliver all the simultaneous streams. Additional media servers can be chained together, which in result improves capacity, or allows for – large events.
Protocol packets contain a header and a body which, in the case of connection and control commands, is encoded using the Action Message Format (AMF).
Image 1 – RTMP packet structure
Image source: Wikimedia Commons
Image 2 – RTMP headers
Basic Header is the only constant part of the packet, composed of a single byte, and the rest of the packet is the stream ID. The basic header can be extended with 2 or 3 extra bytes. The Chunk Message Header contains meta-data information such as the message size, timestamp and message type. This last value is a single byte and defines whether the packet is an audio, video, command or “low level” RTMP packet (e.g. RTMP Ping).
With over 10 years of experience, GlobalDots have an unparallel knowledge of today’s leading web technologies. Our team know exactly what a business needs to do to succeed in providing the best online presence for their customers. We can analyse your needs and challenges to provide you with a bespoke recommendation about which services you can benefit from.
GlobalDots can help you with the following technologies: Content Delivery Network, DDoS Protection, Multi CDN, Cloud performance optimization and infrastructure monitoring.
EX.CO is a video technology platform that enables publishers to monetize video content on websites.
Justt is a chargeback mitigation startup based in Tel Aviv. Chargebacks, as defined, are demands by a credit card provider for a retailer to reimburse losses on fraudulent or disputed transactions. Justt’s objective is to assist merchants worldwide in combating false chargebacks using its proprietary artificial intelligence technology.
The cloud used to be viewed as a place of significant cost savings: rather than purchasing and maintaining dozens of server stacks, organizations could outsource this and purchase compute power on an as-needed basis. In the ensuing rush to cloud architecture, however, many companies simply lifted-and-shifted their old financial bad habits. The sheer speed of […]
Cloud computing has transformed more than individual app architectures: it’s granted both start-ups and market leaders an equal platform for innovation. New products are no longer dependent upon complex revenue-draining in-house server stacks. Instead, cloud-native disruptors such as Uber and Airbnb have been able to harness the once-unthinkable degrees of agility, scalability, and cost-efficiency that […]
Schedule a call with our experts. Discover new technology and get recommendations to improve your performance.