Ren'Py Mod help: replace video with higher fps version doesn't work

flwqo

Newbie
Modder
Jun 6, 2021
81
94
I'm currently working on a mod to improve the visuals of a game here. I've successfully done the images, but the videos give me problem.
They're originally in VP9/webm format which I enhanced and interpolated from 30 -> 60 (120) fps.

When playback outside the game with a video player they correctly display at higher fps, but when viewed in-game they're lower fps, I think the original 30. Somehow, it seems like the game doesn't want to display them at higher fps.

The dev doesn't seem to know the solution, any one have any ideas?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,789
When playback outside the game with a video player they correctly display at higher fps, but when viewed in-game they're lower fps, I think the original 30. Somehow, it seems like the game doesn't want to display them at higher fps.
How are you doing ?
Do you add the videos or do you replace them ? If you add them, how do you do it, and do you change the extension or do you keep it ?
 

flwqo

Newbie
Modder
Jun 6, 2021
81
94
How are you doing ?
Do you add the videos or do you replace them ? If you add them, how do you do it, and do you change the extension or do you keep it ?
As far as I know, Renpy looks for files first before .rpa, which is how I added the images. I do the same for the video.
In other words, structure is: game\videos.rpa, where videos.rpa: film\*.webm
I simply add the file: game\film\test.webm, replacing that video I'm testing.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,111
14,789
As far as I know, Renpy looks for files first before .rpa, which is how I added the images.
Well, it's time to read the doc then...

Ren'Py proceed the files in alphabetical order (path included), and will use the last one found, period.

By example, between "images/movies/whatever.webm" and "movies.rpa", it's the second that will be proceeded last, and therefore its content that will be used.
 

flwqo

Newbie
Modder
Jun 6, 2021
81
94
Ren'Py proceed the files in alphabetical order (path included), and will use the last one found, period.
Thanks. I've read instructions to just add the new files which is why I did that.
Because, the images seems to load fine just adding it.
The thing is, I'm pretty sure my test video file did load because I inverted the colours to check the game was actually loading it, which it did, it just didn't playback at 60 fps.

Anyway it worked when I removed videos.rpa.
So I guess I have two options, either have remove videos.rpa under installation instruction, or repack my mod files as a new rpa file.
 
Last edited:

flwqo

Newbie
Modder
Jun 6, 2021
81
94
anne O'nymous Ok, something is seriously strange. I have no idea here:
  1. I extract all videos from .rpa. I replace one of the video with my test video. I repack back to the game. The video plays in 30 fps.
  2. I extract the rpa, this time I delete all videos except the one I replaced. Now the playback is 60 fps.
The same file plays in 30 or 60 fps depending on if that file is alone or not! Same thing here:
  1. Extract folder with videos from videos.rpa.
  2. Delete videos.rpa
  3. Add the video I enhanced to video folder. Overwrite/replace old video.
  4. Play the game. Video still display as 30 fps.
  5. Delete all other videos expect the new one I added.
  6. Play the game. Video now display as 60 fps.
Why would the game play the same video file as 30 or 60 fps depending on if it's "alone" or with other video files?!
Does Renpy save the fps of the first video it plays, and plays that fps for all the other videos?

Edit: Ok, confirmed. I interpolated the video just before my first test video to also use 60 fps. Now when I play them in-game in sequence, both display at 60 (120) fps. So to clarify:

If: 1.webm: 30fps, 2.webm: 120fps. Then playback: 1.webm: 30fps, 2.webm: 30fps.
If: 1.webm: 120fps, 2.webm: 120fps. Then playback: 1.webm: 120fps, 2.webm: 120fps.

Really strange... so hopefully it works if I enhance all videos. I hope I don't waste my time; it's going to take many days to process all the videos. I'll report this solved if everything works out.

Edit2: I believe the mystery is solved. The lower fps playback was caused by different things at different times, which is why it was so difficult in diagnosing. It was either incorrect add/path of modded files, or high cpu usage from higher fps videos resulting in stuttering.
 
Last edited: