Python Video processing.

Ant antroy at gmail.com
Tue Jun 13 08:29:06 EDT 2006


Hi all,

I have a specific task I want to automate - rotating a video file
through 90 degrees.

I've used the PIL library quite a bit to perform batch processing on
images, and would like to do similar on video. Can anyone see a problem
with the following:

1) Use pymedia to convert the video into a sequence of stills (e.g.
http://pymedia.org/tut/src/dump_video.py.html)
2) Use PIL to process each still
3) Use pymedia to re-pack the still into video format.

In particular, does anyone know whether the data obtained from decoding
the video frame as in the following snippet from
http://pymedia.org/tut/src/dump_video.py.html:

          dd= d.convert( fmt )
          img= pygame.image.fromstring( dd.data, dd.size, "RGB" )

can be directly loaded into a PIL Image object (and back again?)?




More information about the Python-list mailing list