Python Bindings for GStreamer on Ubuntu

Russel Winder russel at winder.org.uk
Tue Jul 24 13:48:58 UTC 2018


On Tue, 2018-07-24 at 07:19 -0500, vk_gst wrote:
> Hello,
> 
> I am trying to learn to use python with Gstreamer. I am following the
> tutorials mentioned  here
> <https://github.com/gkralik/python-gst-tutorial/blob/master/basic-tut
> orial-2-ex-vertigo.py>  
> .  I installed the python-gst using 'sudo apt-get install python-gst-
> 1.0'. 

python-gst-1.0 is for Python 2

python3-gst-1.0  is for Python 3

At least on Debian Sid…

> However, when I run the script, I get the following errors: 
> 
> Traceback (most recent call last):
>   File "basic2.py", line 28, in <module>
>     pipeline.add(source, filter_vertigo, videoconvert, sink)
> TypeError: Gst.Bin.add() takes exactly 2 arguments (5 given)
> 
> Changing the first line in script to '#!/usr/bin/env python2.7' makes
> it
> work. 
> I am trying to understand why the gstreamer does not work with
> python3. 
> 
> Which packages should I install to get it working? 
> 
> I am running a Ubuntu 18.04 with Gstreamer1.0. 
> 

…but it should be the same on Ubuntu

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180724/85599bde/attachment.sig>


More information about the gstreamer-devel mailing list