Application for Live video streaming using red5 server

左心房为你撑大大i 提交于 2019-12-10 11:47:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!