开发者

problem connecting to red5 "firstApp" from librtmp

I am trying to connect to Red5 tutorial "firstApp" application from libRTMP client. Note that I can connect to it from flex client, as tutorial describes:

...
//from flex client 
NetConnection nc = ne开发者_如何学Gow 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

Any ideas what the problem might be? Thank you, -V


Can you take a look at logs? Perhaps librtmp still send "live" as a name of application.


Is there an installed and configured application named "firstApp" inside your red5 webapps directory?


try "rtmp://localhost/firstApp/definst" as the URL


The RTMP URL format is of the form

rtmp[t][e|s]://hostname[:port][/app[/playpath]]

Reference : http://rtmpdump.mplayerhq.hu/librtmp.3.html


Eventually solved my problems with another open source RTMP project "crtmpserver" (http://www.rtmpd.com), which seems to be far better designed, documented, implemented and maintained.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