Flashphoner team proudly presents to Flash and VoIP community our two new products that may be interesting for VoIP experts as well as Action Script developers. Both of these products take advantage of newer RTMFP protocol where letter “F” means transition from “Message” to “Media Flow”.
Principal difference between these two protocols is how they communicate over the network. RTMFP is based on UDP, whereas RTMP utilizes TCP. This change gives a number of specific advantages for audio/video delivery in real-time. While most of the products with similar functionality are still using RTMP, we’ve made the transition and have got some impressive results.
At the beginning we worked a lot with Flash Player and Wowza Media Server. All synthetic tests showed great results, but we encountered a problem in live environment – growing latency. After further investigation and analysis we came to the conclusion that main limiting factor was the RTMP protocol itself. And the reason for it is in underlying TCP which, being a reliable protocol, asks for every packet to be delivered in strict order. So growing latency was the price for perfect TCP reliability which is not required for VoIP communications in general.
What is the latency?
It’s a delay in communication when one user hears another only after seconds. During our tests of RTMP protocol in live environment this delay was reaching 4 seconds in average quality network which ruined the quality of communication. Most of professional VoIP solutions utilize UDP protocol for media streaming to reduce latency. And this latency was the last frontier before creation of a full featured softphone based on Adobe Flash Player, as it already has all other needed features (ability to capture, publish, playback media; mainstream codec support, echo cancellation, jitter buffer).
Now about the products.
Flashphoner RTMFP SIP Gateway
This is the gateway between Flash Player and SIP environment. It allows you to connect to any SIP server (Asterisk,OpenSIPs etc.), make and receive calls from PSTN/mobile phone and from your flash-based browser softphone.
So you will not only be able to call from the Click-to-Call widget to mobile phone, but you can also call FROM mobile phone to the user on the website! You can also send text messages (SMS) here. If your SIP server/provider supports sending and receiving text messages, you can send them from the browser to mobile phone, as well as from the mobile phone to your browser softphone. Usually this functionality is provided by full-featured IP Multimedia System (IMS) based on 3GPP standards.
Flashphoner RTMFP Media Server
This Media server is intended for creation of simple flash-to-flash video chats and video conferences. There are many platforms providing similar functionality out there, but most of them are based on RTMP protocol and, therefore, suffer from growing latency if there are users with imperfect connections. You can see that this issue is quite common for RTMP based chat programs if you visit their support forums. Flashphoner Media Server resolves this issue by using RTMFP protocol based on UDP. Which makes it a better option for professional video chat solutions.
Please note that we are not providing any peer-to-peer solutions currently. From our experience, when we worked on a project similar to Chatroulette, peer-to-peer connections were successful only 10% of the time. All other connections were going through the server. The reason is in the amount of NATs and Firewalls in the global network, which often do not allow P2P connections. So at this moment our server doesn’t not have P2P functionality. But if you need professional flash-based video chat that works through the server, Flashphoner RTMFP Media Server is your best choice!
Among other nice features of our Flashphoner RTMFP Media Server are extensibility and integration options. We are using Java for implementation of server processors which means that you can use all the power of this platform for database integration, communication with third-party web-services, protocols etc.
Specifications
Flashphoner RTMFP SIP Gateway
– Codecs: G.711, G.729, Speex Wideband, H.263, H.264, Sorenson Spark
– Protocols: RTMFP, SIP (RFC3261), RTP
– Instant messaging: RFC 3428
– Transfer, Hold: RFC3515
– Call recording
– Javascript API
– Client application – Javascript Phone (open source, ready for customization)
Flashphoner RTMFP Media Server
– Protocol: RTMFP
– Codecs: G.711, Speex Wideband, Nelly Moser, H.264, Sorenson Spark
– Commands: connect, disconnect, publish, unpublish, play, stop
– Extensibility: ability to use Java on the server side, customized client/server invoke methods
Test results
As we mentioned above, RTMP (TCP based) server will try to maintain a 100% packet delivery rate even if there is a network lag. This may cause a severe latency, since server has to wait for every missing packet before playing the next one. More missing packets – higher accumulated latency in the audio/video stream. If we try to drop packets programmably to keep the stream in real time, we will hear significant sound deterioration. This is confirmed by our tests with different packet loss percentages (“Linux netem” and “IFB” utilities).
Under the same network conditions RTMFP server works without increased latency and very little sound deterioration compared to RTMP server case. In UDP based communications one UDP packet has one audio frame. In this case even a loss of a few packets is not a real threat to overall quality of the stream. Things are a bit different when you are streaming video. In this case some UDP packets carry video key frames and if they get lost it will produce picture “artifacts” during decoding process. But this does not increase the latency and, if the network lag goes away, your picture quality will improve automatically.
Also there are special parameters in the NetStream API of the Adobe Flash Player that allow you to control reliability of the UDP packet delivery for audio, video and data individually.You should always set “reliable=true” for data as it carries all SIP signalling information, instant messages, call control parameters. But for media streams you can variate between true/false depends on the network quality and your requirements for picture/sound clarity. For example, you can set “audioReliable=false” and “videoReliable=true” simultaneously and get acceptable quality communication in majority of the networks. Thus, based on our test results, we can say that RTMFP protocol significantly improves latency/quality ratio of flashVoIP communications. This protocol can be recommended as a platform for development of web-based applications that utilize real-time audio/video communication.We hope that this information gave you a better idea about our products and their functionality. If you have any further questions or willing to give us some feedback, please contact us at support@flashphoner.com
Thanks!