WebRTC as RTMP re-publishing demo is working

Hi,

We have launched your server on our amazon EC2 instance as trial base
but your demos are not working
For example WebRTC as RTMP re-publishing. I got camera preview under local section but its not publishing to facebook, i didn't get any status when i click start. Also start button is disabled. About 20 minutes gone but got no status.
Not get any status after clicking the start button.
Also server is slow.

Please see following log.

Code:
tail -f /usr/local/FlashphonerWebCallServer/logs/flashphoner_manager.log
  "status" : "PENDING",
  "sdp" : "v=0\r\no=- 2256796176165210393 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:h/0O\r\na=ice-pwd:Y/jzs4KuReYkmfTWLB7F5/oW\r\na=fingerprint:sha-256 EB:CF:9E:29:E4:98:76:F9:2D:88:57:C9:FD:5B:E5:26:13:45:12:6B:6F:C9:F2:32:36:E5:EC:52:6F:9A:B8:31\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=sendonly\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\na=ssrc:1972893130 cname:bUNqg/RXZKAKgznU\r\na=ssrc:1972893130 msid:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU a0a4d928-2a2d-46b8-8ec0-200a61b12f4b\r\na=ssrc:1972893130 mslabel:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU\r\na=ssrc:1972893130 label:a0a4d928-2a2d-46b8-8ec0-200a61b12f4b\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 98 100 102 127 97 99 101 125\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:h/0O\r\na=ice-pwd:Y/jzs4KuReYkmfTWLB7F5/oW\r\na=fingerprint:sha-256 EB:CF:9E:29:E4:98:76:F9:2D:88:57:C9:FD:5B:E5:26:13:45:12:6B:6F:C9:F2:32:36:E5:EC:52:6F:9A:B8:31\r\na=setup:actpass\r\na=mid:video\r\na=extmap:2 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:4 urn:3gpp:video-orientation\r\na=extmap:5 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=sendonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtpmap:100 H264/90000\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=fmtp:100 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:102 red/90000\r\na=rtpmap:127 ulpfec/90000\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:125 rtx/90000\r\na=fmtp:125 apt=102\r\na=ssrc-group:FID 1753026730 3573242199\r\na=ssrc:1753026730 cname:bUNqg/RXZKAKgznU\r\na=ssrc:1753026730 msid:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU dc188bd4-b1b5-45f6-bc8c-20a425a1f7e9\r\na=ssrc:1753026730 mslabel:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU\r\na=ssrc:1753026730 label:dc188bd4-b1b5-45f6-bc8c-20a425a1f7e9\r\na=ssrc:3573242199 cname:bUNqg/RXZKAKgznU\r\na=ssrc:3573242199 msid:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU dc188bd4-b1b5-45f6-bc8c-20a425a1f7e9\r\na=ssrc:3573242199 mslabel:sN0HBrx6FjtC9BijRwecFVMiaNJQc3W1slxU\r\na=ssrc:3573242199 label:dc188bd4-b1b5-45f6-bc8c-20a425a1f7e9\r\n",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
I think its not sending stream name i have given it.

upload_2017-5-25_18-34-57.png


can you plz help me?

Thanks,
Faraz
 

Max

Administrator
Staff member
Hello
First of all please update to the latest available version of WCS server.
Code:
service webcallserver update
Then comment or remove this line in config /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties to remove prefix rtmp_ from stream names:
Code:
rtmp_transponder_stream_name_prefix =rtmp_
And restart WCS server
Code:
service webcallserver restart
It should work.
 
Its still not working after following your instructions.
Now logs are such like that
Code:
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/flashphoner_manager.log
  "hasAudio" : true,
  "status" : "PENDING",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
 

Max

Administrator
Staff member
Please send SSH access to logs@flashphoner.com
We will check.
Or please send full log files (make sure logs have testing events)
Code:
logs/server_logs/flashphoner.log
logs/flashphoner_manager.log
to the same email
 
Please find both logs below

