Playing non-MPG movies with Pygame

Rainer Deyke root at rainerdeyke.com
Mon Oct 15 23:22:25 EDT 2001


"Bocco" <jbocco at lycos.com> wrote in message
news:729e12a5.0110151858.586ae081 at posting.google.com...
> It's great that Pygame has built-in support for MPEG movies, but how
> would I write a program which could use other video formats? Do I
> actually need to load each individual frame, pixel by pixel, from the
> file into some massive multi-dimensional array, or is there a simpler
> way?

Assuming you want to use Pygame, you have three options:
  1. Convert the video in a series of still images and show these one at a
time.
  2. Convert the video into mpeg and show that.
  3. Write a video decoder for whatever format you want to use in C/C++,
integrate it with Pygame, and use that.

Attempting to decode the video one pixel at a time in Python will not yield
acceptable performance.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list