Movies playing in incorrect size

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
User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Movies playing in incorrect size

#1 Post by GlazeWasTaken »

Hello,

I made a post a while ago about adding a movie before the main menu pops up (which I now have working, though I do not have buttons on my main menu anymore, a question for another thread), but the problem is all of my movies that I have ever put into renpy play at the wrong size, despite me defining it. an example of my coding (for this movie in specific):

Code: Select all

label before_main_menu:
    image main_menu = Movie(play="movies/title.webmhd.webm", size=(1920,1080), loop=False, image="images/title screen logo.png")
    screen main_menu:
        add "main_menu"
What can I do to fix the movie size being displayed incorrectly, both for this function, and for functions like this:

Code: Select all

label splashscreen:
    scene black
    with Pause(1)
    $ renpy.movie_cutscene("movies/op.m2t")
    with Pause(1)
    return
I will also specify I am up to date, using Ren.py 7.3.5.
Last edited by GlazeWasTaken on Thu Jul 09, 2020 7:28 pm, edited 1 time in total.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Movies playing in incorrect size

#2 Post by Alex »

What's the game resolution?

In gui.rpy check the lines

Code: Select all

## Calling gui.init resets the styles to sensible default values, and sets the
## width and height of the game.
init python:
    gui.init(1280, 720)
Is it match the size of video? And could you attach the video file to let people test it?

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Movies playing in incorrect size

#3 Post by GlazeWasTaken »

Alex wrote: Sat Feb 01, 2020 3:44 pm What's the game resolution?

In gui.rpy check the lines

Code: Select all

## Calling gui.init resets the styles to sensible default values, and sets the
## width and height of the game.
init python:
    gui.init(1280, 720)
Is it match the size of video? And could you attach the video file to let people test it?
My gui.init is defined at (1920, 1080), as it should be, and does match the video file. The video files don't need to be tested, they all work and play normally, it is just the size issue.
Last edited by GlazeWasTaken on Sat Feb 01, 2020 6:55 pm, edited 1 time in total.

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

Re: Movies playing in incorrect size

#4 Post by Imperf3kt »

It may be the format, mt2 isn't mentioned in the documentation as supported.
https://www.renpy.org/doc/html/movie.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Movies playing in incorrect size

#5 Post by GlazeWasTaken »

Imperf3kt wrote: Sat Feb 01, 2020 4:55 pm It may be the format, mt2 isn't mentioned in the documentation as supported.
https://www.renpy.org/doc/html/movie.html
Wrong, m2t works and plays the video normally, and even if that were the case of it resizing because of that, that wouldn't explain why the webm one resizes itself despite being supported and defined at 1080p.

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Movies playing in incorrect size

#6 Post by Alex »

GlazeWasTaken wrote: Sat Feb 01, 2020 4:51 pm ...My gui.init is defined at (1920, 1080), as it should be, and does match the video file. ...
Well, the size of video is 1440x1080 pxls. And it looks like Ren'Py don't want to change aspect ratio of the video, so it stretches/shrinks the video to make one of width/height fit the size you've set and calculate the other measure to keep the original aspect ratio.

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Movies playing in incorrect size

#7 Post by GlazeWasTaken »

Alex wrote: Sat Feb 01, 2020 5:27 pm
GlazeWasTaken wrote: Sat Feb 01, 2020 4:51 pm ...My gui.init is defined at (1920, 1080), as it should be, and does match the video file. ...
Well, the size of video is 1440x1080 pxls. And it looks like Ren'Py don't want to change aspect ratio of the video, so it stretches/shrinks the video to make one of width/height fit the size you've set and calculate the other measure to keep the original aspect ratio.
I did just notice that, but even if I define the video as 1440x1080 and/or define the gui.init as 1440 it keeps squishing it. I will try and rerender it at 1080 proper and see what happens.

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Movies playing in incorrect size

#8 Post by GlazeWasTaken »

GlazeWasTaken wrote: Sat Feb 01, 2020 5:29 pm
Alex wrote: Sat Feb 01, 2020 5:27 pm
GlazeWasTaken wrote: Sat Feb 01, 2020 4:51 pm ...My gui.init is defined at (1920, 1080), as it should be, and does match the video file. ...
Well, the size of video is 1440x1080 pxls. And it looks like Ren'Py don't want to change aspect ratio of the video, so it stretches/shrinks the video to make one of width/height fit the size you've set and calculate the other measure to keep the original aspect ratio.
I did just notice that, but even if I define the video as 1440x1080 and/or define the gui.init as 1440 it keeps squishing it. I will try and rerender it at 1080 proper and see what happens.
Ok I am an idiot, resizing it fixed it. Thanks!

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

Re: Movies playing in incorrect size

#9 Post by Imperf3kt »

GlazeWasTaken wrote: Sat Feb 01, 2020 5:23 pm
Imperf3kt wrote: Sat Feb 01, 2020 4:55 pm It may be the format, mt2 isn't mentioned in the documentation as supported.
https://www.renpy.org/doc/html/movie.html
Wrong, m2t works and plays the video normally
"It works" and "It is supported" are not the same thing.
I learnt this the hard way when I first started using ren'py and an update stopped mp4 video from working.

That being said, m2t might be supported (even if not actually specified) since m2t stands for MPEG-2 Transport and MPEG-2 is listed as supported.
just be aware that MPEG-2 is a proprietary format that requires you to pay licensing fees.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: No registered users