Need help to insert movie

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.
Message
Author
MisterMan
Newbie
Posts: 17
Joined: Mon Jun 13, 2011 1:51 pm
Contact:

Need help to insert movie

#1 Post by MisterMan »

I want to insert a movie in my renpy game. It's an avi file and it works well when I play it with windows media player. The problem is when I try to play it with renpy the audio works fine, but the video is blocked. The audio keeps playing but the video doesn't roll. I used the code

Code: Select all

$ renpy.movie_cutscene("Another Story.avi")
Do I have to define the movie or something? I don't know what I'm doing wrong. Please help.

bink
Regular
Posts: 49
Joined: Sat Jul 09, 2011 4:34 pm
Contact:

Re: Need help to insert movie

#2 Post by bink »

It's probably the format the movie is in that Ren'Py can't play. An avi file is only a container for video and audio tracks. The audio track it can decode and play, but not the video.
Ren'Py supports Theora, MPEG 4, MPEG 2 and MPEG 1, so you will have to convert it to one of those. How did you create the video? Maybe the program you used to edit it can export to one of those formats. If it can't, Google can probably help you find a converter that works with your operating system.

Efreet
Regular
Posts: 145
Joined: Sun Mar 02, 2008 5:21 pm
Projects: Denial, Guilt [On Hold]
Location: UK
Contact:

Re: Need help to insert movie

#3 Post by Efreet »

If you aren't able to convert it by yourself, Google for "Handbrake" which is a very decent video converter.

MisterMan
Newbie
Posts: 17
Joined: Mon Jun 13, 2011 1:51 pm
Contact:

Re: Need help to insert movie

#4 Post by MisterMan »

I've tried converting the video to all the movie types that renpy supports, but the video is still frozen. I don't know what else to do. Here's what I've done so far:
I've selected a youtube video and converted it with zamzar(a good converting site). The movie is frozen when I try playing it with renpy. Then I tried converting it to all the file types that renpy supports with AVS Video Converter. The movie is still frozen.

Does anyone have other solutions?

Efreet
Regular
Posts: 145
Joined: Sun Mar 02, 2008 5:21 pm
Projects: Denial, Guilt [On Hold]
Location: UK
Contact:

Re: Need help to insert movie

#5 Post by Efreet »

You selected a Youtube video using Zamzar? That might've been the problem. Looking at the website, there's no option as to what video format you can pick from Youtube. Having used the Firefox plugin DownloadHelper, Youtube videos can come in .flv formats but also in a .mp4 format. Furthermore, it seems you've done a conversion of a conversion... (To make it worse Youtube already converts files. =p)

Do you use Firefox? Or does your browser have a plugin that can download directly off Youtube? Can you play the downloaded video on your computer?

MisterMan
Newbie
Posts: 17
Joined: Mon Jun 13, 2011 1:51 pm
Contact:

Re: Need help to insert movie

#6 Post by MisterMan »

Yes I use firefox. But I don't have the plugin DownloadHelper. My firefox doesn't have a plugin that can download a video directly off youtube. That's why I used zamzar. Yes I can play the downloaded video.

What I like to ask is what to do. With what program should I download the youtube video and with what program should I convert it with?

Efreet
Regular
Posts: 145
Joined: Sun Mar 02, 2008 5:21 pm
Projects: Denial, Guilt [On Hold]
Location: UK
Contact:

Re: Need help to insert movie

#7 Post by Efreet »

Why don't you search for the DownloaderHelper plugin in your Firefox Add-ons tab and give that a go? (Chances are you'll be able to download the Youtube video as a .mp4/mpeg 4 file.) As I've mentioned before, Handbrake is a great and free video converter.

MisterMan
Newbie
Posts: 17
Joined: Mon Jun 13, 2011 1:51 pm
Contact:

Re: Need help to insert movie

#8 Post by MisterMan »

