PDA

View Full Version : [Jingle] libjingle in Python


kael
11-13-2008, 08:36 AM
Hello,

I'd wish to run a bot, probably written with the xmpppy library, to
broadcast audio and video files with Jingle, and I'm looking for a
Jingle stack in Python.

I've found PyJRTPlib <http://pyjrtplib.sourceforge.net/> but it seems
incomplete. I'm also wondering which other library should be used apart
the RTP one (I don't know much about codecs and multimedia protocols).

Thanks.

--
kael

Michael Flaig
11-13-2008, 01:35 PM
Hi,

Gajim (gajim.org) is written in python and has a jingle branch that was
developed during google summer of code in it's SVN Repository. However
it is my understanding that the gajim devs stopped developing until the
jingle XEPs have reached draft state.

Then there is telepathy (http://telepathy.freedesktop.org/wiki/) which
is afaik used for the google talk client on the nokia internet tablets.
Telepathy provides python bindings but I don't know about their state.
You need to look at farsight (http://farsight.freedesktop.org/wiki/) as
well, it's a part of telepathy and actually handles audio and video by
useing the gstreamer framework.

Look at empathy (http://live.gnome.org/Empathy) for a implementation of
telepathy/farsight. Written in C though

Hope that helps.

Mike

On Thu, 2008-11-13 at 08:31 +0100, kael wrote:
> Hello,
>
> I'd wish to run a bot, probably written with the xmpppy library, to
> broadcast audio and video files with Jingle, and I'm looking for a
> Jingle stack in Python.
>
> I've found PyJRTPlib <http://pyjrtplib.sourceforge.net/> but it seems
> incomplete. I'm also wondering which other library should be used apart
> the RTP one (I don't know much about codecs and multimedia protocols).
>
> Thanks.
>
--
Michael Flaig <mflaig (AT) pro-linux (DOT) de>
PROLinux.de

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAkkcHpwACgkQanN6bfJmq17ZbgCfa+ixLUHDrz 6pX7GjikiJNbvX
8bQAn0T7uW0isu1KKddfG+tJ/EiR6Vip
=kxxs
-----END PGP SIGNATURE-----

Sjoerd Simons
11-13-2008, 02:15 PM
On Thu, Nov 13, 2008 at 08:31:31AM +0100, kael wrote:
> Hello,
>
> I'd wish to run a bot, probably written with the xmpppy library, to
> broadcast audio and video files with Jingle, and I'm looking for a
> Jingle stack in Python.

For mingle[0] we've written, among other things, a simple jingle client using
twisted, farsight2[1] and nice[2]. I wouldn't call the code production quality
by far (it's mainly for testing purposes), but it should provide a good start
for those kind of things. And ofcourse feedback/patches are always welcome :)

The code is available in on git.collabora.co.uk[3]

> I've found PyJRTPlib <http://pyjrtplib.sourceforge.net/> but it seems
> incomplete. I'm also wondering which other library should be used apart
> the RTP one (I don't know much about codecs and multimedia protocols).

Farsight2 handles all the streaming issues for you. So the only thing your
python code needs to do is the actual jingle signalling.

Sjoerd
0: http://telepathy.freedesktop.org/wiki/Mingle
1: http://farsight.freedesktop.org/wiki/
2: http://nice.freedesktop.org/wiki/
3: http://git.collabora.co.uk/?p=mingle.git;a=summary
--
The Force is what holds everything together. It has its dark side, and
it has its light side. It's sort of like cosmic duct tape.

Sjoerd Simons
11-13-2008, 02:15 PM
On Thu, Nov 13, 2008 at 08:31:31AM +0100, kael wrote:
> Hello,
>
> I'd wish to run a bot, probably written with the xmpppy library, to
> broadcast audio and video files with Jingle, and I'm looking for a
> Jingle stack in Python.

For mingle[0] we've written, among other things, a simple jingle client using
twisted, farsight2[1] and nice[2]. I wouldn't call the code production quality
by far (it's mainly for testing purposes), but it should provide a good start
for those kind of things. And ofcourse feedback/patches are always welcome :)

The code is available in on git.collabora.co.uk[3]

> I've found PyJRTPlib <http://pyjrtplib.sourceforge.net/> but it seems
> incomplete. I'm also wondering which other library should be used apart
> the RTP one (I don't know much about codecs and multimedia protocols).

Farsight2 handles all the streaming issues for you. So the only thing your
python code needs to do is the actual jingle signalling.

Sjoerd
0: http://telepathy.freedesktop.org/wiki/Mingle
1: http://farsight.freedesktop.org/wiki/
2: http://nice.freedesktop.org/wiki/
3: http://git.collabora.co.uk/?p=mingle.git;a=summary
--
The Force is what holds everything together. It has its dark side, and
it has its light side. It's sort of like cosmic duct tape.

Peter Saint-Andre
11-13-2008, 11:44 PM
Michael Flaig wrote:

> Gajim (gajim.org) is written in python and has a jingle branch that was
> developed during google summer of code in it's SVN Repository. However
> it is my understanding that the gajim devs stopped developing until the
> jingle XEPs have reached draft state.

That's unfortunate. Right now a lot of developers are working on Jingle
support in Pidgin, Kopete, Empathy, Psi, Yate, SIP Communicator,
Pandion, and other clients, so it would be great to see Gajim re-join
the list. When that Gajim code was written the XEPs were still changing
quite a bit, but I think they're solid now (as witness all the recent
activity). Perhaps I'll poke the Gajim devs about this. :)

Peter

--
Peter Saint-Andre
https://stpeter.im/

kael
11-21-2008, 05:38 PM
Michael Flaig wrote, On 11/13/2008 01:33 PM:
> Gajim (gajim.org) is written in python and has a jingle branch that was
> developed during google summer of code in it's SVN Repository. However
> it is my understanding that the gajim devs stopped developing until the
> jingle XEPs have reached draft state.

I had forgotten the Gajim GSoC Jingle implementation. Thanks for
reminding it.

> Then there is telepathy (http://telepathy.freedesktop.org/wiki/) which
> is afaik used for the google talk client on the nokia internet tablets.
> Telepathy provides python bindings but I don't know about their state.
> You need to look at farsight (http://farsight.freedesktop.org/wiki/) as
> well, it's a part of telepathy and actually handles audio and video by
> useing the gstreamer framework.

I came across Pyempathy and Telepathy-Python, but apparently Farsight
seems more appropriate with its Python binding.

Thanks.

--
kael

kael
11-21-2008, 05:41 PM
Sjoerd Simons wrote, On 11/13/2008 02:14 PM:
> For mingle[0] we've written, among other things, a simple jingle client using
> twisted, farsight2[1] and nice[2]. I wouldn't call the code production quality
> by far (it's mainly for testing purposes), but it should provide a good start
> for those kind of things. And ofcourse feedback/patches are always welcome :)
>
> The code is available in on git.collabora.co.uk[3]

Thank you very much for having made me discover Mingle.

After having solved a gtk-doc dependency issue for compilation and set
the correct LD_LIBRARY_PATH for Farsight, I've launched jingle-gui.py
and a GUI's appeared, but not sure of what to do then.

> Farsight2 handles all the streaming issues for you. So the only thing your
> python code needs to do is the actual jingle signalling.

This sounds awesome. I had some look at the code, there is a lot to
learn from it and it looks much more easier than I would have imagined.

Now I need to dive into documentation regarding gstreamer,
python-gstreamer and Farsight APIs, and also RTP, ICE and Jingle.

BTW, wondering, which XEP are or could be implemented with Farsight ?

Thanks.

--
kael

Sjoerd Simons
11-24-2008, 04:50 PM
On Fri, Nov 21, 2008 at 05:37:12PM +0100, kael wrote:
> Sjoerd Simons wrote, On 11/13/2008 02:14 PM:
>> For mingle[0] we've written, among other things, a simple jingle client using
>> twisted, farsight2[1] and nice[2]. I wouldn't call the code production quality
>> by far (it's mainly for testing purposes), but it should provide a good start
>> for those kind of things. And ofcourse feedback/patches are always welcome :)
>>
>> The code is available in on git.collabora.co.uk[3]
>
> Thank you very much for having made me discover Mingle.
>
> After having solved a gtk-doc dependency issue for compilation and set
> the correct LD_LIBRARY_PATH for Farsight, I've launched jingle-gui.py
> and a GUI's appeared, but not sure of what to do then.

The GUI doesn't actually implement calling yet :) To use it, use do
jingle-call.py <jid> <password> to wait for incoming calls or jingle-call.py
<jid> <password> <jid to call> to call someone else.

>> Farsight2 handles all the streaming issues for you. So the only thing your
>> python code needs to do is the actual jingle signalling.
>
> This sounds awesome. I had some look at the code, there is a lot to
> learn from it and it looks much more easier than I would have imagined.
>
> Now I need to dive into documentation regarding gstreamer,
> python-gstreamer and Farsight APIs, and also RTP, ICE and Jingle.
>
> BTW, wondering, which XEP are or could be implemented with Farsight ?

Farsight takes care of the actual media streaming layer. Currently it can do
both rawudp and ICE (including compatibility modes for some older ICE drafts
and Google Talk). So using farsight you can currently implement jingle
(XEP-0166) with XEP-0167 (Jingle RTP sessions) using either XEP-0177 (Jingle
Raw UDP Transport Method) or XEP-0176 (Jingle ICE-UDP Transport Method) as
transports. Apart from that you can also implement the dialects GTalk and
Google video chat use.

Sjoerd
--
The bigger the theory the better.