问题
I am new to flex & first time using red5 server. can someone help me in streaming a live cam using red5 server on a web page. Also how to install application on server running on ubuntu 11.04.
回答1:
For streaming Live web cam on Web page.
First create a flash which will display the web cam video on its stage. Then embed the flash onto a div in the web page.
Use the code for showing the video on the screen and simultaneously publishing it to red5 server
_camera = Camera.getCamera();
_camera.setMode(320,240,10000);
_camera.setQuality(0,85);
_video = new Video();
_video.x=0;
_video.y=0;
_video.height= _height;
_video.width = _width;
_video.attachCamera(_camera);
uiComp.addChild(_video);
_stream = new NetStream(_connection);
_stream.attachCamera(_camera);
_stream.publish(_streamName,"live");
Then embed the same flash to the web page div.You can see your web cam and also your stream is been published to the Red5 server.
Here you go .You can now stream the web cam to the web page.I have done it many times. If you have any other difficulty ,i can help you.
来源:https://stackoverflow.com/questions/9982488/application-for-live-video-streaming-using-red5-server