I have created a library for simplifing the use of kurento-client
I recommend you to take a look here
This is a Node.js
example which creates a RtpEndpoint to WebRtcEndpoint pipeline in Kurento media server.
In this example we used Haivision Makito to capture a monitor and stream to a simple web page.
We successfuly connected Kurento to Maktio using Direct RTP
and QuickTime
protocols which are essentially RTP
protocols.
Kurento is deployed on Ubuntu 14.04 virtual machine
-
/Client - Simple web client application:
- client.js - uses RTCPeerConnection and WebSocket APIs in order to create a
WebRTC
stream with Kurento.
- client.js - uses RTCPeerConnection and WebSocket APIs in order to create a
-
/Kurento - Everything that is related to Kurento):
- KurentoClient - handles pipeline creation. (OOP improvements are issued)
-
server.js - server's entry point, handles signaling and session with clients using
websocket
andexpress
.
-
Most use cases for using a
RtpEndpoint
's are for connecting to ah.264
streams, therefore it's recommended to preventVP8
transcoding when sinking to WebRtc. -
If your rtp device doesn't support sdp negogiation, you need to manually configure the stream to use the udp port described in the returned sdp answer ( returned in rtpEndpoint.processOffer( (sdpAnswer) => { ... } ) ).
-
Learn SDP! (or at least learn the basics)
By default Kurento uses VP8
codec, that's why Kurento will transcode any h.264
stream before sinking to a WebRtcEndpoint. By preventing transcoding you will improve quality and performance. Here's are the steps to prevent transcoding:
-
Install openh264 from Cisco to your
Ubuntu
machine which runs Kurento. -
Request a
h.264
rtp profile in client side by editing the sdp offer: (generate by calling RtcPeerConnection.createOffer)- Remove all
rtpmap
lines which are different then96
and leave onlya=rtpmap:96 H264/90000
line.
- Remove all
- Download
openh264-gst-plugins-bad-1.5
using:
sudo apt-get install openh264-gst-plugins-bad-1.5