You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
Not able to get multiple WebRTC streams from different Kurento Media Servers to a single Browser #3
I'm having a very odd issue trying to get a single Browser (
latest Chrome and latest Firefox)
to receive WebRTC video from multiple Kurento Media Servers
(observed both in 6.1.1 and 6.0.1 as I have skipped 6.1.0).
It appears for a given browser page, I can only get media displayed
for the first Kurento Media Server that goes toward it.
For example, if I had:
KMS1 with WebRTC stream A and WebRTC stream B
and
KMS2 with stream X
If my browser page views A first, then it can also view B
when I add B.
However, it won't be able to see stream X when I try to add X.
THen if I remove the disconnect from the streams A and B,
then try to connect to X, then I would be able to see X.
But then trying to connect back to A and B, I don't see media
for those. In this example, I have a 2 vs. 1, but it appears any number for those
two are applicable.
Now, the really interesting part is that this behavior is true for both
Kurento H.264 on Ubuntu and Mac OS (Firefox or Chrome) .
However, if I use VP8 (Chrome) on Kurento, I see that this issue doesn't
exist for Mac OS client (but does exist for latest Ubuntu client).
Is there any explanation you can think of for this behavior?
Analyzing the working SDP vs. non-working SDP (remote and local),
I don't see any big difference. And the byte counts show 0
from about:webrtc for the test webcams that generate the data.
This is mainly a copy and paste from my post in kurento groups. Sorry I didn't have time to embeillish it but over time I may come back if I find more time to gather more info. Thanks.
I saw a strange behavior like this when connecting ice servers with multiple streams. It was some kind of network limitations to ice servers, the connection just hung out, even ssh connection for the same server hung out.
Are you sure that three streams from the same source is working?
In my setups, I didn't use any turn servers/ice servers, just stun servers. What I do notice when running "nload" to see the traffic outgoing from the latter Kurento server stream is that there appears to be a brief burst of network outgoing before it settles back to previous level. But still I don't see a single frame displayed. Now, when I perform the same action with the order of the two Kurento servers swapped, it's still always the latter Kurento server that I'm not able to view the data from. So, I don't think the issue is particular to a specific box.
I think knowing the answer to this may help quicker: Have you guys ever succeeded in having a single browser tab have two video screens open where Video Screen#1 is streaming from KurentoServer A, and Video Screen#2 is streaming from Kurento Server B? If you have succeeded or not, then I think that would be a big hint if it's my configuration.
And yes, I'm able to successfully from a single Kurento server see multiple streams. For example, I'll just hook up 3 cameras all feed Kurento Server A, and I'm able to see all 3 cameras video screens fine from Kurento Server A on a single browser tab.
I have tested two videos in the same browser tab (Chrome 46.0.2490.80 (64-bit)) and everything works fine. I'm using VP8. My configurations are:
KMS A in host machine (Ubuntu 14.04).
Version: 6.1.21.g18ab837
Found modules:
Module: 'core' version '6.1.332.g30d3f45'
Module: 'elements' version '6.1.222.g5c261e9'
Module: 'filters' version '6.1.22.gafec4f4'
KMS B in virtual machine (Ubuntu 14.04).
Found modules:
Module: 'core' version '6.1.326.g4dee71d'
Module: 'elements' version '6.1.221.g21f6b13'
Module: 'filters' version '6.1.2~2.gafec4f4'
My test uses java client but I'm not able to reproduce your error. Can you see any error in the browser console or the media server logs?
Anyway, for your tests, Chrome doesn't support H264 in webrtc. That test can be done only in Firefox.
HI David, thanks for that. I don't get any noticeable error message.
When you do your test, is your testing client a Mac OS ?
I noticed that if I had the combo of Mac OS client + VP8 + Chrome, then I
didn't see the issue.
But if I had Ubuntu client + VP8 + Chrome, then I did see the issue.
Henry
On Thu, Nov 5, 2015 at 11:50 PM, David Fernández López < [email protected]> wrote:
Hi,
I have tested two videos in the same browser tab (Chrome 46.0.2490.80
(64-bit)) and everything works fine. I'm using VP8. My configurations are:
KMS A in host machine (Ubuntu 14.04).
Version: 6.1.21.g18ab837
Found modules:
Module: 'core' version '6.1.332.g30d3f45'
Module: 'elements' version '6.1.222.g5c261e9'
Module: 'filters' version '6.1.22.gafec4f4'
KMS B in virtual machine (Ubuntu 14.04).
Found modules:
Module: 'core' version '6.1.326.g4dee71d'
Module: 'elements' version '6.1.221.g21f6b13'
Module: 'filters' version '6.1.2~2.gafec4f4'
My test uses java client but I'm not able to reproduce your error. Can you
see any error in the browser console or the media server logs?
Anyway, for your tests, Chrome doesn't support H264 in webrtc. That test
can be done only in Firefox.
Regards.
David.
—
Reply to this email directly or view it on GitHub #3 (comment).
We do everything against time in search of a complete life.
I think maybe my Chrome versions may have been slightly different at that time. I would need to reverify.
But if you don't mind, since your setup is already there and ready,
is it possible you can do me a favor and force H.264 on your Ubuntu client and use Firefox and see if you can get the issue? Mainly, because my own use case is H.264 + Firefox as opposed to VP8
Hi David, many thx for that. Because I'd like to deploy a service using multiple kurentos with Firefox as the client, do you know what the realistic chance of this possibly getting solved or what timeframe is realistic? Henry
Hello, my scenario is different, but with a similar behavior.
I have:
clientA --> Kurento1 <-- clientB -->Kurento2
so clientA communicates with clientB trough Kurento1. For some reasons (PlumberEndpoint I miss you so much !!), clientB needs to record his stream on Kurento2, so it needs to be connected to two different Kurento servers
Well:
if clientB starts recording to Kurento2 AFTER the connection to Kurento1, the resulting file is empty, no network traffic and so no stream;
if clientB starts recording to Kurento2 BEFORE the connection to Kurento1, the stream to Kurento1 doesn't start;
if clientB uses only one Kurento (1 or 2 is the same) for both streaming to clientA and recording, all seems to work fine.
About Kurento:
Os: Ubuntu 14.04.3
Version: 6.1.1
Found modules:
Module: 'core' version '6.1.2'
Module: 'elements' version '6.1.1'
Module: 'filters' version '6.1.1'
@mishamistral Before going any further, could you please check with the latest development versions? There are some known incompatibilities between KMS and Chrome 46, that are fixed in kms-core 6.1.3
Sorry for the delay, we have a lot of work now. I have been able to get the error with your demo. It seems the same case reported at the beginning of the thread.
This problem is caused because Firefox doesn't support use different pem certificates in the same tab.
The solution would be configure the same pem in both KMS but right now this feature is not supported.
Thx, can this be on the kurento roadmap for solving? Basically, we will
have situations where it will be hard to make sure all the source video
(which can be allocated globally for a single user) can reach the same user
through the same kurento server. We have some global customers who can
have subgroups located globally. And therefore scaling has become a
nightmare when having to deal with this.
Thx.
On Feb 15, 2016 11:44 PM, "David Fernández López" [email protected]
wrote:
Sorry for the delay, we have a lot of work now. I have been able to get
the error with your demo. It seems the same case reported at the beginning
of the thread.
This problem is caused because Firefox doesn't support use different pem
certificates in the same tab.
The solution would be configure the same pem in both KMS but right now
this feature is not supported.
Sorry for the troubles.
David.
—
Reply to this email directly or view it on GitHub #3 (comment).
Ok, and if you can give us a pointer, would you say we are on the right track
if we modified the gst-plugins-bad library by making the PEM string the same
across all kurento media servers?
For example, if we made the gst_dtls_certificate_set_property()
return the same result that is mentioned in this file:
Not really, I'd use the "pem" property available in the element.
It's not a good idea to modify the default behavior of a library that works just to fit your needs because you will find problems later, in this case security problems.
We've been able to replicate this issue too. And we have been able to replicate this using the AWS elasticRTC Kurento product that is in beta. If you have a load balanced array of KMS servers with multiple streams sending from different servers, FF will only render the first stream. However, this load balanced architecture works fine in Chrome.
Wow, after trying the pemcertificate feature in 6.4.1, looks like this issue is solved! If that was the intention of that feature, well, Kurento team, you have made my day! Thank you!
tsonghong I see you are able to successfully from a single Kurento server see multiple streams.
I am having problems trying to get 3 seperate video streams on the same page.
I wonder if you could share the main code to do this? Thanks.
i have a problem with kurento server the issue is
Hello, my scenario is different, but with a similar behavior.
I have:
clientA --> Kurento1 <-- clientB -->Kurento2
so clientA communicates with clientB trough Kurento1. For some reasons (PlumberEndpoint I miss you so much !!), clientB needs to record his stream on Kurento2, so it needs to be connected to two different Kurento servers
Well:
if clientB starts recording to Kurento2 AFTER the connection to Kurento1, the resulting file is empty, no network traffic and so no stream;
if clientB starts recording to Kurento2 BEFORE the connection to Kurento1, the stream to Kurento1 doesn't start;
if clientB uses only one Kurento (1 or 2 is the same) for both streaming to clientA and recording, all seems to work fine.
please need to take 2 kurento application server in 2 containers and 2 media server in 2 containers
Activity
igracia commentedon Oct 14, 2015
Thanks for reporting this. It'll probably take some time for us to get round to this, as it is a corner case. We'll keep this open, and update here.
tgabi333 commentedon Oct 15, 2015
I saw a strange behavior like this when connecting ice servers with multiple streams. It was some kind of network limitations to ice servers, the connection just hung out, even ssh connection for the same server hung out.
Are you sure that three streams from the same source is working?
tsonghong commentedon Oct 15, 2015
In my setups, I didn't use any turn servers/ice servers, just stun servers. What I do notice when running "nload" to see the traffic outgoing from the latter Kurento server stream is that there appears to be a brief burst of network outgoing before it settles back to previous level. But still I don't see a single frame displayed. Now, when I perform the same action with the order of the two Kurento servers swapped, it's still always the latter Kurento server that I'm not able to view the data from. So, I don't think the issue is particular to a specific box.
I think knowing the answer to this may help quicker: Have you guys ever succeeded in having a single browser tab have two video screens open where Video Screen#1 is streaming from KurentoServer A, and Video Screen#2 is streaming from Kurento Server B? If you have succeeded or not, then I think that would be a big hint if it's my configuration.
tsonghong commentedon Oct 15, 2015
And yes, I'm able to successfully from a single Kurento server see multiple streams. For example, I'll just hook up 3 cameras all feed Kurento Server A, and I'm able to see all 3 cameras video screens fine from Kurento Server A on a single browser tab.
dfernandezlop commentedon Nov 5, 2015
Hi,
I have tested two videos in the same browser tab (Chrome 46.0.2490.80 (64-bit)) and everything works fine. I'm using VP8. My configurations are:
Version: 6.1.2
1.g18ab83732.g30d3f45'Found modules:
Module: 'core' version '6.1.3
Module: 'elements' version '6.1.2
22.g5c261e9'2.gafec4f4'Module: 'filters' version '6.1.2
Found modules:
Module: 'core' version '6.1.3
26.g4dee71d'21.g21f6b13'Module: 'elements' version '6.1.2
Module: 'filters' version '6.1.2~2.gafec4f4'
My test uses java client but I'm not able to reproduce your error. Can you see any error in the browser console or the media server logs?
Anyway, for your tests, Chrome doesn't support H264 in webrtc. That test can be done only in Firefox.
Regards.
David.
tsonghong commentedon Nov 5, 2015
HI David, thanks for that. I don't get any noticeable error message.
When you do your test, is your testing client a Mac OS ?
I noticed that if I had the combo of Mac OS client + VP8 + Chrome, then I
didn't see the issue.
But if I had Ubuntu client + VP8 + Chrome, then I did see the issue.
Henry
On Thu, Nov 5, 2015 at 11:50 PM, David Fernández López <
[email protected]> wrote:
We do everything against time in search of a complete life.
dfernandezlop commentedon Nov 6, 2015
Hi Henry,
Client was Chrome 46.0.2490.80 (64-bit) in Ubuntu. Maybe you have different versions of Chrome in MacOs and Ubuntu?
tsonghong commentedon Nov 6, 2015
Hi David,
I think maybe my Chrome versions may have been slightly different at that time. I would need to reverify.
But if you don't mind, since your setup is already there and ready,
is it possible you can do me a favor and force H.264 on your Ubuntu client and use Firefox and see if you can get the issue? Mainly, because my own use case is H.264 + Firefox as opposed to VP8
If you want to follow how exactly I did this:
On both your KMS Ubuntu boxes A and B,
install H.264 using the openh264:
$ sudo apt-get install openh264-gst-plugins-bad-1.5
$ sudo apt-get install gstreamer1.5-plugins
Then remove VP8 from Kurento by
a) commenting out:
a=rtpmap:97 VP8/90000
in this file:
/etc/kurento/sdp_pattern.txt
and
b) commenting out these lines
from this file:
/etc/kurento/modules/kurento/SdpEndpoint.conf.json
Then restart Kurento on both boxes to pick up the change:
sudo service kurento-media-server-6.0 restart
Then generate two H.264 streams - 1 from KMS A and another from KMS B to a Firefox browser.
If you can see both in a single firefox tab, then it has to be my side for sure.
Again, thanks!
Henry
dfernandezlop commentedon Nov 6, 2015
Hi Henry,
I have tested with VP8 in Firefox and it doesn't work. I get errors like this in KMS log:
WARN dtlsconnection gstdtlsconnection.c:721:openssl_poll:GstDtlsConnection@0x7f7f30006520 Unknown SSL error: 6, ret: 0
It seems that Firefox has a weird behaviour with SSL keys, we will try to investigate it.
Thanks for the report.
tsonghong commentedon Nov 16, 2015
Hi David, many thx for that. Because I'd like to deploy a service using multiple kurentos with Firefox as the client, do you know what the realistic chance of this possibly getting solved or what timeframe is realistic? Henry
mishamistral commentedon Nov 16, 2015
Hello, my scenario is different, but with a similar behavior.
I have:
clientA --> Kurento1 <-- clientB -->Kurento2
so clientA communicates with clientB trough Kurento1. For some reasons (PlumberEndpoint I miss you so much !!), clientB needs to record his stream on Kurento2, so it needs to be connected to two different Kurento servers
Well:
if clientB starts recording to Kurento2 AFTER the connection to Kurento1, the resulting file is empty, no network traffic and so no stream;
if clientB starts recording to Kurento2 BEFORE the connection to Kurento1, the stream to Kurento1 doesn't start;
if clientB uses only one Kurento (1 or 2 is the same) for both streaming to clientA and recording, all seems to work fine.
About Kurento:
Os: Ubuntu 14.04.3
Version: 6.1.1
Found modules:
Module: 'core' version '6.1.2'
Module: 'elements' version '6.1.1'
Module: 'filters' version '6.1.1'
I tested on Chrome 46.0.2490.80 and Firefox 42.0 on Windows 7 and Ubuntu Linux 14.04
Thank you
igracia commentedon Nov 16, 2015
@mishamistral Before going any further, could you please check with the latest development versions? There are some known incompatibilities between KMS and Chrome 46, that are fixed in kms-core 6.1.3
15 remaining items
dfernandezlop commentedon Feb 15, 2016
Hi @mishamistral,
Sorry for the delay, we have a lot of work now. I have been able to get the error with your demo. It seems the same case reported at the beginning of the thread.
This problem is caused because Firefox doesn't support use different pem certificates in the same tab.
The solution would be configure the same pem in both KMS but right now this feature is not supported.
Sorry for the troubles.
David.
tsonghong commentedon Feb 16, 2016
Thx, can this be on the kurento roadmap for solving? Basically, we will
have situations where it will be hard to make sure all the source video
(which can be allocated globally for a single user) can reach the same user
through the same kurento server. We have some global customers who can
have subgroups located globally. And therefore scaling has become a
nightmare when having to deal with this.
Thx.
On Feb 15, 2016 11:44 PM, "David Fernández López" [email protected]
wrote:
jcaden commentedon Feb 16, 2016
Sorry, but currently this is something that is not in our short-term roadmap.
tsonghong commentedon Feb 25, 2016
Hi David and Jcaden,
can you elaborate on:
"The solution would be configure the same pem in both KMS but right now this feature is not supported."
Is this something we can do ourselves or requires a code change in Kurento? What file would we need to configure?
Thanks!
Henry
jcaden commentedon Feb 25, 2016
This means that it is not implemented.
Sorry for the trouble.
tsonghong commentedon Feb 26, 2016
Ok, and if you can give us a pointer, would you say we are on the right track
if we modified the gst-plugins-bad library by making the PEM string the same
across all kurento media servers?
For example, if we made the gst_dtls_certificate_set_property()
return the same result that is mentioned in this file:
https://github.com/kittee/gst-plugins-bad/blob/e1dda890a76ccc02f0746c3399a0a25ffb2c6b29/ext/dtls/gstdtlscertificate.c#L61
Is this the right idea?
Thanks.
Henry
jcaden commentedon Feb 26, 2016
Not really, I'd use the "pem" property available in the element.
It's not a good idea to modify the default behavior of a library that works just to fit your needs because you will find problems later, in this case security problems.
mikeg0 commentedon Feb 26, 2016
We've been able to replicate this issue too. And we have been able to replicate this using the AWS elasticRTC Kurento product that is in beta. If you have a load balanced array of KMS servers with multiple streams sending from different servers, FF will only render the first stream. However, this load balanced architecture works fine in Chrome.
tsonghong commentedon Mar 15, 2016
Wow, after trying the pemcertificate feature in 6.4.1, looks like this issue is solved! If that was the intention of that feature, well, Kurento team, you have made my day! Thank you!
dfernandezlop commentedon Mar 15, 2016
It's great to hear that :)
mikeg0 commentedon Mar 18, 2016
I can confirm this fix too. Great work!
Lisitskiy commentedon Nov 7, 2016
@mikeg0, @tsonghong
Hello.
I have a same problem with last dev version. Can you tell me, what pemcertificate feature has sloved it?
Thanks
rayj00 commentedon Jun 9, 2017
tsonghong I see you are able to successfully from a single Kurento server see multiple streams.
I am having problems trying to get 3 seperate video streams on the same page.
I wonder if you could share the main code to do this? Thanks.
chandra967 commentedon Nov 10, 2019
i have a problem with kurento server the issue is
Hello, my scenario is different, but with a similar behavior.
I have:
clientA --> Kurento1 <-- clientB -->Kurento2
so clientA communicates with clientB trough Kurento1. For some reasons (PlumberEndpoint I miss you so much !!), clientB needs to record his stream on Kurento2, so it needs to be connected to two different Kurento servers
Well:
if clientB starts recording to Kurento2 AFTER the connection to Kurento1, the resulting file is empty, no network traffic and so no stream;
if clientB starts recording to Kurento2 BEFORE the connection to Kurento1, the stream to Kurento1 doesn't start;
if clientB uses only one Kurento (1 or 2 is the same) for both streaming to clientA and recording, all seems to work fine.
please need to take 2 kurento application server in 2 containers and 2 media server in 2 containers
About Kurento: