[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] pygame.movie



hey folks, here's the latest update.

i just checked pygame.movie into CVS. this module uses the SMPEG
library to playback MPEG files. it's very easy to use and works
well. since this is a new module, you'll likely want to remove
your "Setup" file and let pygame configure a new one if you are
on the cvs bleeding edge.

there is no audio support. i don't know if there ever will be.
i just cannot get SMPEG to give me clean audio from the movies.
(worse trouble than just trying to get MP3 audio from it).

soon i'll also add support for scaling the playback, which
SMPEG does very quickly, but i haven't yet wrapped the funcs.

you can peek at the docs for the Movie objects here,
http://www.pygame.org/docs/ref/Movie.html

you create a Movie object pretty much the same way you create
a Sound object from pygame.mixer. the movie decoding all runs
in background threads, so you just tell the Movie where you want
it to render the images. once you call the Play() function, it
does all the work.

if you set the render surface to the display surface, SMPEG
uses the SDL overlay images (at least on windows). SDL only
supports one overlay at a time, but you should be able to
stream multiple MPEG streams if you send them to an offscreen
Surface.


if compiling on windows, you'll likely want to download the
latest win32-dependencies, since i just added the SMPEG headers
that pygame needs. http://www.pygame.org/ftp/win32-dependencies.zip

if compiling on unix, you may run into some difficulties with
the config and compile. it seems some distros put the SMPEG
headers in a different place than all the other SDL headers.
if the config doesn't find it, add a "-I/usr/include/smpeg"
on the SMPEG= line. (the correct path to the smpeg headers
will work even better). also uncomment the "movie" module
line not far below that.


this will all get smoothed out pretty soon. i still need to
finish up the scaling routines. it will probably take a few
rough passes to get support for the new optional dependency all
straightened out. (i'm hoping the unix side runs as smooth
as windows)




____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org