2011-05-11 34 views
1

我试图从libRTMP客户端连接到Red5教程“firstApp”应用程序。 注意,我可以从Flex客户端连接到它,因为教程介绍:从librtmp连接到red5“firstApp”的问题

... 
//from flex client 
NetConnection nc = new NetConnection(); 
nc.connect("rtmp://localhost/firstApp"); - connected, works 

//from libRTMP 

RTMP* r = RTMP_Alloc(); 
retVal = RTMP_SetupURL(r, "rtmp://localhost/firstApp"); 
retVal = RTMP_Connect(r, NULL); - no connection 

retVal = RTMP_SetupURL(r, "rtmp://localhost:1935/firstApp"); 
retVal = RTMP_Connect(r, NULL); - still no connection 

//The same thing works fine for Red5 "live" application 

retVal = RTMP_SetupURL(r, "rtmp://localhost:1935/live/instance"); 
retVal = RTMP_Connect(r, NULL); - works, connected 

任何想法是什么问题呢? 谢谢, -V

回答

0

你可以看看日志吗?也许librtmp仍然发送“live”作为应用程序的名称。

0

在red5 webapps目录中是否有已安装和配置的名为“firstApp”的应用程序?

+0

你可以看看日志吗?也许librtmp仍然发送“live”作为应用程序的名称。 不,我用wireshark检查过... 在red5 webapps目录中是否有一个名为“firstApp”的已安装和配置的应用程序? 是的 – user270398 2011-08-16 14:52:35

0

尝试 “RTMP://本地主机/ firstApp/definst” 作为URL

0

最终解决了我问题与另一个开源RTMP项目“crtmpserver”(http://www.rtmpd.com),似乎是更好的设计,记录,实施和维护。