先推荐个手机客户端,《爱秀宝宝》,分享您宝宝的照片http://www.ishowbb.net 

吹裙游戏web版,http://www.chuiqun.com

1,首先须参考adobe网站搭建起官方flash模型

http://labs.adobe.com/technologies/cirrus/samples/

上面有源码和开发文章,

注意,有些xp系统不支持摄像头,需要注释掉以下代码

openrtmfp+action script +flash builder搭建P2p视频服务器_openrtmfp action scr

2,根据官方文章搭建cgi服务器

apache 虚拟机配置如下

 

<VirtualHost *:80>
     ServerAdmin lvhl@dsp.ac.cn
     DocumentRoot "/var/www/html/python"
     ServerName py.eyooworld.com.cn
     ServerAlias py.eyooworld.com.cn
     ScriptAlias /cgi-bin/ /var/www/html/python/cgi-bin/
     ErrorLog "/var/log/httpd/py-error_log"
     CustomLog "/var/log/httpd/py-access_log" common
     RewriteEngine       On
     RewriteLogLevel  4
    <Location />
         DirectoryIndex  index.py
         Order allow,deny
         Allow from all
     </Location>
</VirtualHost>
文件目录如下:
[wisetrip@wisetrip06 python]$ find
.
./cgi-bin
./cgi-bin/reg.cgi
./cgi-bin/crossdomain.xml
./cgi-bin/registrations.db
./crossdomain.xml
安装python,sqlite-3.3.6-5.x86_64.rpm等软件包
 
[wisetrip@wisetrip06 python]$ vi crossdomain.xml 
 
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
修改reg.cgi
 

openrtmfp+action script +flash builder搭建P2p视频服务器_openrtmfp action scr_02

 

sqlite3命令创建registrations.db

3,在本地安装flash builder4.5,

修改菜单“项目“》属性》flex编译器,版本为10.3.0

 

openrtmfp+action script +flash builder搭建P2p视频服务器_openrtmfp action scr_03

修改develop key和url地址

 

openrtmfp+action script +flash builder搭建P2p视频服务器_openrtmfp action scr_04

测试应该可以实现视频

4,按照https://github.com/OpenRTMFP/Cumulus 编译安装openRtmfp

 

Linux下编译OpenRTMFP

OpenRTMFP是一个开源的Flash P2P服务器。废话少说,咱们一步一步来编译。

第一部分 准备工作

OpenRTMFP依托于其他C++库,因此,在编译OpenRTMFP之前,必须安装这些库文件

1.安装Lua5.1:[url=http://www.webgamei.com/club/thread-75226-1-1.html]点击这里[/url]
2.安装POCO库:[url=http://www.webgamei.com/club/thread-75230-1-1.html]点击这里[/url]
3.安装OpenSSL库:

一般的LINUX机器都会有这个库,可以先确认一下:[code]openssl version[/code]如果已经有了,就不需要安装了。如果没有,按照下文步骤进行安装:[url=http://www.webgamei.com/club/thread-75227-1-1.html]点击这里[/url]

第二部分 编译安装OpenRTMFP

1.下载源码:[url]https://github.com/OpenRTMFP/Cumulus[/url]
2.解压[code]tar xzvf OpenRTMFP-Cumulus-2ee2276.tar.gz
cd OpenRTMFP-Cumulus-2ee2276
cd CumulusLib
make
cd ../CumulusServer
make[/code]如果一切顺利,那么恭喜你,编译完成啦。

如果有问题,那么继续往下看:

1.错误“./sources/Script.h:30:25: 错误:lua5.1/lua.h:没有那个文件或目录”

解决办法,把lua5.1/lua.h修改为<lua.h>,其他相关地方同样处理
编辑Makefile,把-llua5.1修改为-llua

2.编译成功,但运行时发生错误“error while loading shared libraries: libPocoFoundation.so.12”

解决办法:运行一下语句即可[code]export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"[/code]

 

5,编写main.lua如下,放到CumulusServer/www/main.lua

 

function onConnection(client,response,...)

    function relay(targetId ,...)

        identi, action = unpack(arg)

        target = cumulus.clients(identi)

        if not target then

            error("client '"..targetId.."' not found")

        return

        end 

        target.writer:writeAMFMessage("onRelay",client.id, action, "kk")

        target.writer:flush(true)

    end 

end

 

即可运行