Renpy 8.0.2 VP9 framerate issues

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
lsf22
Regular
Posts: 98
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Renpy 8.0.2 VP9 framerate issues

#1 Post by lsf22 » Wed Aug 17, 2022 11:41 am

Renpy version: 8.0.2.22081402

VP9 encoded webm animations are not playing correctly in Renpy. It is not the webm vp9 encoded animations fault as it has been tested with another program and it plays fine. A same animation but encoded with VP8 works correctly. Why does VP9 a more recent and supposed improvement not work correctly with Renpy?

User avatar
PyTom
Ren'Py Creator
Posts: 15892
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#2 Post by PyTom » Wed Aug 17, 2022 6:13 pm

Do you have a small game that demonstrates the problem?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

lsf22
Regular
Posts: 98
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#3 Post by lsf22 » Wed Aug 17, 2022 8:43 pm

The game is not small. I noticed because I have made 2 versions of the same animation. One was made with VP8 encoding and the other with a VP9 encoding. The VP8 encoded version plays seemingly plays fine unlike the VP9 version which has a very noticeable frame rate lag.
Attachments
VP8 webm media info.png
VP9 webm media info.png

ReAnimator
Regular
Posts: 64
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#4 Post by ReAnimator » Wed Aug 17, 2022 11:08 pm

Maybe you can try to reduce the file size with VP9. It seems that is the only big difference.

User avatar
PyTom
Ren'Py Creator
Posts: 15892
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#5 Post by PyTom » Thu Aug 18, 2022 12:25 am

I mean, I'd like you to produce a game that has only the files in question, to make sure it's not some other portion of the game that's causing the problem. Assuming it's video playback that's doing it,
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3632
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#6 Post by Imperf3kt » Thu Aug 18, 2022 12:27 am

The vp9 file appears to use a far higher quantizizer, resulting in much higher bit rate and thus higher quality footage, but also severely more demanding on system resources.
Try reducing the quality of the file, or the bit rate, or increase the compression, both spacial and temporal, depending on what settings you used when encoding the file.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

lsf22
Regular
Posts: 98
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#7 Post by lsf22 » Thu Aug 18, 2022 5:55 pm

PyTom wrote:
Thu Aug 18, 2022 12:25 am
I mean, I'd like you to produce a game that has only the files in question, to make sure it's not some other portion of the game that's causing the problem. Assuming it's video playback that's doing it,
I have created a short Renpy game build of it with some animations. Hopefully I don't need to create much longer animations because they are taxing on my system. The drop in frame rates for VP9 might be more noticeable in some faster and longer animations. Also apologies for the awkward animations. Most of the animations from the software I use are mostly meant for hentai stuff.

The links are provided with MediaFire as the host to these test game builds.

Windows/Linux:
https://www.mediafire.com/file/9ibhl5pv ... c.zip/file

Mac:
https://www.mediafire.com/file/fjysuy4w ... c.zip/file


The files of the game are open so you can inspect the video animations yourself and of course the code.

ReAnimator
Regular
Posts: 64
Joined: Mon Dec 16, 2013 1:00 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#8 Post by ReAnimator » Fri Aug 19, 2022 12:20 am

Mmm, I don't see the difference. Both versions play well on my computer.
Though I think FPS should be 24 or 30 at most as it's just video?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3632
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#9 Post by Imperf3kt » Fri Aug 19, 2022 12:34 am

Taking a look your video files, the vp8 file is encoded with 0.045 bits of data per pixel resulting in a bitrate data stream of 9 976 kb/s Image

Whereas you vp9 encoded file is using a whopping 0.273 bits per pixel resulting in a bitrate of 62.8 Mb/s
Image

Thats a 506.6% increase in system resource use, which on my computer, caused no lag or other issues, but my PC is fairly high spec.

I suggest compressing the file further.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

lsf22
Regular
Posts: 98
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#10 Post by lsf22 » Mon Aug 29, 2022 4:23 pm

I made 2 more webm animations to test out and it's looks like it's something to do with VP9 playback. The VP8 animation is appears to play smoother and loop smoother than the VP9 animation with a lower bitrate.

I attached 2 images of the media info.
1 is a VP8 with a quality setting of 0 (Lower number = higher quality, from when it was encoded)
The other is a VP9 with a quality setting of 35 (Lower number = higher quality, from when it was encoded)
Attachments
vp9 webm info.png
vp8 webm info.png

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3632
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#11 Post by Imperf3kt » Mon Aug 29, 2022 9:25 pm

Very odd then.
As I noted before, the game worked fine for me, no lagging or odd behaviour even with the larger file.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py

lsf22
Regular
Posts: 98
Joined: Wed Feb 23, 2022 9:43 pm
Contact:

Re: Renpy 8.0.2 VP9 framerate issues

#12 Post by lsf22 » Fri Sep 16, 2022 1:36 am

Imperf3kt wrote:
Mon Aug 29, 2022 9:25 pm
Very odd then.
As I noted before, the game worked fine for me, no lagging or odd behavior even with the larger file.
I have more animations you can test out with it so you can see the difference in how it plays. There are 4 animations, that are paired up with each other. x

"vp8_q0_a1" and "vp9_q0_a1" are one pair. The quality is on 0 (lower is higher, with 0 being highest quality).
"vp8_q35_a2" and "vp9_q35_a2" are another pair of animations that can be tested. (Quality of 35 for these pairs)

Since there is faster movement in the animations it helps being able to see the difference.

Link to animations for testing: https://www.mediafire.com/file/n5di04vr ... 1.zip/file

Post Reply

Who is online

Users browsing this forum: Google [Bot], LuckyT, Ocelot