To clarify when it is best to use RTMFP rather than RTMP, it can be useful to examine their differences and
similarities. The following figure illustrates the basic topology of RTMP, basic RTMFP peer-assisted
networking, and RTMFP Groups.
Key differences between RTMP and RTMFP
RTMP is a unicast delivery method. It simply delivers streams from a server to individual connected clients.
Unicast consumes a large amount of network resources. For example, a 1 MBps stream delivered to 1,000
clients requires 1GB upstream from the server, which is very CPU- and network-intensive.
While RTMFP does support unicast delivery, its benefit lies in its multicast support. Native IP multicast
reduces the network load in the enterprise by distributing the data using customized network hardware.
However, reducing network load in this way does require a hardware investment. Flash Media Server 4
introduced multicast fusion support, which eliminates this hardware investment by offloading the data
delivery to peer-assisted networking, enabling clients consuming a stream to help distribute it to others on
RTMP is based on Transmission Control Protocol (TCP), whereas RTMFP is based on UDP. TCP is lossless;
each data packet is guaranteed to arrive in the same order it was sent. UDP has no ordering of packets and
no guarantee that the data will arrive at all, which makes RTMFP more lightweight and faster but less
reliable than RTMP. However, some routers do not allow UDP traffic, so it might be necessary for
developers to fall back to RTMP.
RTMP is not encrypted by default, but it can be encrypted using RTMPe (128-bit) or RTMPS (SSL
encrypted). RTMFP communication is always 128-bit encrypted. RTMP can utilize additional content
protection, such as Adobe Access file encryption along with SWF verification.
Similarities between RTMP and RTMFP
Both RTMP and RTMFP can be used to deliver live and on-demand video, audio and data streams. They
both provide low-latency real-time communication, powering applications such as videoconferencing,
text chat, live broadcasts, multiplayer gaming, and live support. They both offer stream encryption.