About RTMP Streaming
RTMP (Real Time Messaging Protocol) is a system for delivering on-demand and live media to Adobe Flash applications (like the JW Player). RTMP supports video in MP4 and FLV and audio in AAC and MP3. RTMP offers several advantages over regular HTTP video downloads:
- RTMP can do live streaming, so people can watch your video while it is being recorded.
- RTMP can do dynamic streaming, where the video quality automatically adjusts to changes in bandwidth.
- Players can seek to later parts in a video, which is particularly useful for files > 10 minutes.
- Players maintains a tiny buffer, instead of downloading a video during playback, saving bandwidth.
However, do note that RTMP has its disadvantages too. The most important ones are:
- RTMP uses different protocols and ports than HTTP, which makes it vulnerable to getting blocked by (corporate) firewalls. This issue can be prevented by streaming in RTMPT (tunneling over HTTP), which comes at a server performance cost.
- RTMP data is streamed to the player, which means the bandwidth of the connection must be larger than the data-rate of the video. If the connection drops for a couple of seconds, the stream will stutter. This issue can largely be prevented by using dynamic streams that include a low-quality file.
The biggest drawback is that RTMP only works in Flash and not in HTML5. New HTTP streaming protocols, like Apple's HTTP Live Streaming (HLS), have wider device support (e.g. iOS) and will likely replace RTMP over the coming years. JW Player supports Apple HLS in both Flash and HTML5 mode.
In order to use RTMP, your host or CDN needs to have a dedicated RTMP server installed. There are two major offerings, both supported by JW Player:
- The Wowza Media Server is today's most widely used solution. It includes support for almost any streaming protocol, including RTMP. Wowza 3 introduced dedicated support for SMIL manifests (see below)
- The Adobe Media Server is another great option. Since Flash is developed by Adobe, new RTMP functionalities find their way in FMS first.
The following CDNs (Content Delivery Networks) support RTMP and are tested to work great with JW Player. They all support dynamic streaming and, with the exception of CloudFront, live streaming too:
A key feature of RTMP is the ability to do live streaming, e.g. of presentations, concerts or sports events. Next to JW Player and an RTMP server, one then also needs a small tool to ingest the live video into the server. There are a bunch of tools available. Flash Live Media Encoder is free and available for Windows and Mac.
With both FMS and Wowza, a live stream is embedded in exactly the same way as an on-demand stream. However, the Akamai, Edgecast and Limelight CDNs require a player to subscribe to a live stream. JW Player supports this mechanism.
JW Player will embed and play a live stream like an on-demand file, with one exception: instead of displaying a slider to scrub through the timeline, the player will display the title of the event in the controlbar.
For large-scale deployments, JW Player supports 3 mechanism for server load balancing:
- DNS load balancing, working independent of JW Player.
- RTMP 302 redirects, as used by Wowza for load balancing. See their user guide for more info.
- SMIL load balancing, where an initial SMIL file contains the RTMP links to edge nodes. See the section on dynamic streaming below for an example SMIL file.
JW Player supports Closed Captioning with RTMP, for both live and on-demand streaming. Only a single CC track is supported and this track must be in TX3G format. Both the Wowza and Adobe media servers are capable of sending TX3G captions over RTMP.
The first time JW Player encounters a TX3G onTextData cue, it places a CC button in the controlbar. If the user chooses to enable CC, this preference will be saved in a cookie and CC will be enabled for any subsequent videos the user watches.