feasibility of building a video editing program in python

Christopher Saunter Christopher.Saunter at durham.ac.uk
Mon May 20 06:31:07 EDT 2002


abe burmeister (google at abe1x.com) wrote:

<snip - video work in Python...>

: I'm interested in building a program that:
: 1 - manipulates and sequences static images and displays them on
: screen at video playback speeds.
: 2 - exports sequences as video
: 3 - has a GUI that allows for real time manipulation

Hi Abe,
	I've been using Python to build a program in our lab that centres
around video processing.  Images are aquired from a (scientific) firewire
camera, displayed and processed, and the results sent over a network.

The program uses C code for most stages (aquisition, colour mapping,
processing etc) with Python gluing it all together and providing a GUI.

I'm using the wxPython GUI toolkit under win32, and it appears that this
is where the limit in displayed frame rate is occouring (~15 fps) -
I plan to move the disply code into C++ at some point, ie extend the
underlying wxWindows guts of wxPython.

One major issue with Python for this sort of work is the fact that Python
doesn't use multiple processors on an SMP machine ;-(  I gather you can
have multiple threads of custom C coded extensions running simultanously,
but I have yet to look into this.

You can probably do this, but you will need to know C, and a high end
machine i a must.  Dispite what I said about the SMP, a dual
processor machine will still make life as a whole nicer, from a
development point of view, as well as responsive mouse cursors!  

Also, speaking from some unpleasant experience, if you will be working on
a win32 platform, and are doing this sort of work, using NT4/2000/XP is
highly preferable to using 95/98/ME.  You really, really, really do not
want to use 9x, it is not worth the hastle! (Guess who has no choice but
to develop for a 98 machine ;-)

I suspect for the 'real time' display part, you will end up using mainly C
code glued together with Python, at which point perhaps it is time to flip
things and think about a C program using Python as a scripting language
for GUI building and control?  

Finally, you may or may not be aware of Virtual Dub (www.virtualdub.org) -
an excelent GPL wib32 video processing program - this may provide some
good source if your code is going to be GPL'd.  

Interested to hear what decisions you reach, and good luck!


---

cds

----
: I'm interested in building a program that:
: 1 - manipulates and sequences static images and displays them on
: screen at video playback speeds.
: 2 - exports sequences as video
: 3 - has a GUI that allows for real time manipulation
: 4 - can be controlled with a MIDI interface


H



: 4 - can be controlled with a MIDI interface

: Is something that python can do? If so is python the right tool to
: accomplish this, or are there more optimal languages?

: thanks
: -abe



More information about the Python-list mailing list