Skip to content

minervaproject/pykurento

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pykurento

##We are no longer actively developing this project. Sorry to those who were interested. Feel free to fork.

Pykurento is a Kurento client written in python and uses the websocket-client library for its transport layer.

Installing

pip install git+https://github.com/minervaproject/pykurento.git#egg=pykurento

Usage

Here's a simple example of a loopback pipeline created in a tornado request handler.

from pykurento import KurentoClient, media

kurento = KurentoClient("ws://localhost:8888/kurento")

class LoopbackHandler(tornado.web.RequestHandler):
  def get(self):
    with open("loopback.html","r") as f:
      self.finish(f.read())

  def post(self):
    sdp_offer = self.request.body
    pipeline = kurento.create_pipeline()
    wrtc_pub = media.WebRtcEndpoint()
    sdp_answer = wrtc_pub.process_offer(sdp_offer)
    wrtc_pub.connect(wrtc_pub)
    self.finish(str(sdp_answer))

Source for loopback.html

Developing

Source and deps

git clone https://github.com/minervaproject/pykurento
cd ./pykurento
pip install -r examples/requirements.txt

Running the examples

./examples/app.py

or

PORT=8080 ./examples/app.py

There is an assumption in the examples that your KMS address is localhost:8888. The easiest way during development to make this work is to setup an ssh tunnel to your media server.

ssh -nNT -i <identity file> -L 8888:localhost:8888 <user>@<server address>

License

As with Kurento, this client is released under the terms of LGPL version 2.1 license.

About

A Kurento client written in python using websocket-client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages