WebRTC to Gstreamer Bridge -
i'm trying stream audio browser gstreamer pipeline on server.
i'm using kurento, , modifying hello world example try connect rtp endpoint pipeline -- having trouble.
i know media getting there because when swap in recording endpoint, valid recording.
the kurento node js is:
pipeline.create("rtpendpoint", {}, function(error, rtpendpoint) { if (error) { console.log("recorder problem"); return senderror(res, 500, error); } console.log("creating webrtcendpoint"); pipeline.create('webrtcendpoint', function(error, webrtcendpoint) { if (error) { return senderror(res, 500, error); } console.log("processing sdpoffer @ server , generating sdpanswer"); webrtcendpoint.processoffer(sdpoffer, function(error, sdpanswer) { if (error) { webrtcendpoint.release(); return senderror(res, 500, error); } console.log("connecting loopback"); webrtcendpoint.connect(webrtcendpoint, function(error) { if(error){ webrtcendpoint.release(); return senderror(res, 500, error); } console.log("sending sdpanswer client"); console.log(sdpanswer); webrtcendpoint.connect(rtpendpoint, function(error) { if(error) { webrtcendpoint.release(); return senderror(res, 500, error); } rtpendpoint.generateoffer(function(error, offer) { fs.writefile('/tmp/test.sdp',offer); console.log("rtp offer generated."); }); }); res.type('application/sdp'); res.send(sdpanswer); }); }); }); });
and gstreamer pipeline is:
gst-launch-1.0 -vvvv filesrc location=/tmp/test.sdp ! sdpdemux ! decodebin ! autovideosink
which returns
setting pipeline paused ... pipeline live , not need preroll ... got context element 'autovideosink0-actual-sink-glimage': gst.gl.gldisplay=context, gst.gl.gldisplay=(gstgldisplay)"\(gstgldisplayx11\)\ gldisplayx11-0"; setting pipeline playing ... new clock: gstsystemclock /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstudpsrc:udpsrc0: timeout = 10000000000 /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstudpsrc:udpsrc2: timeout = 10000000000 /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0/gstrtpsession:rtpsession0.gstpad:send_rtcp_src: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0.gstghostpad:send_rtcp_src_0: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstudpsink:udpsink0.gstpad:sink: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0.gstghostpad:send_rtcp_src_0.gstproxypad:proxypad4: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0/gstrtpsession:rtpsession1.gstpad:send_rtcp_src: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0.gstghostpad:send_rtcp_src_1: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstudpsink:udpsink1.gstpad:sink: caps = application/x-rtcp /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0/gstrtpbin:rtpbin0.gstghostpad:send_rtcp_src_1.gstproxypad:proxypad7: caps = application/x-rtcp error: element /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0: not read resource. additional debug info: gstsdpdemux.c(1213): gst_sdp_demux_handle_message (): /gstpipeline:pipeline0/gstsdpdemux:sdpdemux0: not receive udp packets 10.0000 seconds, maybe firewall blocking it. execution ended after 0:00:10.062018001 setting pipeline paused ... setting pipeline ready ... setting pipeline null ... freeing pipeline ...
it doesnt work on ffpmeg, vlc, etc -- results similar "attempt 5.3" here: https://altanaitelecom.wordpress.com/2015/02/26/continue-streaming-broadcasting-live-video-call-to-non-webrtc-supported-browsers-and-media-players/
i don't think theres firewall issue pipeline , kurento instance on same virtual machine (which has no firewall) -- , recording endpoint works. being linked badly? there easier way?
using rtpendpoint tricky because need complete de sdp negotiation. means somewhere after
rtpendpoint.generateoffer(...
you should invoking
rtpendpoint.processanswer(sdpanswer, ...)
the tricky part need obtain sdpanswer gstreamer pipeline , not trivial if want using gst-launch. best option write small programm creating pipeline , generating sdpanswer can give rtpendpoint through signaling mechanism.
Comments
Post a Comment