6

My Requirements are similar to this old question of 2009. I am just re-posting since OP is kind of 2 years old and the question is closed now.

How can I transmit live video Stream over a Socket using Flex / ActionScript 3.0 ?

I am developing an application which works on P2P architecture so I cant use FMS for live media streaming. I have read about NetConnection and NetStream classes but cant start using them since all the examples are using FMS. How I do this ?

Secondly, I also need a suitable library / tool / technique to encode (& than decode) video frames before displaying & transmitting. For this I have read X264 codec but using this with Flex seems too complicated. Any other alternatives ?

Any tutorial / blog will be of great help...

2 Answers 2

6
+25

You can send data directly to a remote machine; yet, that machine would need to be listening, and unless you are using Air, that machine would need a socket policy file. Obviously not being able to connect multiple machines directly to each other without a policy file, forces you to have a central server, and prevents straight forward implementations of in browser p2p chat/video/(w/e) applications.

So you have to have a central server; however, you don't have to pay for one.

I knew I had read about this somewhere, so I searched google and came up with the links below.

http://haxe.org/doc/flash/peer2peer

https://github.com/OpenRTMFP/Cumulus

All you need is a developer key, that Adobe gives away for free at:

https://www.adobe.com/cfusion/entitlement/index.cfm?e=stratus

With the above being said, you will need to know some c++, in order to take proper advantage of this.

If you want to learn how to do something basic to get you started, and you are really just interested in developing something for your local network, then these articles tell you how to do RTMFP as a multicast Group:

http://www.flashrealtime.com/videotutorial-remote-device-controller/

http://www.flashrealtime.com/local-flash-peer-to-peer-communication-over-lan-without-cirrus/

[EDIT: the content for the last two links, as the site removed those pages, can currently be found using the waybackmachine and the snapshots around early 2011]

There is a ton of stuff that you can do with the information above; yet, I would start small.

Sign up to request clarification or add additional context in comments.

1 Comment

the content for the last two links, as the site removed those pages, can currently be found using the waybackmachine and the snapshots around early 2011
3

You will need anyway a media server, either FMS or SmartFox or else and have both parties connecting to the server. It will also be dealing with the encoding. I don't think you can do that without a media server in between...

3 Comments

But I dont want to use FMS... cant I send data directly to a remote machine ?
are you able to use AIR instead of flex? that might remove the "media server" requirement. I can't see a browser-based flex app able to easily send data someplace else (typically, flex apps require servers to do anything interesting. Sending video would require interfacing with such a server). But I can see an AIR app having that freedom.
Yes but you would still need both app air to connect to a central server to at last deal with ip addresses if you're going the socket way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.