Ren'Py Resizing videos from 1080p to 720p but they are not scaling to display in the full game screen

Kondorito

Member
Feb 10, 2020
167
455
Hello everybody,
I have a potato Mac that in some rare cases it struggles with playing videos within Renpy without choppiness.
I realized that it is because the 1080p resolution, because I resized with Handbrake one of the webm to 720p to test it out, and it plays beautifully in-game, but it is not resizing to fit in the entire game screen.

Captura de Pantalla 2024-07-12 a la(s) 21.26.38.png

Does anybody know if there is a variable/value or something I should check within one of the rpyc or rpy files that is either restricting the video to stretch and fit, or either something I could add in a file for videos to take the full game screen?

Thanks!
 

LightmanP

Well-Known Member
Modder
Game Developer
Oct 5, 2020
1,671
15,504
You need to set the size argument for to size=(1920, 1080) (needs to match the game resolution) wherever they are defined in the game.
 
  • Like
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,355
15,268
You need to set the size argument for to size=(1920, 1080) (needs to match the game resolution) wherever they are defined in the game.
And like what OP said make me think that it's a game he's playing, not one he made, this mean editing all the rpy files. While leading to video a bit bigger, or of less quality, increasing the compression factor without changing the resolution, stay the easiest way to solve the issue.
 

Kondorito

Member
Feb 10, 2020
167
455
Thanks guys; yeah, it is one I am playing, so touching the code might be difficult.
I tried compressing the videos and decreasing the quality but maintaining the resolution, but I just saw improvement in the fluidity when the quality was very compromised already.
I will try playing a little bit more on the videos quality keeping 1080p, to see if I can find the sweet spot.
anne O'nymous do you know what can be added to the rpy files and to which ones? I can batch the process to add them to all the required rpy files so I don't mind doing it if it is a generic command and not one specific per video file
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,355
15,268
anne O'nymous do you know what can be added to the rpy files and to which ones?
I don't want to be harsh, but the simple fact that you ask is the proof that you should not do it.
The answer to your what/where question is in LightmanP post. What is to add is, the resolution that need to be used to display the movie, and where to add it is "everywhere a movie is defined.
 

Kondorito

Member
Feb 10, 2020
167
455
No worries, and you are not being harsh :)
I will check LightmanP link and otherwise try to change around some settings in handbrake for a 1080p video. Thanks again.

EDIT:
Ok, I managed to kinda resolve this issue by reencoding the webm videos with VP8 instead of AV1 (as it seems it's less CPU intensive), and reducing the bitrate a little. I kept the 1080p resolution.
The quality got hit, but at least the videos are now going at almost a steady fps.
 
Last edited: