WebRTC as RTMP re-publishing demo is working

Max

Administrator
Staff member
Try another cam and check if you can get better FPS with another cam in Chrome.
As you can see I'm able to get stable 30 FPS capturing on my web cam:
googFrameRateInput
fps-webrtc-cam-30-fps.jpg
 

Max

Administrator
Staff member
Try to set
Code:
webrtc_cc_min_bitrate=1000000
And do wcs restart
Code:
service webcallserver restart
Please attach your webrtc-internals graphs after this test.
You can also test VP8, it has better bitarte
Code:
codecs=opus,alaw,ulaw,g729,speex16,g722,mpeg4-generic,telephone-event,vp8,h264,flv,mpv
 
Hi @Max
I have made changes which you requested but after that streaming not published its failed.
Please see logs below.
Code:
[root@ip-172-31-46-139 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/serv                                                                                                                     er_logs/flashphoner.log
        at org.jboss.netty.channel.Channels.fireMessageReceived(Unknown Source)
        at org.jboss.netty.channel.socket.nio.NioWorker.read(Unknown Source)
        at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedK                                                                                                                     eys(Unknown Source)
        at org.jboss.netty.channel.socket.nio.DeadlockAwareNioWorker.run(Unknown                                                                                                                      Source)
        at org.jboss.netty.util.ThreadRenamingRunnable.run(Unknown Source)
        at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(Unknown Sourc                                                                                                                     e)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.                                                                                                                     java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor                                                                                                                     .java:617)
        at java.lang.Thread.run(Thread.java:745)
09:01:36,589 INFO  ManagerApiConnection - WSS-pool-9-thread-5 Config for method                                                                                                                      StreamStatusEvent not found, using defaults
^C
[root@ip-172-31-46-139 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/flashphoner_manager.log
  "status" : "FAILED",
  "info" : "License period is expired Mon Jun 12 09:01:36 UTC 2017 Thu Jun 22 00:00:00 UTC 2017 Wed Jan 01 00:00:00 UTC 3000",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 0,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
^C
[root@ip-172-31-46-139 ~]#
After that i have again changed the webrtc_cc_min_bitrate to its previous value which was 30000 then its worked but in chrome bit rate is too low.
Please help me.
 

Max

Administrator
Staff member
License period is expired Mon Jun 12 09:01:36 UTC 2017 Thu Jun 22 00:00:00 UTC 2017 Wed Jan 01 00:00:00 UTC 3000
You have a licensing issue.
If the license is realy not expired please try to restart wcs server and try to set min bitarte as 1000000 again.
So please try again with 1000000. Just restart wcs server.

Regarding license. It does external checks for Trial license. And sometime the check may be failed. In such case you can see such licensing issue, as now.
 
You can see it will expire on 22 June 2017
I have set it to 1000000 but still the same.

upload_2017-6-12_16-18-54.png


Code:
[root@ip-172-31-46-139 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/flashphoner_manager.log
  "hasAudio" : true,
  "status" : "PUBLISHING",
  "record" : false,
  "width" : 0,
  "height" : 0,
  "bitrate" : 4000,
  "quality" : 0,
  "rtmpUrl" : "rtmp://rtmp-api.facebook.com:80/rtmp/",
  "mediaProvider" : "WebRTC"
}
^C
[root@ip-172-31-46-139 ~]# tail -f /usr/local/FlashphonerWebCallServer/logs/server_logs/flashphoner.log
11:11:36,655 INFO  TMP-KeepAliveManager - RTMP-Publisher-KeepAliveManager Start                                                                                                                      rtmp publisher keepAlive thread RTMP-Publisher-KeepAliveManager
11:11:36,780 INFO                 Agent - Stun4J Message Processor Harvester use                                                                                                                     d for selected pair for audio.RTP (local ufrag e58a6830-4f5f-11e7-b33d-83051b298                                                                                                                     d6a90dlp1bie00sbs): host
11:11:36,780 INFO                 Agent - Stun4J Message Processor Harvester use                                                                                                                     d for selected pair for video.RTP (local ufrag e58a6830-4f5f-11e7-b33d-83051b298                                                                                                                     d6a90dlp1bie00sbs): host
11:11:36,833 INFO                     B - Thread-42 Rtmp client connected to rtm                                                                                                                     p-api.facebook.com/31.13.77.23:80
11:11:36,835 INFO                     J - pool-28-thread-2 using client version                                                                                                                      4CDBBD00
11:11:39,781 INFO                 Agent - TerminationThread ICE state changed fr                                                                                                                     om Completed to Terminated. Local ufrag e58a6830-4f5f-11e7-b33d-83051b298d6a90dl                                                                                                                     p1bie00sbs
11:12:36,632 WARN  RtpActivityTimerTask - Flashphoner-RtpActivityTimer-31006 RTP                                                                                                                      ACTIVITY EVENT DETECTED!
11:13:36,632 WARN  RtpActivityTimerTask - Flashphoner-RtpActivityTimer-31006 RTP                                                                                                                      ACTIVITY EVENT DETECTED!
11:14:36,632 WARN  RtpActivityTimerTask - Flashphoner-RtpActivityTimer-31006 RTP                                                                                                                      ACTIVITY EVENT DETECTED!
11:15:36,632 WARN  RtpActivityTimerTask - Flashphoner-RtpActivityTimer-31006 RTP                                                                                                                      ACTIVITY EVENT DETECTED!
^C
[root@ip-172-31-46-139 ~]#
upload_2017-6-12_16-18-37.png
 

Attachments

Max

Administrator
Staff member
Try to install a local WCS server in your office LAN.
You need Linux x86_64 server, at least 1 Gb RAM, 1 core CPU.
https://flashphoner.com/download

When we test the same servers 1) Your EC2 server 2) Our wcs5-eu server, it works good for us.
So the problem is in your PC / chrome or in your network.
Therefore you can try
1) From another PC.
2) From another network.
3) Launch WCS server in your LAN to avoid any network issues.
 
we have tried on the Mozilla firefox but it works fine. but in chrome its blur. can u give me settings according to the chrome broswer ?
 

Max

Administrator
Staff member
Try to re-install Chrome or test from another machine.
Maybe you have some Chrome extensions or antivirus which affect WebRTC streaming from Chrome.
 

Max

Administrator
Staff member
Well, please install a standalone fresh PC with Windows in your network.
We will connect from TeamViewer and check.
  • It should be reachable via TeamViewer tomorrow 8:00 - 18:00 GMT+3, June 16.
  • It should be a fresh OS with Chrome and FF installed.
  • It should not be used by other people, at least while we are testing this.
Please sends TeamViewer credentials to logs@flashphoner.com
 
Hi @Max,

We have set up WCS on our LAN and its working fine on chrome.
One issue exists there is big delay of live stream its about 1 minute or more.
Can you please let us know how we can reduce this delay in live streaming.

Thanks,
Faraz
 

Max

Administrator
Staff member
Hello
You have the big delay because connection speed between your LAN server and remote facebook server is low speed.
1. Check your bitrate towards LAN WCS server using
chrome://webrtc-internals
Assume, you have 2 Mbps
2. Check your bitrate between WCS server and Facebook RTMP server.
It should be at least 2 Mbps.
If you have a good bandwidth, you should not have the huge delay.
But if LAN bitrate is 2 Mbps and remote bandwidth is 1 Mbps you will have the huge latency.
In such case try to decrease resolution to 320x240 or set webrtc_cc_max_bitarte=100000 on server to decrease bitrate and improve latency.
 
Hi @Max,

When i have test it in IE there is black empty area on side of video and video is not fully covered in div, and also on facebook live it shows that black empty area.
i have set the dimension of div and video element to 640 X 480 in other browsers its fine but in IE its shows as below.
Please let me know how we can fix it also in IE picture is stretched.

upload_2017-6-22_14-7-59.png


upload_2017-6-22_14-10-24.png


Thanks,
Faraz
 
OK @Max what about black side bars
You can see in Facebook live screen shoot how we can remove it.
I have checked your example in IE these black side bars are showing in Facebook live when i test it in IE
upload_2017-6-22_15-1-33.png


Thanks,
Faraz
 

Max

Administrator
Staff member
Ok, we will check this on our end.
I will inform you once we have any results.
 

Max

Administrator
Staff member
Hello
This is report from our QA engineer
----------------
Checked republishing as RTMP to Facebook with build 2287, WebRTC as RTMP demo in Chrome 59 or IE 11 (using notebook built-in 720p camera)
If publish from Chrome
- 640x480: there’re narrow black side bars if play the video using its permanent link on Facebook, but no side bars when displayed on the Facebook feed page
- 640x360: video is displayed without side bars (on the feed page and when opened by link)

If publish from IE
- 640x480: local video on WebRTC as RTMP demo page is not stretched and doesn’t have side bars; and video on Facebook feed page is displayed without side bars (but there’re narrow side bars if open by link)
- 640x360: local video on WebRTC as RTMP demo page is stretched and has side bars; video on Facebook does have side bars but is not stretched
In all the cases, video on Facebook looks the same, whether it is opened in IE or Chrome.

So, whether or not video will be displayed with side bars would depend on the resolution and camera being used.

Aspect ratio recommended for Facebook is 16:9.
----------------

Therefore you can detect IE browser and set resolution 640x480 (4:3) for IE to prevent video deformation.
Example
Code:
//if IE
session.createStream({name:'stream1',constraints:{audio:true,video:{width:640,height:480}}});
We will also check if we can suppress the black side bars completely.
It looks like underling flash app issue.
 
Last edited:
Top