pygame   documentation
||  Home  ||  Help Contents  ||
 
|| CD || Channel || Font || Joystick || Movie || Rect || Sound ||
|| Surface || pygame || UserRect || cdrom || constants || cursors || display ||
|| draw || event || font || image || joystick || key || mixer ||
|| mixer_music || mouse || movie || surfarray || time || transform || version ||

Movie

The Movie object represents an opened MPEG file. You control playback similar to a Sound object.
 
Movie objects have a target display Surface. The movie is rendered to this Surface in a background thread. If the Surface is the display surface, and the system supports it, the movie will render into a Hardware YUV overlay plane. If you don't set a display Surface, it will default to the display Surface.
 
Movies are played back in background threads, so there is very little management needed on the user end. Just load the Movie, set the destination, and Movie.play()
 
Movies will only playback audio if the pygame.mixer module is not initialized. It is easy to temporarily call pygame.mixer.quit() to disable audio, then create and play your movie. Finally calling pygame.mixer.init() again when finished with the Movie.
 

get_busy - query the playback state
get_frame - query the current frame in the movie
get_length - query playback time of the movie
get_size - query the size of the video image
get_time - query the current time in the movie
has_audio - query if movie stream has audio
has_video - query if movie stream has video
pause - pause/resume movie playback
play - start movie playback
rewind - set playback position to the beginning of the movie
set_display - change the video output surface
set_volume - change volume for sound
skip - skip the movie playback position forward
stop - stop movie playback

get_busy
Movie.get_busy() -> bool
 
get_frame
Movie.get_frame() -> int
 
get_length
Movie.get_length() -> float
 
get_size
Movie.get_size() -> width,height
 
get_time
Movie.get_time() -> float
 
has_audio
Movie.has_audio() -> bool
 
has_video
Movie.has_video() -> bool
 
pause
Movie.pause() -> None
 
play
Movie.play(loops=0) -> None
 
rewind
Movie.rewind() -> None
 
set_display
Movie.set_display(Surface, [pos]) -> None
 
set_volume
Movie.set_volume(val) -> None
 
skip
Movie.skip(seconds) -> None
 
stop
Movie.stop() -> None