pipeline.create('PlayerEndpoint', {uri: rtsp_uri}, function(error, playerEndpoint) {
if (error) {
return callback(error);
}
playerEndpoint.on('EndOfStream', function() {
console.log('END OF STREAM');
pipeline.release();
});
playerEndpoint.play(function(error){
if(error){
console.log(error);
return;
}
console.log("Playing");
pipeline.create('WebRtcEndpoint', function(error, webRtcEndpoint) {
if (error) {
return callback(error);
}
setTimeout(function(){
while(viewerCandidates.length > 0){
var curCandidate = viewerCandidates.shift();
webRtcEndpoint.addIceCandidate(curCandidate);
console.log('viewer got ICE');
}
}, 2000);
webRtcEndpoint.on('OnIceCandidate', function(event) {
var candidate = kurento.register.complexTypes.IceCandidate(event.candidate);
ws.send(JSON.stringify({
action : 'iceCandidate',
candidate : candidate
}));
});
webRtcEndpoint.processOffer(sdpOffer, function(error, sdpAnswer) {
if (error) {
return callback(error);
}
playerEndpoint.connect(webRtcEndpoint, function(error) {
if (error) {
return callback(error);
}
console.log('Connected viewer to RTSP!');
viewer = newViewer;
callback(null, sdpAnswer);
});
webRtcEndpoint.gatherCandidates(function(error) {
if (error) {
return callback(error);
}
});
});
});
});
});Update:
It seems that if I change the video codec of the IP camera from h.264 to MJPEG it works. So does that mean KMS can't convert from h.264 to vp8?
--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
digraph pipeline {
rankdir=LR;
fontname="sans";
fontsize="10";
labelloc=t;
nodesep=.1;
ranksep=.2;
label="<GstPipeline>\npipeline68\n[>]";
node [style="filled,rounded", shape=box, fontsize="9", fontname="sans", margin="0.0,0.0"];
edge [labelfontsize="6", fontsize="9", fontname="monospace"];
legend [
pos="0,0!",
margin="0.05,0.05",
style="filled",
label="Legend\lElement-States: [~] void-pending, [0] null, [-] ready, [=] paused, [>] playing\lPad-Activation: [-] none, [>] push, [<] pull\lPad-Flags: [b]locked, [f]lushing, [b]locking; upper-case is set\lPad-Task: [T] has started task, [t] has paused task\l",
];
}
Oh sorry. I did not know that. I got the info again with the application running and a player endpoint that gets the stream from an ip camera (rtsp uri) and is connected to an WebRtc endpoint. As always the video is black on the client with webrtc(unless the ip camera sends MPEG4 or MJPEG). I attached the file.
--
Ok. I have some checks for you then
sudo apt-get update && sudo apt-get upgradedpkg -l | egrep -i "kurento|gstreamer|nice"I have KMS 6. I think I have the latest release because I installed it on this server around 1 week ago with the instructions from here. I think the kurento-client node js api may be a bit older but I'm not sure. I changed allot of servers since I've been using Kurento and I zip the whole folder with modules and all then put it on the new server.
--
ii gstreamer1.5-libav:amd64 1.5.2.1~20150901123759.34.g07a7b16.trusty amd64 libav plugin for GStreamer
ii gstreamer1.5-nice:amd64 0.1.7.1~20151125151103.10.ge060eb5.trusty amd64 ICE library (GStreamer plugin)
ii gstreamer1.5-plugins-bad:amd64 1.7.0.1~20151125150916.398.g6825611.trusty amd64 GStreamer plugins from the "bad" set
ii gstreamer1.5-plugins-base:amd64 1.7.0.1~20151125150805.140.g2b445d5.trusty amd64 GStreamer plugins from the "base" set
ii gstreamer1.5-plugins-good:amd64 1.7.0.1~20151125150841.141.g0708286.trusty amd64 GStreamer plugins from the "good" set
ii gstreamer1.5-plugins-ugly:amd64 1.7.0.1~20151126085656.24.g9ec26a4.trusty amd64 GStreamer plugins from the "ugly" set
ii gstreamer1.5-pulseaudio:amd64 1.7.0.1~20151125150841.141.g0708286.trusty amd64 GStreamer plugin for PulseAudio
ii gstreamer1.5-x:amd64 1.7.0.1~20151125150805.140.g2b445d5.trusty amd64 GStreamer plugins for X11 and Pango
ii kms-core-6.0 6.2.0.trusty amd64 Kurento core module
ii kms-elements-6.0 6.2.0.trusty amd64 Kurento elements module
ii kms-filters-6.0 6.2.0.trusty amd64 Kurento filters module
ii kms-jsonrpc-1.0 1.0.1.trusty amd64 Kurento jsonrpc library
ii kmsjsoncpp 1.6.3~20151125151041.38.g263929e.trusty amd64 Kurento jsoncpp library
ii kurento-media-server-6.0 6.1.1.trusty amd64 Kurento Media Server
ii libgstreamer-plugins-bad1.5-0:amd64 1.7.0.1~20151125150916.398.g6825611.trusty amd64 GStreamer development files for libraries from the "bad" set
ii libgstreamer-plugins-base1.5-0:amd64 1.7.0.1~20151125150805.140.g2b445d5.trusty amd64 GStreamer libraries from the "base" set
ii libgstreamer1.5-0:amd64 1.7.0.1~20151125150753.298.g6d22bfb.trusty amd64 Core GStreamer libraries and elements
ii libnice10:amd64 0.1.7.1~20151125151103.10.ge060eb5.trusty amd64 ICE library (shared library)
ii openwebrtc-gst-plugins 0.10.0~20151125150950.100.g61cc54b.trusty amd64 OpenWebRTC specific GStreamer pluginsThose version numbers don’t feel right. Your kurento-media-server-6.0 package is not matching the rest of the packages. Please make sure no packages have been kept back. You might have to run sudo apt-get dist-upgrade
Ok. After I updated and upgraded and tested your project(which worked), my project works too now. Its weird since I thought I had the latest version, but it seems it was my mistake.
Thank you again and sorry for all the trouble. Now I will try and get the newest everything so I won't have problems.
--