Code:
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/serv                                                                                                                     er_logs/flashphoner.log
14:38:24,799 INFO        MediaProcessor - WSS-pool-9-thread-2 Add extmap, 6 http                                                                                                                     ://www.webrtc.org/experiments/rtp-hdrext/playout-delay
14:38:24,799 INFO                 Agent - WSS-pool-9-thread-2 Gathering candidat                                                                                                                     es for component video.RTP. Local ufrag ce7fed60-4157-11e7-9e84-c1b25d1b92456ch8                                                                                                                     i1bh00mmgn
14:38:24,799 INFO  stCandidateHarvester - WSS-pool-9-thread-2 Check iname eth0
14:38:24,799 INFO  stCandidateHarvester - WSS-pool-9-thread-2 Adding srflx candi                                                                                                                     date
14:38:24,803 INFO       AudioSdpFactory - WSS-pool-9-thread-2 proxySession: null
14:38:24,808 INFO                 Agent - WSS-pool-9-thread-2 Start ICE connecti                                                                                                                     vity establishment. Local ufrag ce7fed60-4157-11e7-9e84-c1b25d1b92456ch8i1bh00mm                                                                                                                     gn
14:38:24,808 INFO                 Agent - WSS-pool-9-thread-2 Init checklist for                                                                                                                      stream audio
14:38:24,808 INFO                 Agent - WSS-pool-9-thread-2 Init checklist for                                                                                                                      stream video
14:38:24,808 INFO                 Agent - WSS-pool-9-thread-2 ICE state changed                                                                                                                      from Waiting to Running. Local ufrag ce7fed60-4157-11e7-9e84-c1b25d1b92456ch8i1b                                                                                                                     h00mmgn
14:38:24,809 INFO  nectivityCheckClient - WSS-pool-9-thread-2 Start connectivity                                                                                                                      checks. Local ufrag ce7fed60-4157-11e7-9e84-c1b25d1b92456ch8i1bh00mmgn
^C
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/server_logs/flashphoner.log
14:42:57,662 INFO        MediaProcessor - WSS-pool-9-thread-2 Add extmap, 6 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
14:42:57,663 INFO                 Agent - WSS-pool-9-thread-2 Gathering candidates for component video.RTP. Local ufrag 711f8cb0-4158-11e7-bd4e-b1d73b563dd59ssl1bh00v0vf
14:42:57,663 INFO  stCandidateHarvester - WSS-pool-9-thread-2 Check iname eth0
14:42:57,663 INFO  stCandidateHarvester - WSS-pool-9-thread-2 Adding srflx candidate
14:42:57,671 INFO       AudioSdpFactory - WSS-pool-9-thread-2 proxySession: null
14:42:57,673 INFO                 Agent - WSS-pool-9-thread-2 Start ICE connectivity establishment. Local ufrag 711f8cb0-4158-11e7-bd4e-b1d73b563dd59ssl1bh00v0vf
14:42:57,673 INFO                 Agent - WSS-pool-9-thread-2 Init checklist for stream audio
14:42:57,673 INFO                 Agent - WSS-pool-9-thread-2 Init checklist for stream video
14:42:57,673 INFO                 Agent - WSS-pool-9-thread-2 ICE state changed from Waiting to Running. Local ufrag 711f8cb0-4158-11e7-bd4e-b1d73b563dd59ssl1bh00v0vf
14:42:57,673 INFO  nectivityCheckClient - WSS-pool-9-thread-2 Start connectivity checks. Local ufrag 711f8cb0-4158-11e7-bd4e-b1d73b563dd59ssl1bh00v0vf
Code:
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/flashphoner_manager.log
  "hasAudio" : true,
  "status" : "PENDING",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
 

Max

Administrator
Staff member
SSH access means Amazon private key to connect using SSH port 22 by default.
We have received access to WCS dashboard, but no SSH.
 

Max

Administrator
Staff member
We have checked your server.
UDP ports [31000-32000] must be open. It is closed now.
How we check
On your server we are listening port 31200:
Code:
tcpdump udp port 31200
From one of our servers we send an UDP packet to port 31200
Code:
echo -n "hello" | nc -4u -w1 yourhost 31200
No packets received.
Please open UDP ports [31000-32000] and try again.
 
Hello @Max thanks for you help its working now.
But the issue is very low quality.
Please see me video recording in the below link.
https://www.screencast.com/t/cTMPSSbpS
You can see its very bad quality and you can see the errors of very low frame rate which ranges in 10 to 12 while i have set it to 30 in the code.
I have also set other constraints in the code but i think that are not set up.
Can you please help me how we can improve the quality of our live streaming.
I am attaching requirements of Facebook below.
https://www.screencast.com/t/sgEOOI9G
Also these demos are only working in Google Chrome not working in Firefox or IE or other browser while you mentioned in our site its working for

Please find the below logs

Code:
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/flas                                                                                                                     hphoner_manager.log
  "hasAudio" : true,
  "status" : "PUBLISHING",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 1638400,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
Code:
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/serv
tail: cannot open â/usr/local/FlashphonerWebCallServer/logs/servâ for reading: No such file or directory
tail: no files remaining
[root@ip-172-31-30-160 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/server_logs/flashphoner.log
13:32:33,471 INFO           WCS4Handler - WSS-pool-9-thread-2 Report client-u3ap5q929uhb71fsnh6ru35gbh-2017.05.26.13.32.33-1495805553471.report is submitted
13:32:33,471 INFO        RtcMediaClient - WSS-pool-9-thread-2 Stop media session cd65b9d0-4212-11e7-832b-3d9fc486f6e4
13:32:33,479 INFO                 Agent - StunKeepAliveThread StunKeepAliveThread ends.
13:32:33,479 INFO  ergingDatagramSocket - WSS-pool-9-thread-2 Closing.
13:32:33,480 INFO  ergingDatagramSocket - MergingDatagramSocket reader thread for: /172.31.30.160:31058 -> null Failed to receive: java.net.SocketException: Socket closed
13:32:33,480 INFO  ergingDatagramSocket - WSS-pool-9-thread-2 Closing.
13:32:33,481 INFO  ergingDatagramSocket - MergingDatagramSocket reader thread for: /172.31.30.160:31060 -> null Failed to receive: java.net.SocketException: Socket closed
13:32:33,481 INFO  ManagerApiConnection - WSS-pool-9-thread-2 Config for method ConnectionStatusEvent not found, using defaults
13:32:34,542 INFO              WSClient - WSClientsKeepaliveThread-53 Close connection for channel [id: 0x2e227923, /27.255.28.50:61408 :> /172.31.30.160:8443] with status code: 1000
13:32:34,542 INFO           WCS4Handler - WSClientsKeepaliveThread-53 Disconnect client: null
Thanks,
Faraz
 

Max

Administrator
Staff member
Please share your chrome://webrtc-internals graphs for publishing stream.
These graphs contain bitrate, framerate and other metrics.
bitrate-webrtc.jpg

Please also share your
Code:
cat /proc/cpuinfo
 
Top