You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.
Some places to look are:
Please do not create new links to this page.
Ren'Py is capable of using ffmpeg (included) to play movies using the video codecs:
and the following audio codecs:
inside the following container formats:
(Note that using some of these formats may require patent licenses. When in doubt, and especially for commercial games, we recommend using Theora, Vorbis, and Matroska or Ogg.)
Ren'Py expects that every movie will have an audio track associated with it, even if that audio track consists of nothing but silence. This is because the audio track is used for synchronization purposes.
Movies can be displayed fullscreen, or in a displayable. Fullscreen movies are the more efficient.
The easiest way to display a movie fullscreen is to display it using the function. This function displays a movie for a specified length of time. When that time has elapsed, or when the user clicks to dismiss the movie, the movie ends and the function returns.
$ renpy.movie_cutscene("On_Your_Mark.mpg")
A movie can also be displayed inside a displayable, allowing it to be combined with other things on the screen. To do this, one must first show a Movie displayable, and then play the movie on an audio channel. (We recommend using the movie channel for this purpose.)
init:
image movie = Movie(size=(400, 300), xalign=0.5, yalign=0.5)
label movie_sign:
scene black
show movie
play movie "incubus.mkv"
"Wow, this movie is really terrible."
"I mean, it stars William Shatner..."
"... speaking Esperanto."
"MAKE IT STOP!"
stop movie
hide movie
"Thats... better."