Ren'Py Renpy Movie Issue

Apr 5, 2020
8
0
Hello,

I'm in the process of developing my first game using Ren'Py, and I'm encountering some difficulties in grasping the proper method for playing a video. I've experimented with both options recommended in the tutorial, but I'm facing distinct issues with each.

Code:
image movieName = Movie(loop = False, image = "bg scene_01_v1a", play = "Scene_01_V1.webm")

show movieName
Using this method, the video clip is visible but skips numerous frames, displaying roughly 3/4 frames out of the total 27.
I've tried using scene with dissolve instead of show and it helps but I would rather have the full clip displayed.

Code:
$renpy.movie_cutscene("Scene_01_V1.webm", stop_music=False)
This method functions effectively and displays the entire video, but upon reaching the end, it abruptly returns to the previous scene before transitioning to the next one.

Is there anyone who can provide guidance on resolving these problems?
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
The problem is not with the code and how you are showing it, but with the movie itself.
How are you creating the movie, and how long is it?
 
  • Like
Reactions: anne O'nymous
Apr 5, 2020
8
0
I initially created them using After Effects, generating MP4 files. However, I later discovered that these files were not supported. So, I used HandBrake to convert them into WebM files. Initially, I suspected the issue was with the files when I used the first method. However, after trying the second method and observing that it displayed correctly, I ignored that idea. This movie is 27 frames.
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
4,940
7,261
I initially created them using After Effects, generating MP4 files. However, I later discovered that these files were not supported. So, I used HandBrake to convert them into WebM files. Initially, I suspected the issue was with the files when I used the first method. However, after trying the second method and observing that it displayed correctly, I ignored that idea. This movie is 27 frames.
With the first method, if you rollback, does it still behave the same way?
 

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,655
15,197
Do you even have pause when you use show?
Previous image shows after a cutscene because that's what's underneath it. You can do 'scene black' before it.
 

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
4,576
7,560
Try this:

Code:
image aniname = Movie(play="images/ani/ani1.webm", loop=True, start_image="images/ani/aniname_060.png", image="images/ani/aniname_119.png")
Some notes for the above code. If it's not a looping animation, change loop=True to False. "start_image" should be the first image of the animation and "image=" should be the last. This prevents the black/checkerboard background from appearing. So, now that you have your animation defined as an image, you can play it as if it were a regular render. Like so:

Python:
scene render 3 with dissolve
mc "blah blah blah!"
li "blah blee blah!!"
#animation starts here
scene aniname with dissolve
pause
scene render 4 with dissolve
mc "blahhhh!!!!!!!!"
Edit: Also, try adding the directory the files are in just to eliminate that as a variable.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,132
14,815
The problem is not with the code and how you are showing it, but with the movie itself.
I second this.
Strictly speaking there's no difference in the way Ren'Py display a movie whatever if it's a displayable or a cutscene. Therefore there's no reason for one to skip frames and not the other. At least, no reasons except the movie itself.
 
Apr 5, 2020
8
0
Do you even have pause when you use show?
Previous image shows after a cutscene because that's what's underneath it. You can do 'scene black' before it.
Hey LightmanP,
I'm using "scene" instead of "show," but you've hit the mark; the pause was the issue with the first approach. With it, it doesn't cut the frames anymore.

Regarding the second approach, I used 'scene black,' and it no longer displays the initial scene, which is an improvement. However, occasionally, it does display a black screen, although not consistently. Is there a method to expedite the appearance of the black screen to make it less noticeable? (which already happens at times, even though I cannot explain why)


Try this:

Code:
image aniname = Movie(play="images/ani/ani1.webm", loop=True, start_image="images/ani/aniname_060.png", image="images/ani/aniname_119.png")
Some notes for the above code. If it's not a looping animation, change loop=True to False. "start_image" should be the first image of the animation and "image=" should be the last. This prevents the black/checkerboard background from appearing. So, now that you have your animation defined as an image, you can play it as if it were a regular render. Like so:

Python:
scene render 3 with dissolve
mc "blah blah blah!"
li "blah blee blah!!"
#animation starts here
scene aniname with dissolve
pause
scene render 4 with dissolve
mc "blahhhh!!!!!!!!"
Edit: Also, try adding the directory the files are in just to eliminate that as a variable.
Thanks, MissFortune, the example really helped me understand the correct structure!!

I second this.
Strictly speaking there's no difference in the way Ren'Py display a movie whatever if it's a displayable or a cutscene. Therefore there's no reason for one to skip frames and not the other. At least, no reasons except the movie itself.
Hey anne O'nymous, that was my initial impression as well, but then I used the same movie clip used in the tutorial, and I encountered the same problem. That's when I've realized that the problem originated from the code. But at least now I know how to do it ^^

Thanks everyone for the help!!