Ren'Py Renpy's videos are lower quality but higher quality outside of renpy

Jun 28, 2021
10
4
I've converted two videos but somehow they always end up lower quality inside Ren'py but when I play them outside of renpy the video quality is higher. I use handbrake and I don't know what to do
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,368
15,283
I've converted two videos but somehow they always end up lower quality inside Ren'py but when I play them outside of renpy the video quality is higher. I use handbrake and I don't know what to do
Hmm. Wild guess: The videos are played full size on a game that have a bigger size than them ?
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
I don't see any reason why the RenPy version would be any lower quality than the files they are playing.

Another way to check the details of the video is to load the file in and click Tools -> Codec Information from the menu bar (or press <CTRL+J>). That'll confirm what is telling you.

Only four possibilities occur to me at the moment.

Either, you have converted the files to be too low quality... Then are playing the converted version in RenPy but viewing the original (unconverted) version outside of RenPy. Unlikely I know... but I've personally done stupider things.

Or maybe, at some point you created lower quality versions of your videos and decided not to use them... but accidentally left them in a place RenPy can see them. Unless you are specifying the full path to the videos, RenPy will search folders like /game/ and /game/images/ automatically. I'm imagining a situation where there are two copies of the videos (perhaps in /game/ AND /game/videos/) and you're expecting it to play one, but it's actually playing the other. Consider doing a filename search for the video files to check.

Another possibility is due to RenPy switching semi-recently to a new display engine. Though I don't think it's switched on by default. Honestly, I'm pretty vague on this one. Perhaps you've enabled it and the new engine is bad at playing whatever codec you've used to encode your video. Consider trying (I keep hanging around). You can install multiple copies of RenPy and run whichever you please - just remember to do a Force Recompile from the Actions list of the launcher UI first.

My final thought is video codecs. h.264 is the standard workhorse of MP4 files. Though the newer h.265 is becoming more commonplace. h.265 can be pretty CPU intensive. Likewise if you've encoded things as .webm movies using VP9. Again VP8 is lower compression, but requires lower resources too. If you perhaps tried h.265 to try to squeeze the filesize even smaller, consider recoding the videos as h.264 on the Videos tab within Handbrake. A variation on this theme is that somehow you've managed to bollocks up your system's video codecs somehow. Try running your game on a different PC or laptop as a test.
 

Alcahest

Engaged Member
Donor
Game Developer
Jul 28, 2017
3,289
4,159
I've checked both videos in handbrake and they have the same display "Storage Size: 1280x720, Display Size: 1280x720, Aspect Ratio 16:9
That's not what he meant. If you view the videos in a 1280x720 video frame outside of the game, and then play the game with a bigger frame, like fullscreen 1920x1080, then quality will naturally look worse.