Where to put video when using "cutscene"?

MrPocketRocket

Pecker PI
Game Developer
Apr 30, 2023
186
902
So I'm trying to place my video clip where renpy can find it. Currently it is in images folder.

I'm using this line of code and I obviously need to direct to find the file.

right now this is is,:

$ renpy.movie_cutscene("ch1s13first.webm")

Thank you!
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,120
2,783
So I'm trying to place my video clip where renpy can find it. Currently it is in images folder.

I'm using this line of code and I obviously need to direct to find the file.

right now this is is,:

$ renpy.movie_cutscene("ch1s13first.webm")

Thank you!
You don't have permission to view the spoiler content. Log in or register now.

Okay, I realize I answered more than you asked. Well, just add a movies folder in your game/ folder and put them in there, then change your playing line to movies/ch1s13first.webm and it should work. If you want to stuff them in the main images folder, replaces movies with images...
 

MrPocketRocket

Pecker PI
Game Developer
Apr 30, 2023
186
902
Okay, I realize I answered more than you asked. Well, just add a movies folder in your game/ folder and put them in there, then change your playing line to movies/ch1s13first.webm and it should work. If you want to stuff them in the main images folder, replaces movies with images...
Works like a charm. It's so simple and I watched all these youtube videos, but they just seemed to complicate things.

Big thanks!
 

Deleted member 2282952

Developing I SCREAM
Game Developer
May 1, 2020
416
868
I just do this

image [name] movie = Movie(channel="name", play="path", size=(config.screen_width, config.screen_height))
show [name] movie

Similar to Nicke, but with screen size and channel
 

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
4,661
7,678
Both answers are correct, but the way they're being presented will create a quick black or transparent (drawing a blank on the name, I'm referring to the white and gray squares.) background for a moment in between the render and animation. So, you'll want to include the first and last images of the animation. Especially so for loops.

Something like:

Python:
image ch1s13first = Movie(play="images/s01e01/ani/ch1s13first.webm", loop=True, start_image="images/s01e01/ani/filename_060.webp", image="images/s01e01/ani/filename_119.webp", framedrop=False)
Insert the proper paths for your files, change the names as needed, and you'll have a working animation without having to fuck with Cutscene. If it's not a loop, then just change it to "loop=False".

Then in your script file (or wherever your dialogue and such is), just add it as you normally would for a new render/image.

Python:
scene xxx1 with dissolve
mc "Hi, my name is Connor, let's fuck."
m "Connor. . .I'm your mom."
mc "Not if we use our imagination!"
window hide
scene ch1s13first with dissolve

image [name] movie = Movie(channel="name", play="path", size=(config.screen_width, config.screen_height))
Size is nearly entirely unnecessary unless you're making a 4K version of your VN or something of the nature. You should be downscaling everything (except for the main menu, perhaps.) to 1080 before releasing anything.
 

Deleted member 2282952

Developing I SCREAM
Game Developer
May 1, 2020
416
868
Both answers are correct, but the way they're being presented will create a quick black or transparent (drawing a blank on the name, I'm referring to the white and gray squares.) background for a moment in between the render and animation. So, you'll want to include the first and last images of the animation. Especially so for loops.

Something like:

Python:
image ch1s13first = Movie(play="images/s01e01/ani/ch1s13first.webm", loop=True, start_image="images/s01e01/ani/filename_060.webp", image="images/s01e01/ani/filename_119.webp", framedrop=False)
Insert the proper paths for your files, change the names as needed, and you'll have a working animation without having to fuck with Cutscene. If it's not a loop, then just change it to "loop=False".

Then in your script file (or wherever your dialogue and such is), just add it as you normally would for a new render/image.

Python:
scene xxx1 with dissolve
mc "Hi, my name is Connor, let's fuck."
m "Connor. . .I'm your mom."
mc "Not if we use our imagination!"
window hide
scene ch1s13first with dissolve



Size is nearly entirely unnecessary unless you're making a 4K version of your VN or something of the nature. You should be downscaling everything (except for the main menu, perhaps.) to 1080 before releasing anything.
Neat trick, will check it out.

config is important to prevent any accidental mishaps with sizing, I tend to do relative to screen size, just in case.

True about downscaling, but you have to admit that saying your stuff is 4k sounds 'cooler' than 1080p. Kind of depends on the file size, as long as it doesn't get too much out of hand. More of an exercise to balance compression and downscaling after you are done with everything. At least in my opinion - would be interested to hear more.
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,120
2,783
Both answers are correct, but the way they're being presented will create a quick black or transparent (drawing a blank on the name, I'm referring to the white and gray squares.) background for a moment in between the render and animation. So, you'll want to include the first and last images of the animation. Especially so for loops.
Are you sure? Because that happens to me if I don't show/hide the webm under a scene with the first frame of the animation as the scene image. But when I do as I've set it up now, I've never seen the glitching blank image.
 

MissFortune

I Was Once, Possibly, Maybe, Perhaps… A Harem King
Respected User
Game Developer
Aug 17, 2019
4,661
7,678
Are you sure? Because that happens to me if I don't show/hide the webm under a scene with the first frame of the animation as the scene image. But when I do as I've set it up now, I've never seen the glitching blank image.
As far as I'm aware, there's (depending on the transition speed and/or transition used) a short second between the last render and the first frame of the animation showing up. And since there's likely nothing to show, it'll show the black or transparent background (if I recall, it depends on the version of Ren'py? Don't quote me on that.). Which is why filling in those spaces with the first and last frame of the animation makes it come through a bit more seamless.

That being said, I haven't tried it the way you mentioned, so I can't really say one way or the other if it's right or wrong. Not that there's necessarily a right or wrong way to do it, in this case.
 

Nicke

Well-Known Member
Game Developer
Jul 2, 2017
1,120
2,783
That being said, I haven't tried it the way you mentioned, so I can't really say one way or the other if it's right or wrong. Not that there's necessarily a right or wrong way to do it, in this case.
What I do is:
scene an_image <- still image of the first frame of the animation
show animation <- webm movie
"text or pause or both etc"
hide animation

move on to next scene

Essentially we're doing exactly the same thing, making sure there is an image behind the animation. Just slightly different methods. Ending with the last image probably doesn't matter as a looping animation could be ended anywhere in its loop. At least I've never seen a glitch this way. :)
 

MrPocketRocket

Pecker PI
Game Developer
Apr 30, 2023
186
902
Ok I'll try one of the other techniques next video. Cut scene seems clunky and unintuitive as it only does one thing: plays the video. But for now it will serve the purpose.

Thanks!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,235
14,996
[...] the way they're being presented will create a quick black or transparent (drawing a blank on the name, I'm referring to the white and gray squares.) background for a moment in between the render and animation.
Regarding this particular part, the checked background only happen when the developer mode is enabled (what happen automatically if you launch the game from the SDK).
Since some people (unren users by example) enable it, it's recommended to add define config.transparent_tile = False somewhere in your production code. This force the background to black whatever if the developer mode is enabled or not.
Of course it don't solve the issue you pointed, and the two arguments you defined are the solution. But it solve some other issues that can happen time to time.


Edit:

Oops, missed that:
Code:
window hide
There's few configuration variables that make this totally useless. Ren'Py can handle the hide/show automatically for you.
It's past 1AM here, so my brain don't help me, but I talked about it recently somewhere in this part of the forum. Probably a thread with an explicit name, but I'm not sure.