Kurento Repository API (KMF) demo?

296 views
Skip to first unread message

Beka Iglesias

unread,
Jun 21, 2014, 3:11:55 PM6/21/14
to kur...@googlegroups.com
Hello,

We are working in adtlantida.tv one-to-many broadcast system, which use webRTC.Arquitecture: socket.io, node.js, broadcast.js (Muazkhan libs, STUNserver and TURNserver. It works, but we need a mediaserver as router to improve the number of listeners/viewers.We need to record real-time streamings in a media repository and connect it with our html5 client application, too.

I have already installed and configured KMS, but I would like to know some Repository API demo, is it possible some URL to this documentation resource??I didn't understand very well how can I connect KMS with java Repository API (KMF) and this with js/html5.

Thanks in advance,

Beka

http://adtlantida.tv

LuLop

unread,
Jun 22, 2014, 6:18:36 AM6/22/14
to kur...@googlegroups.com
Beka,

Communication with file repositories take place through two specific media elements: PlayerEndpoint and RecorderEndpoint. The former is capable of reading media files from file system or from URLs (using HTTP GET requests), the latter is capable of writing media files to file system or to URLs (using HTTP PUT requests). So, you can integrate Kurento into any repository having file system interface or HTTP GET/PUT interface. In addition to this, we have created a simple connector to MongoBD GridFS. This makes possible to use MongoDB as file repository taking advantage of all Mongo features such as sharding, redundancy, metainformation management, etc. Unfortunately, this connector is not documented and you'll need to dig into the source code if you want to have a deep understanding on how it works.

Best.

L.

--
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.

Micael Gallego

unread,
Jun 22, 2014, 10:01:37 AM6/22/14
to kur...@googlegroups.com

Beka Iglesias

unread,
Jun 26, 2014, 4:57:43 PM6/26/14
to kur...@googlegroups.com
Hello!

I have already installed MongoBD GridFS and I am reading the whole documentation about it and installing now node.js driver (it's the same library that our signalling server :).Now, we have webapp, signalling server, STUN and TURN server, KMS, KAS, MongoDB and node.js (client library for MongoDb installed).

I don't understand very well KMF part in this integration and Thrift API between KMS and KAS. Must java applets (KMF) be inside KAS level?Where can I install Thrift API?

Many thanks for the samples and suggestions!

Beka


--
You received this message because you are subscribed to a topic in the Google Groups "kurento" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kurento/rQ3JOXGOaYg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kurento+u...@googlegroups.com.

Beka Iglesias

unread,
Jun 26, 2014, 8:27:12 PM6/26/14
to kur...@googlegroups.com
So, it would be KMS/kmf-media-connector/kws-media-api. This last one connects directly with our websockets and node.js signalling. And with node.js can record and create a repository in MongoDb database?I will try with this arquitecture...and I will inform about my progress...

Thanks for your support,

Beka

Micael Gallego

unread,
Jun 27, 2014, 1:53:21 AM6/27/14
to kur...@googlegroups.com
Hi Beka, 

It is important to note that Kurento Repository API in KMF is Java library designed to run in a Java EE environment (Tomcat, JBoss, etc...). 

You also can execute Kurento Repository API in a standalone Java app (without web server), but with limited control about "recorded items". As it is not designed for end users, is not documented at all. You can look at the code in [1] and adapt it to your needs.

I hope this is helps.

pir...@gmail.com

unread,
Jun 27, 2014, 3:48:14 AM6/27/14
to kur...@googlegroups.com
Hi Beka,

kws-media-api works mainly as a "remote controller" for the Kurento
Media Server, you can build with it media pipelines but you can't be
able to consume the generated stream directly. You can instead add a
HttpGetEnpoint or WebRtcEndpoint to the end of the pipeline and use it
to connect with your Javascript client code. For example,
HttpGetEndpoint give you an URL that can be used in a HTML video tag,
and WebRtcEndpoint can be used to connect with a WebRTC PeerConnection
object.

We have in the readmap to add some client-side MediaElements in
addition to the current server-side ones so you could be able to
consume the stream directly on your client code, not needing to worry
about how to communicate the client with the server, and also we are
thinking about how to do so Node.js can be able to consume directly
the Media Server stream data, but they will not be available in the
short term.

Greetings, Jesús Leganés Combarro "piranna".
"Si quieres viajar alrededor del mundo y ser invitado a hablar en un
monton de sitios diferentes, simplemente escribe un sistema operativo
Unix."
– Linus Tordvals, creador del sistema operativo Linux

Beka Iglesias

unread,
Jul 2, 2014, 4:49:46 AM7/2/14
to kur...@googlegroups.com
Thanks for the information.Everything I have understood Kurento arquitecture.I am checking Licode too, but I think Kurento is with more capabilities.

http://ci.kurento.com/apps/kmf-media-connector.zip This link is broken, some alternative link?

Thanks,

Beka

Ivan Gracia

unread,
Jul 2, 2014, 5:10:04 AM7/2/14
to Kurento Public
Hi Beka,

You can download either the nightly or the release version of all files. Just follow the links provided here. We will correct the issue with the documentation ASAP.

Sorry for the trouble!

Cheers,
Ivan.

Beka Iglesias

unread,
Jul 7, 2014, 8:33:14 PM7/7/14
to kur...@googlegroups.com
Thanks!

So, everything is installed (KMS,kMF-media-connector and kws-media-api in webapp).We are using WebRtcEndpoint.js together with our broadcast.js (from Muazkhan experiments) and our stunserver.

Logs in /var/log/kurento.log and /var/log/media-connector.log are ok. Webapp streaming system is working.

But when I tried to run npm test in our webserver folder anything happened and npm-debug.log was completely empty.Any suggestions or advice to run npm test?? I want to be sure that system is already working with kurento functionalities.Everything is installed and configured, system is working but before system was working too until 20 viewers/listeners.I would like to check that everything is ok with kurento arquitecture before launching adtlantida.tv release.

Cheers,

Beka

LuLop

unread,
Jul 8, 2014, 3:20:23 AM7/8/14
to kur...@googlegroups.com
Can you share with us the code of the tests you are trying to execute?

To check if you KMS instance if up and running you can use some of the examples on kws-media-api project (take a look to our github)

L.

Beka Iglesias

unread,
Jul 8, 2014, 9:43:42 PM7/8/14
to kur...@googlegroups.com
Yes, I have checked tests in gihutb.I tried to run these tests in kws-media-api and output is:

root@v-adtlantida-mediateca:/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api# npm test

> kws-me...@4.3.17 test /var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api
> qunit-cli -c KwsMedia:. -c node_modules/qunit-reporter-junit -c wock:node_modules/wock -c test/_common.js -c test/_proxy.js test/*.js


/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-reporter-junit/qunit-reporter-junit.js:45
        currentRun.modules.push(currentModule);
                  ^
TypeError: Cannot read property 'modules' of undefined
    at F.QUnit.testStart.currentModule.name (/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-reporter-junit/qunit-reporter-junit.js:45:13)
    at runLoggingCallbacks (/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-cli/node_modules/qunitjs/qunit/qunit.js:1382:19)
    at Object.Test.setup (/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-cli/node_modules/qunitjs/qunit/qunit.js:79:4)
    at /var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-cli/node_modules/qunitjs/qunit/qunit.js:276:10
    at process (/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-cli/node_modules/qunitjs/qunit/qunit.js:1277:24)
    at null._onTimeout (/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api/node_modules/qunit-cli/node_modules/qunitjs/qunit/qunit.js:383:5)
    at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

...and I would like to test withour own WebSocket and specific code...

Thanks!!

Beka

pir...@gmail.com

unread,
Jul 9, 2014, 1:38:37 AM7/9/14
to kur...@googlegroups.com

> root@v-adtlantida-mediateca:/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api# npm test

The problem is that you are trying to exec the tests on the package downloaded from NPM, while it's not designed to do it. This is an issue we hace just found some weeks ago and since the next release the packages published on NPM will be production-only, to reduce bandwidth and to prevent this kind of problems to the users. If you are willing to run the tests yourself, please download the project from GitHub, install its dependencies and run them from there.

Beka Iglesias

unread,
Jul 13, 2014, 2:25:29 PM7/13/14
to kur...@googlegroups.com
Ok.I have run the tests from github-project.Everything ok. The only problem is that I don't know how apply the test in our project.I am using webrtcendpoint example with our KMS and media-connector.Streaming in adtlantida is using broadcast.js, too. I have updated our index.html and single-streams.php and header-webrtc.php.

How can apply the tests in this structure?

Thanks,

Beka


2014-07-09 7:38 GMT+02:00 pir...@gmail.com <pir...@gmail.com>:

> root@v-adtlantida-mediateca:/var/www/wp-content/themes/adtTheme/webrtc/node_modules/kws-media-api# npm test

The problem is that you are trying to exec the tests on the package downloaded from NPM, while it's not designed to do it. This is an issue we hace just found some weeks ago and since the next release the packages published on NPM will be production-only, to reduce bandwidth and to prevent this kind of problems to the users. If you are willing to run the tests yourself, please download the project from GitHub, install its dependencies and run them from there.

--

Micael Gallego

unread,
Jul 14, 2014, 6:29:53 PM7/14/14
to kur...@googlegroups.com
Hi Beka, 

¿What do you want to achive with Kurento? 

If you want to use JavaScript, there are two types of applications you can built with kurento:

A) You can develop a node.js web-app using kws-media-api to instruct Kurento Media Server to create a webrtc endpoint to receive media from a browser, record it and then retransmit to another browser. With this architecture, the JavaScript in the browser can communicate with the code in the node.js server by means of REST or with websockets.

B) You can develop a JavaScript app that runs fully in the browser and communicate with the Kurento Media Server by means of websockets using kws-media-api. You don't need a node.js server. Your server infrastructure can be PHP, Python or whatever you want. 

Regarding to security, option A is the best one, because the creation of Media Pipeline is made on the server and can't be manipulated. We are working in including strong security to B option, but for know, the JavaScript code in the client can be manipulated by a malicious user and release media elements. 

I hope that this info helps you. If you have more questions, don't hesite to ask again.

Regards.

Micael Gallego.

--
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.
Reply all
Reply to author
Forward
0 new messages