versatica / mediasoup Goto Github PK
View Code? Open in Web Editor NEWCutting Edge WebRTC Video Conferencing
Home Page: https://mediasoup.org
License: ISC License
Cutting Edge WebRTC Video Conferencing
Home Page: https://mediasoup.org
License: ISC License
mediasoup will not relay RTCP packets but consume and generate them. This is, mediasoup will act as a media endpoint by negotiating and managing RTCP with each client.
The lib: https://github.com/sctplab/usrsctp
Hey,
This looks like an awesome module. I'm about to dig in deep, but before I do, just want to make sure it can do what I'm hoping:
I'd like my Node server to act as a WebRTC peer and allow me to process decoded video frames in real time on the server.
Is it doable? Any pointers in the right direction? I've started reading through the code in mediasoup/test, but am still not quite sure where I might be able to get access to the video stream.
Thanks!
@saghul should this configure.py
require python2?:
https://github.com/ibc/mediasoup/blob/master/worker/scripts/configure.py#L1
Identifiers for WebRTC's Statistics API
Being these two elements the ones with most important for now:
Since mediaosup provides a Node ES6 API, so esdoc seems a beautiful solution for auto-generated doc.
mediasoup must be ready to accept simulcast from clients and choose the appropriate simulcast profile to forward to other participants based on their network bandwidth or other parameters (such as selection via API).
RtpStreamSend
health to dynamically select a lower simulcast profile (do probation).PictureId
and TTL0IDX
.PictureId
:
In AWS or Google Cloud, the host has private IP. However we need to announce a public IP address in the ICE candidates generated by mediasoup.
Add a setter into the RtpReceiver
class than activates RTP reception via JS. This would allow:
Initial proposal:
let rtpReceiver = peer.RtpReceiver(...);
rtpReceiver.listenForRtp = true;
rtpReceiver.on('rtp', (packet) =>
{
// packet is a Node Buffer instance
console.log('RTP packet received');
});
Something in the sender side equivalent to the on packet event in the receiver side:
Maybe soemthing like:
RtpSender.send(packet: Buffer|RtpObject)
I need browser client A push mediastream to mediasoup ,then mediasoup send the mediasteam to browser client B,but I can't connect mediasoup with browser. Broswer use ice-full ,but mediasoup use ice-lite,so,I don't know how to use ice-lite in brower.
I don't want that MediaSoup depends on 3rd libraries globally installed (openssl, libsrtp, etc). Let's imitate the Node way (all the dependencies included in the source tree). And then use gyp or ninja or lalala.
/cc @saghul
Hi, trying to compile mediasoup on the windows machine and wondering, what for needing two the same files in different directories. One is https://github.com/ibc/mediasoup/blob/master/worker/src/Channel/UnixStreamSocket.cpp
And one is https://github.com/ibc/mediasoup/blob/master/worker/src/handles/UnixStreamSocket.cpp
Now unresolved symbols I have about unixstreamsocket::Close(void)
In 85e698b I've added transport.dtlsRemoteCert
which (once DTLS is connected) provides the peer's certificate in PEM format.
Example:
transport.on('dtlsstatechange', (dtlsState) =>
{
if (dtlsState === 'connected')
console.warn('remote certificate:\n%s', transport.dtlsRemoteCert);
});
This prints:
remote certificate:
-----BEGIN CERTIFICATE-----
MIIBmTCCAQKgAwIBAgIEAitymDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZX
ZWJSVEMwHhcNMTYwNTEwMTkyMTI4WhcNMTYwNjA5MTkyMTI4WjARMQ8wDQYDVQQD
DAZXZWJSVEMwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANPh1C7jFo3lnWJh
flnueuC1HeSrurt3JHXxK7sYBB1+RNoeCBBPCSHwS51U253SRcCuChupCuZl4E4/
pUz0yzanR0HYQzFrL06KfLSwYoAf40LKKAfjNxSCfSgObRF4LAGs42pGa91U+iHt
Ct4jDGUPLVieDzJBXx3Q/DEHSN8rAgMBAAEwDQYJKoZIhvcNAQELBQADgYEAavSb
CHV+3+l0s+HbVw79bVYPjSBTUAdziaV48QBkxwoNjXmkGlmg59pfhCYytFYWmEHI
5UHX9u2Z5H2UWJ7gTw+Z4fHDZV7BOv8U0Zsz791Mm+1gMhzOV+FATpHLJbRl0GF/
NsSQw9h8tjGfsH3cALPYl88yRGy6GeplPLjcL4M=
-----END CERTIFICATE-----
This can be useful for the app to check the certificate and prove some kind of WebRTC identity mechanism and so on.
But... I need a way to create a crypto.Certificate instance in Node given a cert in PEM format, and I don't find how to do that... :(
mediasoup api is designed for ortc, it seems that the signalingServer only need to handle candidates.
webrtc still need to offer/answer sdp info, can you give me an example how to make webrtc and mediasoup work?
Info here: cisco/libsrtp#68 (comment)
I would like to see a performance comparison to other sfu's
I got errors below when running npm install mediasoup --save
6293 error Linux 4.8.6-x86_64-linode78
6294 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mediasoup" "--save"
6295 error node v7.4.0
6296 error npm v4.0.5
6297 error code ELIFECYCLE
6298 error [email protected] postinstall:make Release
6298 error Exit status 2
6299 error Failed at the [email protected] postinstall script 'make Release'.
6299 error Make sure you have the latest version of node.js and npm installed.
6299 error If you do, this is most likely a problem with the mediasoup package,
6299 error not with npm itself.
6299 error Tell the author that this fails on your system:
6299 error make Release
6299 error You can get information on how to open an issue for this project with:
6299 error npm bugs mediasoup
6299 error Or if that isn't available, you can get their info via:
6299 error npm owner ls mediasoup
6299 error There is likely additional logging output above.
Did ice lite implementation has ability that connect with other lite implements?
Or can mediasoup communicate with another one?
People cannot take the risk of looking at your code unless you license it properly.
Available in libsrtp since cisco/libsrtp#66.
Readme needs a usage example for people interested in getting started with the package
Would love to test drive this package but it's lacking clear explanation of how to get started. Would be great if this could be added to the README
or the website.
Note: The api documentation is great but not the best reference for getting started.
5901 verbose stack Error: [email protected] postinstall: make Release
5901 verbose stack Exit status 2
5901 verbose stack at EventEmitter. (/root/node-v7.2.1-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
5901 verbose stack at emitTwo (events.js:106:13)
5901 verbose stack at EventEmitter.emit (events.js:191:7)
5901 verbose stack at ChildProcess. (/root/node-v7.2.1-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:40:14)
5901 verbose stack at emitTwo (events.js:106:13)
5901 verbose stack at ChildProcess.emit (events.js:191:7)
5901 verbose stack at maybeClose (internal/child_process.js:885:16)
5901 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
5902 verbose pkgid [email protected]
In both WebRTC 1.0 and ORTC, RTX "codecs" (RFC 4588) are signaled as common codecs, so we must revert the RTCRtpCodecRtxParameters
entry in RtpCodecParameters
.
According to BUNDLE draft, if the same payload value appears more than twice in m= lines belonging to the same BUNDLE group, then those codecs MUST be the very same.
Not yet completely clear what would happen if the same transport is used to receive the same codec (payload, parameters, etc) from different participants (H264 video from Alice, from Bob, from Carol, etc).
i am looking for several webrtc server lib in my next project.
mediasoup looks awesome.
There are some std::auto_ptr
in RtpSender
, RtpReceiver
, etc. According to http://www.cplusplus.com/reference/memory/auto_ptr/:
Automatic Pointer [deprecated]
Note: This class template is deprecated as of C++11. unique_ptr is a new facility with a similar functionality, but with improved security (no fake copy assignments), added features (deleters) and support for arrays. See unique_ptr for additional information.
hi,
mediasoup is a greate lib, and i can't wait to have a try.
my use case is that at least two publisher and tens of viewer in one room, can mediasoup be used like this?
https://tools.ietf.org/html/rfc6347#section-4.2.2
Solution in OpenSSL:
#define RTPPAYLOADSIZE 1350
// Disable automatic MTU discovery.
SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_QUERY_MTU);
// Set MTU of datagrams so it fits in an UDP packet.
SSL_set_mtu(ssl, RTPPAYLOADSIZE);
// DTLS_set_link_mtu(ssl, MTU); // ¿?¿?¿?
BIO_ctrl(write_bio, BIO_CTRL_DGRAM_SET_MTU, RTPPAYLOADSIZE, NULL);
mediasoup needs to hold a map of payloadType
and codecs+configuration. So I need to know what "codec+configuration" means (note that some codecs have their own configuration parameters...).
Mail sent to AVT WG: https://www.ietf.org/mail-archive/web/avt/current/msg17068.html
i am testing the new webrtc api,
let peerconnection = mediasoup.webrtc(room,'alice',{});
will just stuck there.
There are some API changes to be considered, see https://github.com/cisco/libsrtp/pull/211/files
[18:11:21] worker/out/Debug/mediasoup-worker-test
minimum_header .................................................... PASS
buffer_is_too_small ............................................... PASS
version_is_zero ................................................... PASS
length_is_wrong ................................................... PASS
type_is_unknown ................................................... PASS
parse_sdes_chunk .................................................. PASS
create_sdes_chunk ................................................. PASS
parse_sender_report ............................................... PASS
create_sender_report .............................................. PASS
parse_receiver_report ............................................. PASS
create_receiver_report ............................................ PASS
create_parse_bye .................................................. FAIL ***
parse_rtpfb_nack_item ............................................. PASS
create_rtpfb_nack_item ............................................ PASS
parse_rtpfb_tmmb_item ............................................. PASS
parse_rtpfb_tllei_item ............................................ PASS
parse_rtpfb_ecn_item .............................................. PASS
parse_psfb_sli_item ............................................... PASS
parse_psfb_rpsi_item .............................................. PASS
parse_psfb_fir_item ............................................... PASS
parse_psfb_tst_item ............................................... PASS
parse_psfb_vbcm_item .............................................. PASS
parse_psfb_lei_item ............................................... PASS
parse_psfb_afb .................................................... PASS
----------------------------------------------------------------------------
FAILED TESTS
../test/test-rtcp.cpp(339):
chq_eq_int: 2222 != 2222
../test/test-rtcp.cpp(352):
chq_eq_int: 2222 != 2222
Let's be in sync with ORTC. This issue clarifies lot of stuff.
RTCRtpTransceiver
object.NOTE: This may change, and probably will do. More in comments below.
Currently mediasoup generates Fingerprint values in hexadecimal uppercase:
SHA-1 fingerprint: 11:BB:5F:BE:48:18:5A:6C:87:D2:55:5F:4D:88:3A:DB:25:84:50:6E +0ms
SHA-224 fingerprint: 87:06:5A:7E:9E:92:2A:F2:29:62:66:01:E2:BA:E1:5A:69:D8:DC:A8:F6:5B:8E:42:A3:17:ED:5B +0ms
SHA-256 fingerprint: B0:9E:7C:B9:9C:B8:79:BB:CC:9A:3C:C5:8C:06:73:D2:D8:F0:92:99:7A:D0:BA:3C:1A:09:FF:18:9D:ED:7F:D4 +0ms
SHA-384 fingerprint: E1:47:23:6A:C3:E5:F2:94:1E:E7:30:F2:9B:7E:F7:5C:A4:57:57:33:22:E9:56:02:0B:BB:15:D4:77:1D:A2:A9:2E:E7:DA:49:22:0E:99:65:5E:38:CD:8C:37:96:CC:34 +0ms
SHA-512 fingerprint: 26:14:BD:0E:4B:1B:BD:75:6D:FF:67:70:96:03:44:A3:1A:50:24:07:30:8B:A5:51:08:7A:6D:26:E3:EE:8D:51:11:CF:6E:BC:DC:A4:20:6A:07:BB:C8:4C:87:8C:75:AC:03:5D:67:A2:39:8B:19:91:F0:88:CB:74:AC:DE:E8:FF
However that is just the "SDP" syntax described by RFC 4572. As commented in ORTC there is no real reason for that:
libuv offers (now) public API to check the write/send queue size (in bytes). So:
SetBackPressure(value)
.Write()
or Send()
check if such a value is greater than the handle write/send queue.listener->onBackPressureExceeded(current_value)
.A single header file:
Based on w3c/ortc#317, transport.setRemoteParameters()
must admit a sequence of remote fingerprints and the worker subprocess must attempt to validate all of them until it finds a valid one (and fail if no one is valid).
yep
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.