Ok. If I download the video with DownloadHelper it downloads it in mp4. If I put it like that in renpy it just skips it. It won't play at all. I've downloaded it in flv. The I converted it with Handbrake and if I put that in renpy the audio works but the screen is black and nothing happens. Am I doing anything wrong? Any other tips? Is it possible that there is something wrong with the video?

Can someone please tell me exactly the steps that I need to follow in order to insert a youtube video in renpy.

Please help!

AriaRules!
Regular
Posts: 36
Joined: Sat Aug 06, 2011 1:15 am
Projects: High School, for the Supernatural!
Organization: AriaGames
Location: In the closet (:
Contact:

Re: Need help to insert movie

#9 Post by AriaRules! »

Having the same problem, the exact same problem :(
Image

Efreet
Regular
Posts: 145
Joined: Sun Mar 02, 2008 5:21 pm
Projects: Denial, Guilt [On Hold]
Location: UK
Contact:

Re: Need help to insert movie

#10 Post by Efreet »

I wonder that the problem could be, though I do have a sneaking suspicion that taking Youtube videos will not work...

tentacle
Newbie
Posts: 20
Joined: Thu Feb 24, 2011 6:37 am
Contact:

Re: Need help to insert movie

#11 Post by tentacle »

I'm getting a black screen (audio plays), and the video is one of my own creation.
I've tried converting to theora and xvid with VLC, to mpeg4 and divx with virtualdub, to xvid with the simple xvid encoder that comes with it, to divx with mencoder, and to divx with the official divx encoder.
Always the same results, and always the videos work perfectly in VLC and other players.
I really have no idea what I could be doing wrong. Can someone name a converter/encoder that they regularly use that definitely works?

tentacle
Newbie
Posts: 20
Joined: Thu Feb 24, 2011 6:37 am
Contact:

Re: Need help to insert movie

#12 Post by tentacle »

Egads! Progress...
My source video's framerate was 60 FPS, I changed it to 30 and now it works, although it's very jumpy (in renpy, not anywhere else).
I guess renpy is quite picky. I will experiment more with other settings and see if I can find a working combo.

tentacle
Newbie
Posts: 20
Joined: Thu Feb 24, 2011 6:37 am
Contact:

Re: Need help to insert movie

#13 Post by tentacle »

Okay this seems to work, using VLC to encode.
Open VLC.
Select Media -> Convert/Save
In the window click Add and select your film.
Click Convert/Save.
Click Browse and select a destination.
Click the little icon with the tools, on the same row as Profile, next to the red X.
In the Encapsulation tab, select AVI.
In the Video codec tab, select Video, Codec=Theora, Bitrate=800, Frame rate=25.
In the Audio codec tab, select Audio, Codec=MP3, Bitrate=128, Channels=2, Sample rate 44100.
Then just Save, and Start.
I'm sure other options/codec/etc work too, but these worked for me. I think my problem was ultimately frame rate, and VirtualDub (whatever I do in virtualdub, the video ends up jumpy in renpy).
Note: my source video is exactly the same resolution as my renpy game (640x480), not that it should matter.

MisterMan
Newbie
Posts: 17
Joined: Mon Jun 13, 2011 1:51 pm
Contact:

Re: Need help to insert movie

#14 Post by MisterMan »

I'm afraid that for me it still doesn't work. The audio works but the screen is still black. Do I need different settings? Could you try doing those steps with a youtube video? I want to see if it's possible or not. What else should I do?

User avatar
Desu_Cake
Veteran
Posts: 300
Joined: Mon Aug 15, 2011 2:03 pm
Projects: Secret, Secret and Secret
Location: Ireland
Contact:

Re: Need help to insert movie

#15 Post by Desu_Cake »

What size is your video? I was having the same problem until I realised my video was about 100mb big. Reducing the size made it work perfectly, although now it's a bit fuzzy.

Post Reply

Who is online

Users browsing this forum: No registered users