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.
KMS 6.1.1, one2many javascript. Audio quality drop soon after stream started . #17
I haved used one2many project and modified it to use audio only .
After the streaming is started , audio quality seems to drop significantly, but the stream has good banwidth.
I tested the audio using a Fast Track Pro external sound card with a media player. I can quarantee that the sound the audio card gives is perfect quality.
I also did a test by connecting the smartphone into line in soundcard jack and play music .
I also did a test by using virtual sound card (VBCABLE driver) and played songs from media player such as Winamp.
On all, i noticed same behaviour.
Steps to reproduce and result:
Audio stream at first has very good quality, after 4-5 seconds the quallity sudden drops.But the bandwith remains unchanged .
My internet wired connection is 100Mbps in upload and download so i am not considering connection issues.
Here are some configurations i'm using that might help in giving a solution :
Here is the output of 'kurento-media-server -v':
Version: 6.2.0
Found modules:
Module: 'core' version '6.2.0'
Module: 'elements' version '6.2.0'
Module: 'filters' version '6.2.0'
I did the tests on the source with my changes and the original source and i have same behaviour.
Quality still drops after first seconds .I can't really understand why this happens .
Here are the picture for presenter (first) and viewer.
I have checked the one2many demo in Chrome on Windows 7 (only one available for me right now) and everything seem to work fine. I have several questions:
Have you checked the demo using the microphone of the computer?
Could you check using audio and video (both from webcam) and check the behaviour.
Could you record the audio and attach it. It will be useful to check the audio quality that you receives and what means drops. Remember that the presenter browser encode the audio and the viewer browser descompress the audio, and it is possible that there are a quality loss.
Have you tested your use case using a simple webrtc p2p application?
with microphone (my voice ), you cannot notice the quality drop . Only when playing songs from external sources the quality of the songs i receive as viewer is terrible . Good in first 3-5 seconds , then quality of the sound heard is reduced .
(or internal if using virtual sound card which basically takes the output of application (winamp) and redirects it to a virtual input .If on windows i set "listen" on presenter computer that virtual device quality is perfect . So i know that the virtual sound card does its job good .)
I havent tested with any other webrtc applications because kurento uses opus ; and i knew this encoding is the best available . I will try to use other examples from Internet .
It's a good idea test with a peer2peer aplicattion, because it seems like a problem between your virtual sound card and chrome. If other application works fine we can check our opus encoder/decoder.
Hello,
I have tried with other peer2peer appications (jitsi, easyRTC) and the overall quality is the same . Really bad in streaming music with webrtc . Also i tested on Firefox, no improvement.
I have also used Icecast2 server with SAMbroadcast client for comparison and quality is perfect but Icecast is not real-time (there is huge delay ~7s between live feed and viewer feed ).
I must ask . Is it really no solution to tweak the quality from Kurento ?
Im sharing this piece of code which is my modification of the SDP ,in order to force bandwidth and opus parameters . Maybe i missed something .
I forced SDP parameters soon after SDP was created and before being added to peerconnection . I thought is enough to modify only in this.generateOffer since presenter and viewer share same code and the offer will be processed and an answer is generated from it .
I must repeat this is kurento-one2many-call project :
//set bandwidth function i used :
function set_bandwidth(sdp) {
sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:510\r\n');
sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:3000\r\n');
I'm afraid this is not an issue with tweaking Kurento, but how your audio source gets treated by the browsers. Kurento can't do much if the audio quality that arrives is bad. You should probably inquire in other forums how can you raise the quality of the audio encoded by the browsers.
Activity
igracia commentedon Dec 4, 2015
I'm adding the webrtc internals captures here
igracia commentedon Dec 4, 2015
@Saradomin Could you update you KMS to check with the latest version? 'Cos that's the first thing we are going to check ;-)
Saradomin commentedon Dec 4, 2015
ok , i will make the update and i will reply with result and new screenshots if problem remains .Thank you
Saradomin commentedon Dec 5, 2015
Hello again ,
Sorry for delay.
I updated the KMS :
Here is the output of 'kurento-media-server -v':
Version: 6.2.0
Found modules:
Module: 'core' version '6.2.0'
Module: 'elements' version '6.2.0'
Module: 'filters' version '6.2.0'
I did the tests on the source with my changes and the original source and i have same behaviour.
Quality still drops after first seconds .I can't really understand why this happens .
Here are the picture for presenter (first) and viewer.
Thank you again for support .
igracia commentedon Dec 7, 2015
Thanks. Let us check some things and we'll try debug this with you.
Could you provide us with your test project?
Saradomin commentedon Dec 7, 2015
yes , i will send it shortly
dfernandezlop commentedon Dec 7, 2015
Hi @Saradomin,
I have checked the one2many demo in Chrome on Windows 7 (only one available for me right now) and everything seem to work fine. I have several questions:
Thanks.
Saradomin commentedon Dec 7, 2015
with microphone (my voice ), you cannot notice the quality drop . Only when playing songs from external sources the quality of the songs i receive as viewer is terrible . Good in first 3-5 seconds , then quality of the sound heard is reduced .
(or internal if using virtual sound card which basically takes the output of application (winamp) and redirects it to a virtual input .If on windows i set "listen" on presenter computer that virtual device quality is perfect . So i know that the virtual sound card does its job good .)
I havent tested with any other webrtc applications because kurento uses opus ; and i knew this encoding is the best available . I will try to use other examples from Internet .
dfernandezlop commentedon Dec 7, 2015
It's a good idea test with a peer2peer aplicattion, because it seems like a problem between your virtual sound card and chrome. If other application works fine we can check our opus encoder/decoder.
In the other hand, could you test with Firefox?
Saradomin commentedon Dec 8, 2015
Hello,
I have tried with other peer2peer appications (jitsi, easyRTC) and the overall quality is the same . Really bad in streaming music with webrtc . Also i tested on Firefox, no improvement.
I have also used Icecast2 server with SAMbroadcast client for comparison and quality is perfect but Icecast is not real-time (there is huge delay ~7s between live feed and viewer feed ).
I must ask . Is it really no solution to tweak the quality from Kurento ?
Saradomin commentedon Dec 8, 2015
Im sharing this piece of code which is my modification of the SDP ,in order to force bandwidth and opus parameters . Maybe i missed something .
I forced SDP parameters soon after SDP was created and before being added to peerconnection . I thought is enough to modify only in this.generateOffer since presenter and viewer share same code and the offer will be processed and an answer is generated from it .
I must repeat this is kurento-one2many-call project :
//set bandwidth function i used :
function set_bandwidth(sdp) {
sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:510\r\n');
sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:3000\r\n');
}
//this.generateOffer function snippet :
pc.createOffer(function (offer) {
console.log('Created SDP offer');
if (simulcast) {
if (browser.name === 'Chrome' || browser.name === 'Chromium') {
console.log('Adding multicast info');
offer = new RTCSessionDescription({
'type': offer.type,
'sdp': set_bandwidth(removeFIDFromOffer(offer.sdp)) + getSimulcastInfo(videoStream)
});
} else {
console.warn('Simulcast is only available in Chrome browser.');
}
}
offer.sdp= set_bandwidth(offer.sdp);
pc.setLocalDescription(offer, function () {
console.log('Local description set', /set_bandwidth(/offer.sdp/)/);
callback(null, offer.sdp, self.processAnswer.bind(self));
}, callback);
}, callback, constraints);
igracia commentedon Dec 18, 2015
I'm afraid this is not an issue with tweaking Kurento, but how your audio source gets treated by the browsers. Kurento can't do much if the audio quality that arrives is bad. You should probably inquire in other forums how can you raise the quality of the audio encoded by the browsers.
Closing this issue.