No, I think you should see close to no delay. Could you explain a bit of your architecture? Where are your Wowza and KMS? What’s the CPU load when you connect the RTP endpoint?
It would be great if you could send us (as an attachment) the output of getGstreamerDot. That way we can have a look at your pipeline, and see if there are any extra transcodifications taking place.
Ivan Gracia
--
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.
The architecture is rather basic. Its a one to many structure , which I explained it in my first post. There is a WebRtc endpoint of the streamer that connects to multiple viewers, the difference being that wen I create the WebRtc Endpoint of the broadcaster I also create two Rtp endpoints and proceed to connect the webrtc to them. One of them I use for Wowza and the other is for ffmpeg to create screenshots. Wowza and Kurento are on the same server and when I start a stream(no viewers, only the broadcaster which will have the 2 rtp endpoints) the cpu is around 100%(that's 1 from 12 xeon cores). I will atach the GStreamerDot info I gathered when I started the streame with no viewers.
--
1 [|| 2.5%] 4 [| 3.2%] 7 [|||| 15.0%] 10 [|| 6.3%]
2 [| 0.6%] 5 [|| 1.2%] 8 [|| 1.9%] 11 [|||||| 37.1%]
3 [|| 5.6%] 6 [| 1.2%] 9 [ 0.0%] 12 [||||||| 36.3%]
Mem[||||||||||||||||||| 3716/16047MB] Tasks: 66, 1211 thr; 2 running
Swp[ 0/16381MB] Load average: 1.00 0.58 0.31
Uptime: 37 days, 21:35:07
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
14528 nobody 20 0 6765M 768M 22152 S 93.6 4.8 3h18:35 /usr/bin/kurento-media-server
20513 nobody 20 0 6765M 768M 22152 R 85.4 4.8 2:32.14 /usr/bin/kurento-media-server
26423 root 20 0 18.6G 1756M 17936 S 10.1 10.9 9h47:39 /usr/local/WowzaStreamingEngine/j
20348 root 20 0 27004 4796 2912 R 6.3 0.0 0:18.19 htop
4042 root 20 0 25128 3176 2580 S 3.8 0.0 6h30:35 top
20496 nobody 20 0 6765M 768M 22152 S 5.0 4.8 0:08.14 /usr/bin/kurento-media-server
20515 nobody 20 0 6765M 768M 22152 S 1.3 4.8 0:01.50 /usr/bin/kurento-media-server
27490 root 20 0 18.6G 1756M 17936 S 0.6 10.9 0:08.34 /usr/local/WowzaStreamingEngine/j
20510 nobody 20 0 6765M 768M 22152 S 0.6 4.8 0:02.51 /usr/bin/kurento-media-server
20511 nobody 20 0 6765M 768M 22152 S 0.6 4.8 0:01.36 /usr/bin/kurento-media-server
20514 nobody 20 0 6765M 768M 22152 S 0.6 4.8 0:01.51 /usr/bin/kurento-media-server
27444 root 20 0 18.6G 1756M 17936 S 0.0 10.9 0:49.56 /usr/local/WowzaStreamingEngine/j
17693 user 20 0 103M 4884 3884 S 0.0 0.0 18:17.65 sshd: user@pts/4
26508 root 20 0 18.6G 1756M 17936 S 0.6 10.9 12:49.12 /usr/local/WowzaStreamingEngine/j
2269 root 20 0 8744M 479M 18376 S 0.6 3.0 55:31.90 /usr/local/WowzaStreamingEngine/j
26507 root 20 0 18.6G 1756M 17936 S 0.0 10.9 12:52.88 /usr/local/WowzaStreamingEngine/j
26493 root 20 0 18.6G 1756M 17936 S 0.0 10.9 12:53.49 /usr/local/WowzaStreamingEngine/j
26491 root 20 0 18.6G 1756M 17936 S 0.0 10.9 12:56.55 /usr/local/WowzaStreamingEngine/j
26487 root 20 0 18.6G 1756M 17936 S 0.0 10.9 14:29.95 /usr/local/WowzaStreamingEngine/j
F1Help F2Setup F3SearchF4FilterF5Tree F6SortByF7Nice -F8Nice +F9Kill F10Quit
top - 15:28:54 up 37 days, 21:33, 4 users, load average: 0.85, 0.36, 0.21
Tasks: 229 total, 1 running, 228 sleeping, 0 stopped, 0 zombie
%Cpu0 : 21.1 us, 5.3 sy, 0.0 ni, 73.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 4.5 us, 0.0 sy, 0.0 ni, 95.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 75.0 us, 0.0 sy, 0.0 ni, 25.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 4.8 us, 0.0 sy, 0.0 ni, 95.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 4.8 us, 0.0 sy, 0.0 ni, 95.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu8 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu9 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu10 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 16432480 total, 7697972 used, 8734508 free, 244392 buffers
KiB Swap: 16775164 total, 0 used, 16775164 free. 3648524 cached Mem
scroll coordinates: y = 1/229 (tasks), x = 1/12 (fields)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14528 nobody 20 0 6927744 786824 22152 S 95.4 4.8 196:46.77 /usr/bin/kurento-media-server
20348 root 20 0 27004 4796 2912 R 19.1 0.0 0:11.23 htop
26423 root 20 0 18.609g 1.715g 17936 S 19.1 10.9 587:28.57 /usr/local/WowzaStreamingEngine/jav+
4042 root 20 0 25128 3176 2580 R 4.8 0.0 390:30.12 top
top - 15:28:54 up 37 days, 21:33, 4 users, load average: 0.85, 0.36, 0.21
Tasks: 229 total, 1 running, 228 sleeping, 0 stopped, 0 zombie
%Cpu0 : 21.1 us, 5.3 sy, 0.0 ni, 73.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 4.5 us, 0.0 sy, 0.0 ni, 95.5 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 75.0 us, 0.0 sy, 0.0 ni, 25.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 4.8 us, 0.0 sy, 0.0 ni, 95.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 4.8 us, 0.0 sy, 0.0 ni, 95.2 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu8 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu9 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu10 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem: 16432480 total, 7697972 used, 8734508 free, 244392 buffers
KiB Swap: 16775164 total, 0 used, 16775164 free. 3648524 cached Mem
scroll coordinates: y = 1/229 (tasks), x = 1/12 (fields)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14528 nobody 20 0 6927744 786824 22152 S 95.4 4.8 196:46.77 /usr/bin/kurento-media-server
20348 root 20 0 27004 4796 2912 R 19.1 0.0 0:11.23 htop
26423 root 20 0 18.609g 1.715g 17936 S 19.1 10.9 587:28.57 /usr/local/WowzaStreamingEngine/jav+
4042 root 20 0 25128 3176 2580 R 4.8 0.0 390:30.12 top
I attached the log file. It is compressed because the original one was too big to upload.
I also had a similar problem on another project where I used kurento. The idea of that project was to get a RTSP stream, set an overlay image over it and server it to N viewers through WebRtc and Wowza(HLS). The problem was that when I made the player endpoint with the rtsp uri and connected it to the overlayfilter with an image the memory usage of the server would increase until the it froze, and I mean the whole server. I inspected my Node js code and I can't find anything that would make that happen. Its weird since that project is simpler than thus one all I do is connect the endpoint with an image overlay so I don't see where the code would be at fault.
--
Also, about the other project. I agree that an image filter would consume allot of resources, but a single rtsp with a image overlay filter to freeze the server doesn't seem right to me.
--
You can use one server. Just create two different KMS process, each one listening on a different WS port. You will need to create two different kurento.conf.json files, and start the media server using the command /usr/bin/kurento-media-server -f <path-to-conf-file>. In order to create endpoints in the different instances, you will need to have two different KurentoClient instances.
I see. Could you explain what you mean by two KMS processes? Do I need 2 servers with KMS on each and then send the WebRtc from one to another by negotiating 2 WebRtc endpoints and make the second do the transcoding(because a second server is not a option now), or can I do it with 1 server? If its the later, how can I do it and wouldn't it consume more resources if there would be 2 KMS instances on the same server?
--
It seems like the second instance of KMS doesn't work. I copied the .conf file and changed the ws port. After that I ran the command and started the second KMS with the new .conf file. In my code I changed the port to the new one and started a stream. I get no errors but the viewer doesn't get any video. Is there something more that I must do?
--
String command = "capsfilter caps=video/x-raw,framerate=10/1";
GStreamerFilter capsFilter = new GStreamerFilter.Builder(pipeline, command).withFilterType(FilterType.VIDEO).build();
webrtc.connect(capsFilter);
capsFilter.connect(rtp1);
capsFilter.connect(rtp2);
After a short time with a stream open (with both rtp endpoints connected) htop shows me one of the cores at 100% and it stays until stream is closed. I kinda need two RtpEndpoint because if I tried making ffmpeg read from the one for Wowza it won't work. I guess a a sdp can't be read by two things at the same time. I'll try testing which one eats more.
--
var options = { command : "capsfilter caps=video/x-raw,framerate=10/1" }
pipeline.create('GStreamerFilter', options, function(error, filter){});
Thanks but, can you give me an Node js example for creating a capsfilter?
--
Yes, you can also limit the size. Use this to keep the aspect ratio.
var command = "capsfilter caps=video/x-raw,pixel-aspect-ratio=1/1,width=[" + width + ",30], framerate=" + framerate + "/1"
Releasing an endpoint will disconnect everything, don’t worry!
I tried the capsfilter for the webrtc that connect to the rtp for screenshot. The fps limit I set was 1/1 since I don't need a much higher one since I'm only using that RtpEndpoint to create screenshot with ffmpeg from time to time. Can I also limit the resolution with that?
P.S. Unrelated question: if I release an enpoint, do I still need to disconnect it from whatever it was connected to, or does it disconnect automatically (or disconnect another endpoint that was connected to it)?
--
--