What is an RTMP server and how do I connect to it with Flash's SharedObject?

4

I need to create a SharedObject Flash file on one server on the internet for communication between several .SWFs . This communication needs to be fast and if possible real-time. After some searches on the Adobe Reference , I found the following code:

var nc:NetConnection = new NetConnection();
nc.connect("rtmp://somedomain.com/applicationName");
var myRemoteSO:SharedObject = SharedObject.getRemote("mo", nc.uri, false);
myRemoteSO.connect(nc);

As far as I understand, you need to have a RTMP server, which is a type of Media Server used by Flash to handle live-streaming media and also data with SharedObject .

In this Wikipedia link I found an Open-Source media server called Red5 , but I'm having trouble learning how to use it.

Has anyone ever worked with this type of server? Is there any that is free? Can I integrate it into Wamp Server, for example? How does the connection to this server work?

    
asked by anonymous 20.02.2014 / 17:17

1 answer

2

RTMP Server is nothing more than a media server for live and on-demand content distribution. These servers are independent and have their own modules.

There are several software on the market, however the most used are:

Wowza Media Server: link (paid)
Adobe Media Server: link (paid)
And Red5 is free.

If you want to have an RTMP server to offer this service to third parties, you need to have a good server, joining good data and network processing. Depending on your need, you can use a server out of the country so you can reduce costs and have a great infrastructure.

There are many offers for this type of service in the market, where all the infrastructure is the responsibility of the hosting company and you would only do the transmission.

Search Google for Video Streaming and review offers paying attention to the number and number of concurrent users.

Regarding your code, it would look like this:

var nc:NetConnection = new NetConnection();
// Na linha abaixo é feita a requisição para o servidor
nc.connect("rtmp://ip-ou-host-do-servidor:1935/live/live");
var myRemoteSO:SharedObject = SharedObject.getRemote("mo", nc.uri, false);
myRemoteSO.connect(nc);

For this to work, you would need to be sending data to the server, using programs such as Adobe Flash Live Encoder: link

Follow the Wowza Media Server documentation so you can better answer your questions:

link

There are still public services at no cost, but with reduced quality of service. Here are some of them:

link link
link link
link link
link

    
27.02.2014 / 15:21