Re: about RTMP stream access on 0.9.0RC, Amazon EC2 server

114 views
Skip to first unread message
Message has been deleted
Message has been deleted

Chad Pilkey

unread,
May 26, 2015, 10:21:09 AM5/26/15
to bigblueb...@googlegroups.com
Does viewing a video stream work in the Flash client? If it does then your problem is not because of an internal IP because the BBB client uses the same URL(s) to connect.

The reason you can't connect is because your video player has to pass two parameters along with the URL. The two additional parameters are "meetingID" and "userID". You can see the relevant line from the Flash client here, https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/src/org/bigbluebutton/modules/videoconf/business/VideoProxy.as#L77

You can also see the cause of the problem from the server side if you go to the line of code mentioned in the ArrayIndexOutOfBoundsException that is in the log. You can see the line specified here, https://github.com/bigbluebutton/bigbluebutton/blob/master/bbb-video/src/main/java/org/bigbluebutton/app/video/VideoApplication.java#L64. The function expects a meetingID and userID when trying to connect to the stream and if they parameters aren't there then an exception is thrown. The code could probably handle the issue better by sending back a useful response, but it isn't really designed around unauthenticated access.

On Tuesday, May 26, 2015 at 7:56:02 AM UTC-4, Tony Que wrote:
BTW:
the video.log is as following:
VIDEO PUBLISHING, WORKS NORMAL:
2015-05-26 19:53:34,839+08:00 [RTMPConnectionExecutor#14326345539902] INFO  o.b.app.video.VideoApplication - W3C x-category:session x-event:disconnect c-ip:124.193.218.82 c-client-id:59
2015-05-26 19:53:34,840+08:00 [NioProcessor-16] WARN  o.r.server.net.rtmp.RTMPConnManager - Connection not found for WGOD5P6IXGW8Y
2015-05-26 19:53:38,965+08:00 [RTMPConnectionExecutor#HYXQD38IK9FOT-1] INFO  org.red5.server.scope.BasicScope - ClientBroadcastStream already exists: org.red5.server.stream.ClientBroadcastStream@4e9ee7fd new: org.red5.server.stream.ClientBroadcastStream@4e9ee7fd
2015-05-26 19:53:38,965+08:00 [RTMPConnectionExecutor#HYXQD38IK9FOT-1] INFO  o.r.s.stream.ClientBroadcastStream - Stream start: 320x240-d6wzo0538rdw_2-1432641193227
2015-05-26 19:53:38,966+08:00 [RTMPConnectionExecutor#HYXQD38IK9FOT-1] INFO  o.b.app.video.VideoApplication - W3C x-category:stream x-event:publish c-ip:124.193.218.82 x-sname:47f33b48-2820-47f6-b483-617906b42edd x-name:320x240-d6wzo0538rdw_2-1432641193227
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
RTMP STREAM ACCESS (INSIDE OF THE SERVER, USE FFMPEG DETELECT THE RTMP STREAM by accessing rtmp://server_ip/video/....../.....):

2015-05-26 19:11:57,811+08:00 [RTMPConnectionExecutor#FYNVHNKAUN6G4-1] INFO  o.b.app.video.VideoApplication - W3C x-category:session x-event:connect c-ip:125.59.56.8 c-client-id:86
2015-05-26 19:11:57,812+08:00 [RTMPConnectionExecutor#FYNVHNKAUN6G4-1] ERROR o.red5.server.net.rtmp.RTMPHandler - Error connecting {}
java.lang.ArrayIndexOutOfBoundsException: 0
        at org.bigbluebutton.app.video.VideoApplication.roomConnect(VideoApplication.java:64) ~[VideoApplication.class:na]
        at org.red5.server.adapter.MultiThreadedApplicationAdapter.connect(MultiThreadedApplicationAdapter.java:315) ~[red5-server.jar:1.0.5-RELEASE]
        at org.red5.server.scope.Scope.connect(Scope.java:255) ~[red5-server-common-1.0.5-RELEASE.jar:na]
        at org.red5.server.BaseConnection.connect(BaseConnection.java:354) ~[red5-server-common-1.0.5-RELEASE.jar:na]
        at org.red5.server.net.rtmp.RTMPConnection.connect(RTMPConnection.java:398) ~[red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at org.red5.server.net.rtmp.RTMPMinaConnection.connect(RTMPMinaConnection.java:87) ~[red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at org.red5.server.net.rtmp.RTMPHandler.onCommand(RTMPHandler.java:347) ~[red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at org.red5.server.net.rtmp.BaseRTMPHandler.messageReceived(BaseRTMPHandler.java:105) [red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:57) [red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at org.red5.server.net.rtmp.ReceivedMessageTask.call(ReceivedMessageTask.java:11) [red5-server-common-1.0.5-RELEASE.jar:1.0.5-RELEASE]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_79]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79]
        at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_79]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
2015-05-26 19:11:57,814+08:00 [RTMPConnectionExecutor#FYNVHNKAUN6G4-1] INFO  o.b.app.video.VideoApplication - W3C x-category:session x-event:disconnect c-ip:123.59.41.7 c-client-id:86
2015-05-26 19:11:57,818+08:00 [RTMPConnectionExecutor#FYNVHNKAUN6G4-1] WARN  o.r.server.net.rtmp.RTMPConnManager - Connection not found for FYNVHNKAUN6G4




On Tuesday, 26 May 2015 14:26:47 UTC+8, Tony Que wrote:
hi, all, regarding RTMP stream access on 0.81 verion, it could be directly access as "rtpm://xxx.xxx.xxx.xxx/video/meeting_id/stream_id", but on the 0.9.0 which hosted on Amazon EC2 platform, the rtmp 1935 is seved for the INTERNAL_VIRTUAL_IP rather than the EXTERNAL_ELASTIC_IP, so the RTMP cannot be directly acessed as the SERVER hosted on self-built LAN Server, the bbb-conf and network NAT detect result is as below, could i directly access the rtmp stream by rtmp://host_ip_address/video/meeting_id/stream_id like i did on 0.81 LAN server? thanks in advance and looking forward your help.

--------------------------------------------------------------------------------------
$ sudo bbb-conf --check
BigBlueButton Server 0.9.0 (745)
                    Kernel version: 3.13.0-49-generic
                      Distribution: Ubuntu 14.04.2 LTS (64-bit)
                            Memory: 3953 MB

/var/www/bigbluebutton/client/conf/config.xml (bbb-client)
                Port test (tunnel): 125.59.56.8
                              Red5: 125.59.56.8
              useWebrtcIfAvailable: true

-------------------------------------------------------
/opt/freeswitch/conf/sip_profiles/external.xml (FreeSWITCH)
                    websocket port: 5066
                    WebRTC enabled: true

/etc/nginx/sites-available/bigbluebutton (nginx)
                       server name: 125.59.56.8
                              port: 80
                    bbb-client dir: /var/www/bigbluebutton

/var/lib/tomcat7/webapps/bigbluebutton/WEB-INF/classes/bigbluebutton.properties (bbb-web)
                      bbb-web host: 125.59.56.8

/var/lib/tomcat7/webapps/demo/bbb_api_conf.jsp (API demos)
                           api url: 125.59.56.8

/var/www/bigbluebutton/check/conf/config.xml (client check)
                      client check: 125.59.56.8

/usr/share/red5/webapps/bigbluebutton/WEB-INF/red5-web.xml (red5)
                  voice conference: FreeSWITCH
                     capture video: true
                   capture desktop: true

/usr/local/bigbluebutton/core/scripts/bigbluebutton.yml (record and playback)
                     playback host: 125.59.56.8


========================================================================================
ONLY THE INTERNAL_LAN_VIRTUL_IP DETECTED FOR 1935 COMMUNICATION

$ netstat -nat|grep 1935
tcp6       0      0 :::1935                 :::*                    LISTEN     
tcp6       0      0 10.10.55.60:1935        120.95.210.81:15901    ESTABLISHED
tcp6       0      0 10.10.55.60:1935        120.95.210.81:15897    ESTABLISHED
tcp6       0    146 10.10.55.60:1935        120.95.210.81:16004    ESTABLISHED
tcp6       0      0 10.10.55.60:1935        120.95.210.81:15904    ESTABLISHED
tcp6       0      0 10.10.55.60:1935        120.95.210.81:15895    ESTABLISHED

any help? could i still directly access the rtmp stream by rtmp://host_ip_address/video/meeting_id/stream_id like i did on 0.81 LAN server? thanks in advance and looking forward your reply.
Message has been deleted
Message has been deleted

Chad Pilkey

unread,
May 27, 2015, 9:54:21 AM5/27/15
to bigblueb...@googlegroups.com
What you do really depends on the internals of ffmpeg and how it handles parameters I guess. I've never used ffmpeg for the purpose you are so I don't really know what your next step would be.

One problem you will face is that the meetingID and userID are checked against real meetings on the server. The easiest way to get the correct values would be to use the getMeetings and getMeetingInfo API calls.

I still don't know how you would pass the parameters with Freeswitch though and I am unfamiliar with what validation is actually performed on the parameters.

On Wednesday, May 27, 2015 at 5:08:16 AM UTC-4, Tony Que wrote:
thanks for your quick reply. i can see the video on client swf interface, and see the video.log error info (as shown below) when i was going to convert the rtmp stream directly from the rtmp://host_ip/video/meeting_id/stream_id by ffmpeg commands of "ffmpeg -i rtmp://................", this command works on BBB090-710:

data={"connId":"C3X2ABIC2E3PI","description":"User leaving BBB Video.","event":"user_leaving_bbb_video","connType":"RTMP","userId":"unknown-userid","meetingId":"unknown-meetingid"}


could you briefly tell me how can i convert the stream directly as i've done on "0.9.0 (710), ernel version: 3.16.0-37-generic". if necessary, how can i pass the parameters of MeetingID and UserID in the command?

Thanks in advance.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages