[adoberuntime]Flash Player 10, AIR 1.5, Flash Media Server 3.5[/adoberuntime]

Flash Player 10 and AIR 1.5 support Real-Time Media Flow Protocol (RTMFP). RTMFP is built on User Datagram Protocol (UDP). RTMP is built on Transmission Control Protocol (TCP). UDP provides lower latency than TCP. It also enables end-to-end peering—that is, direct data transmission between two clients. You can substitute RTMFP for RTMP in traditional unicast (one-to-many or one-to-one) applications to take advantage of the lower latency and lower bandwidth costs.

RTMFP provides the following features: NAT/firewall traversal, congestion control and prioritization, IP address mobility, and partial reliability.

RTMFP network traffic is encrypted with a 128-bit cipher. To play a stream over RTMFP, a client must know the name of the stream and know the peer ID of the publisher. The peer ID is a 256-bit value associated with the publisher's identity. The publisher must accept a peer request before a connection is made.

Adobe recommends

Adobe recommends
Future of Communication with RTMFP
Matthew Kaufman

[adobebyline]Adobe Computer Scientist Jozsef Vass explains RTMFP in an Adobe DevNet article, Best practices for real-time collaboration using Adobe Media Server.[/adobebyline]

About peer IDs

Each client has a peer ID, and the peer ID space is server-specific. The peer ID is the SHA256 of the client's Diffie-Hellman public key.

For a client-server connection, peer IDs are available in the ActionScript 3.0 NetConnection.nearID and NetConnection.farID properties. The nearID is the peer ID of the client, the farID is the peer ID of the server.

Peer IDs are also available in the Server-Side ActionScript Client.nearID and Client.farID properties. The nearID is the peer ID of the server, the farID is the peer ID of the client.

For a connection between Flash Player and Adobe Media Server, the client-side NetConnection.nearID and the server-side Client.farID properties share the same value. The client-side NetConnection.farID and the server-side Client.nearID properties share the same value.

Server-Side ActionScript also has NetConnection.nearID and NetConnection.farID properties that contain the peer IDs of both sides of a server-side RTMFP connection. In this case, the NetConnection is a client.

Unicast, broadcast, and multi-point publishing over RTMFP

Although RTMFP is often used for peer-assisted networking applications, you can use RTMFP in unicast, broadcast, and multi-point publishing applications as well. Simply replace the RTMP protocol in the NetConnection.connect() call with the RTMFP protocol:


To use RTMFP with multi-point publishing, create a server-side NetConnection and use an RTMFP URL to connect to the target server (for example, "rtmfp://localhost/myapp").

To stream audio, video, and data, create a NetStream just as you would with an RTMP connection. Do not pass a GroupSpecifier to the NetStream constructor as you would with a peer-assisted networking application.

When you use an RTMFP connection, updates to shared objects are sent over the RTMP chunk stream data channel within the RTMFP connection with full reliability. The RTMFP protocol supports a wide range of reliability settings (from zero to full) for audio, video, and data transfer, along with excellent retransmission and congestion handling. See NetStream.audioReliable, NetStream.videoReliable, and NetStream.dataReliable in the ActionScript 3.0 Reference for Flash Platform.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy