What is an RTMP server and how to connect to it with Flash Sharedobject?

Asked

Viewed 15,650 times

5

I need to create a file SharedObject Flash on an internet server for communication between several .SWFs. This communication needs to be fast and if possible in real-time. After some searches on the website of Adobe reference, 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);

From what I understand, you need to own a server RTMP, which is a type of Media Server used by Flash to handle live-streaming media and also data with the SharedObject.

In this link from Wikipedia I found an open-source media server called Red5, but I’m having a hard time learning how to use it.

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

1 answer

4


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

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

Wowza Media Server: http://www.wowza.com/ (paid)
Adobe Media Server: http://www.adobe.com/br/products/adobe-media-server-family.html (paid)
And the free Red5.

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 processing and network. Depending on your needs, you can use a server outside 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 in charge of the hosting company and you would only try to make the transmission.

Search Google for Video Streaming and analyze offers paying attention to value and number of concurrent users.

As for 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 like Adobe Flash Live Encoder : http://www.adobe.com/br/products/flash-media-encoder.html

Follow the Wowza Media Server documentation so you can clarify your doubts:

http://www.wowza.com/forums/content.php?217-Quick-Start-Guide

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

http://www.zstream.eu/
http://livestreamcast.org/
http://www.justin.tv/
http://new.livestream.com/
http://www.ustream.tv/
http://www.livecast.com/
http://www.google.com/+/learnmore/hangouts/onair.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.