2

How to stream video over Socket Class (or XMLSocket) with ActionScript?


or\and


How to do it using Socket Class (or XMLSocket) in AIR?

3 Answers 3

1

Why are you looking to stream video using Socket? The performance would be far, far less than what's offered by Adobe's built-in classes for this.

To stream audio and video in Flash, you'll need an FMS-alike server. Red5 is an open-source server that allows this (like Maciek said). However, serving your own live video over flash.net.Socket and then decoding it yourself would yield horrible performance. Essentially, the only way to stream video in performance-acceptable way would be to use flash.net.NetConnection. This uses the RTMP protocol for media streaming.

Also, if it's not live streaming of video you are looking for, take look at serving those video files over a normal HTTP server and the FLV format.

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

1 Comment

The point is not in performance. I just need to stream live video using Sockets. Let's suppose I have super-fast computer and a web camera. But only thing I can use to send video from that camera is SOCKET connection!( I know that I can just take Byte Arrays From current video object bitmap data but that will give me frame by frame representation of video stream... I want something else, better, faster.
1

I think You can only use sockets in Air. If You need streaming in Flex/Flash look for RED5 RTMP server, there are client and server examples.

1 Comment

Ok so how to do it using Socket Class (or XMLSocket) in AIR?
1

Can't use Socket class for this -- you don't have a framebuffer to the webcam.

You could use Adobe Stratus for this -- it's a peer to peer negotiation layer that supports hooking Camera and Microphone up to a (peer to peer) NetStream.

Comments

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.