Movies as Backgrounds

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
AfterForever
Newbie
Posts: 10
Joined: Thu Feb 06, 2014 1:05 pm
Contact:

Movies as Backgrounds

#1 Post by AfterForever »

I can't seem to find the answer to this question, but I apologize if I have overlooked it somewhere.

I'm trying to make a movie into a background in which the room is flashing red due to an alarm breach. This is the code I have so far:
"{i}Then a screeching noise fills my ears and a blinking red light goes off.{/i}"

image movie = Movie(size=(800, 600), xpos=0, ypos=0, xanchor=0, yanchor=0)
play movie "Movie2_libtheora.ogv" loop
show movie with dissolve

voice "377.mp3"

"{i}I cup my ears and glance around.{/i}"

voice "co2.mp3"

co "Intruder alert! Intruder alert!"

voice "378.mp3"

"{i}Intruder? What the hell?{/i}"

voice "379.mp3"

"{i}I turn and run back down the staircase and look to the other two doors.{/i}"

voice "380.mp3"

"{i}Feeling it would be unwise to hide in an unexplored room, I retreat back down the hallway I originally came from.{/i}"

stop movie
scene hallwayfourdoorsclosed background
with dissolve
Everything works save the movie won't play in Ren'Py. I've tried a few different movie types such as .mpg and .ogv, but none of them seem to work. The movie works in external players like VLC and Windows Media Player and I extended the length of the video just to make sure that the video wasn't playing too fast without my noticing.

I'm not sure if this is a coding error on my part, or if I messed up when making the video. Any advice is greatly appreciated.

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Movies as Backgrounds

#2 Post by SundownKid »


AfterForever
Newbie
Posts: 10
Joined: Thu Feb 06, 2014 1:05 pm
Contact:

Re: Movies as Backgrounds

#3 Post by AfterForever »

That's the code I've actually been referring back to, but it's still not working for me. :(

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Movies as Backgrounds

#4 Post by SundownKid »

Hmm, my bad. I have no idea what could be causing it then, since that technique worked for me. You might want to try the linked converter.

AfterForever
Newbie
Posts: 10
Joined: Thu Feb 06, 2014 1:05 pm
Contact:

Re: Movies as Backgrounds

#5 Post by AfterForever »

Thank you, SundownKid. Unfortunately, same result with the linked converter :(

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Movies as Backgrounds

#6 Post by xela »

Do you have sound in your movie? PyTom once said that Ren'Py is using soundtrack in the movie for syncing. If you want to run sound from mp3s in the game, simply add silence to your movie and it should work. If you already have sound, I am not sure what the issue is here... although I must admit that I've never actually ran a movie in Ren'Py even for practicing purposes :(
Like what we're doing? Support us at:
Image

User avatar
rakada
Regular
Posts: 71
Joined: Tue Jan 07, 2014 11:00 pm
Contact:

Re: Movies as Backgrounds

#7 Post by rakada »

i tested it out since it seemed interesting in a new project and it seemed to work fine for me so i think it possible that it could be the video at fault


# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image hallway ="hallway.jpg"


# Declare characters used by this game.
define e = Character('Eileen', color="#c8ffc8")


# The game starts here.
label start:

e "You've created a new Ren'Py game."

e "Once you add a story, pictures, and music, you can release it to the world!"


"{i}Then a screeching noise fills my ears and a blinking red light goes off.{/i}"

image movie = Movie(size=(800, 600), xpos=0, ypos=0, xanchor=0, yanchor=0)
play movie "zombie.mpg" loop
show movie with dissolve

"{i}I cup my ears and glance around.{/i}"

"Intruder alert! Intruder alert!"

"{i}Intruder? What the hell?{/i}"

"{i}I turn and run back down the staircase and look to the other two doors.{/i}"

"{i}Feeling it would be unwise to hide in an unexplored room, I retreat back down the hallway I originally came from.{/i}"

stop movie
scene hallway with dissolve

e " did it work"


return


if i had a copy of the video i could see if there something wrong with it :)
or just try that but put your (video in where the video name should go) in a new project and if it doesn't work then must be the video fault


reason it could not be working

1. the name doesn't match up in the coding
2. there no audio file with the video said above you need one even if it only silence
3. not very common but certain bitrates on certain video types seem to mess up when you put them into renpy

User avatar
rakada
Regular
Posts: 71
Joined: Tue Jan 07, 2014 11:00 pm
Contact:

Re: Movies as Backgrounds

#8 Post by rakada »

on a side note this a great idea for a tutorial game i was thinking of making i could just have a video in the background showing people how to do certain things
then have the audio of me talking people through it. then have the code of the game show it what it look like in the game
Last edited by rakada on Tue Mar 11, 2014 5:42 am, edited 1 time in total.

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Movies as Backgrounds

#9 Post by SundownKid »

xela wrote:Do you have sound in your movie? PyTom once said that Ren'Py is using soundtrack in the movie for syncing. If you want to run sound from mp3s in the game, simply add silence to your movie and it should work. If you already have sound, I am not sure what the issue is here... although I must admit that I've never actually ran a movie in Ren'Py even for practicing purposes :(
That could be the issue, I modified the Wiki so it won't be misinterpreted as removing the audio track entirely.

AfterForever
Newbie
Posts: 10
Joined: Thu Feb 06, 2014 1:05 pm
Contact:

Re: Movies as Backgrounds

#10 Post by AfterForever »

I'm thinking the problem lies in my computer or something of the like. My original video doesn't have any audio, but when I tried with a movie with audio, the video wouldn't play, but I could hear the video just fine. I also have a couple other movies in the game and those play fine when I use this:
image movie = Movie(size=(800, 600), xpos=0, ypos=0, xanchor=0, yanchor=0)
$ renpy.movie_cutscene("Movie1.mpg", delay=None, loops=0, stop_music=True)
but trying to use those same movies for the movies as backgrounds code don't work.

It's comforting to know that they work for other people and that the problem most likely is with me. I was having the same problem with some other codes, like the timed menu, but it worked for other people. Maybe installing Ren'Py on a newer computer will solve the problem?

AfterForever
Newbie
Posts: 10
Joined: Thu Feb 06, 2014 1:05 pm
Contact:

Re: Movies as Backgrounds

#11 Post by AfterForever »

So I moved the contents of my game to a new computer and the video works fine XD Thanks everyone for their help.

User avatar
rakada
Regular
Posts: 71
Joined: Tue Jan 07, 2014 11:00 pm
Contact:

Re: Movies as Backgrounds

#12 Post by rakada »

yay ^_^ congrats that good to hear :) good luck with your game

Post Reply

Who is online

Users browsing this forum: Google [Bot]