var ws_uri ='wss://' + location.hostname + ':8433/kurento';var video;var webRtcPeer;var pipeline;var sdp_camera;var sdp_rtp;var rtp;var webrtc;window.addEventListener('load', function(event) {console = new Console()var startRecordButton = document.getElementById('start');startRecordButton.addEventListener('click', start);});function start() {//showSpinner(video);//webRtcPeer = kurentoUtils.WebRtcPeer.startSendOnly(video, onOffer, onError);var videoInput = document.getElementById("videoInput");var videoOutput = document.getElementById("videoOutput");var options = {localVideo: videoInput,remoteVideo: videoOutput};webRtcPeer = kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options, function(error){if(error) return onError(error)this.generateOffer(onOffer)});}function onOffer(error, sdpOffer) {sdp_camera = sdpOffer;kurentoClient(ws_uri, onKurentoClientCreate);}function onKurentoClientCreate(error, kurentoClient) {if (error) return onError(error);kurentoClient.create('MediaPipeline', onCreateMediaPipeline);}function onCreateMediaPipeline(error, in_pipeline) {if (error) return onError(error);function release(event) {stop();video.src = "";}pipeline = in_pipeline;pipeline.create('WebRtcEndpoint', onCreateWebRtcEndpoint);}function onCreateWebRtcEndpoint(error, webRtc) {if (error) return onError(error);webrtc = webRtc;webrtc.processOffer(sdp_camera, onWebRtcProcessOffer);}function onWebRtcProcessOffer(error, sdpAnswer) {if (error) return onError(error);webRtcPeer.processAnswer(sdpAnswer);pipeline.create('RtpEndpoint', onCreateRtpEndpoint);}function onCreateRtpEndpoint(error, Rtp) {if (error) return onError(error);rtp = Rtp;sdp_rtp = '';sdp_rtp += 'v=0\n';sdp_rtp += 'o=- 2 2 IN IP4 192.168.11.4/big\n';sdp_rtp += 's=\n';sdp_rtp += 't=0 0\n';sdp_rtp += 'c=IN IP4 192.168.11.4/big\n';sdp_rtp += 'm=video 24230 RTP/AVP 100\n';sdp_rtp += 'a=rtpmap:100 H264/90000\n';sdp_rtp += 'a=recvonly\n';rtp.processOffer(sdp_rtp, onRtpProcessOffer);}function onRtpProcessOffer(error, sdpAnswer) {if (error) {return onError(error);}console.log("ANswer -------");//console.log(sdpAnswer);//webRtcPeer.processAnswer(sdpAnswer);webrtc.connect(rtp, onConnect);}function onConnect(error) {if (error) return onError(error);console.log('Loopback established...');}function stop() {if (webRtcPeer) {webRtcPeer.dispose();webRtcPeer = null;}if (pipeline) {pipeline.release();pipeline = null;}hideSpinner(video);}function onError(error) {if (error) console.error(error);stop();}
rtmp {
server {
listen 1935;
chunk_size 4000;
# Transcoding (ffmpeg needed)
application big {
live on;
# On every pusblished stream run this command (ffmpeg)
# with substitutions: $app/${app}, $name/${name} for application & stream name.
#
# This ffmpeg call receives stream from this application &
# reduces the resolution down to 32x32. The stream is the published to
# 'small' application (see below) under the same name.
#
# ffmpeg can do anything with the stream like video/audio
# transcoding, resizing, altering container/codec params etc
#
# Multiple exec lines can be specified.
# exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec libx264 -threads 0 -r 25 -g 50 -b 500k -bt 500k -s 320x180 -acodec mp3 -ar 44100 -ab 64k -f flv rtmp://localhost:1935/small/${name};
exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name -vcodec libx264 -threads 0 -r 25 -g 50 -b 500k -bt 500k -s 320x180 -acodec mp3 -ar 44100 -ab 64k -f flv rtmp://1.13577498.fme.ustream.tv/ustreamVideo/13577498/RrHUx94pJWjaEhPjnQYwUxcU2T2w8CaX;
# 2>>/tmp/ffmpeg.log;
# exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name
# -vcodec libx264 -vprofile baseline -b:v 128k -b:a 32k -s 320x180 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/small/${name}_low
# -vcodec libx264 -vprofile baseline -b:v 384k -b:a 64k -s 640x360 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/small/${name}_mid
# -vcodec libx264 -vprofile baseline -b:v 1024k -b:a 128k -s 1280x720 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/small/${name}_hi;
#hls
# exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name
# -vcodec libx264 -vprofile baseline -b:v 128k -b:a 32k -s 320x180 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/${name}_low
# -vcodec libx264 -vprofile baseline -b:v 384k -b:a 64k -s 640x360 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/${name}_mid
# -vcodec libx264 -vprofile baseline -b:v 1024k -b:a 128k -s 1280x720 -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/${name}_hi;
# 2>>/tmp/ffmpeg.log;
#hls
exec /usr/local/bin/ffmpeg -re -i rtmp://localhost:1935/$app/$name
-vcodec libx264 -vprofile baseline -acodec libvo_aacenc -ar 44100 -ac 1 -f flv rtmp://localhost:1935/hls/${name};
# record first 1K of stream
record all;
record_path /usr/local/nginx/html/video;
# record_max_size 1K;
# append current timestamp to each flv
record_unique on;
# push rtmp://1.13577498.fme.ustream.tv/ustreamVideo/13577498 name=RrHUx94pJWjaEhPjnQYwUxcU2T2w8CaX;
}
--
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.
sdp_rtp = 'v=0';
sdp_rtp += 'o=- 2 2 IN IP4 192.168.11.4';
sdp_rtp += 's=';
sdp_rtp += 't=0 0';
sdp_rtp += 'c=IN IP4 192.168.11.4';
sdp_rtp += 'm=video 24230 RTP/AVP 100';
sdp_rtp += 'a=rtpmap:100 H264/90000';
sdp_rtp += 'a=recvonly';
v=0 o=- 3662363061 3662363061 IN IP4 192.168.122.1 s=Kurento Media Server c=IN IP4 192.168.122.1 t=0 0 m=audio 55844 RTP/AVP 0 a=rtpmap:0 PCMU/8000 a=ssrc:2707485542 cname:user536102620@host-c5557cbc m=video 49942 RTP/AVP 101 a=rtpmap:101 H264/90000Is this ok that - `sdpAnswer` (onRtpProcessOffer) looks always like this?
So the last part of negotiation I guess is these lines:
Yeah, use something like the hello world, for instance.
Also, with this command you can check if there is some traffic going on to that port in your SDP.
sudo tcpdump -i eth0 port 24230
Do you mean loopback-stats tutorial in Kurento?
--
So I've attached js code (html the same as in any tutorial).P.S. I didnt use any remote data, cause I'm only sending stream to nginx server
That behaviour (going through the loopback interface) can be seen in th elocal route table
ip route show table local
All packets destinated to your local IPs would never go thru NICs since they are marked as local.
Now you just need to know why nginx is not showing the video :-)
I use virtualbox with linux (192.168.11.4) and my browser on windows
--
In case If Turn is dissabled right now. For STUN case - its public ip and port. Will my RtpEndPoint work in this case?
--
How can I stream video and audio?In SDP:sdp_rtp = 'v=0\n'+'o=- 0 0 IN IP4 192.168.11.0\n'+'s=livestream\n'+'c=IN IP4 192.168.11.0\n'+'t=0 0\n'+'m=audio 2430 RTP/AVP 0\n' +'a=rtpmap:0 PCMU/8000\n''m=video 2430 RTP/AVP 100\n'+'a=rtpmap:100 H264/90000\n'+'a=recvonly';And I've got response from KMS only audio (cause first I guess)