2011-05-11 33 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),似乎是更好的設計,記錄,實施和維護。