Skip to content

Window size changes when in Movie Mode aren't handled correctly #107316

@berarma

Description

@berarma

Tested versions

  • Reproducible in: 4.5dev5

System information

Debian GNU/Linux 12.10

Issue description

Running a project in embed mode at a different resolution than defined in the project, produces AVI files with incorrect resolution and aspect ratio.

The problem is that in embed mode, the initialization of MovieWriter sometimes receives the project viewport size, and sometimes the embedded viewport size. But the frames sent have always the embedded viewport size.

There was a similar error, same effect, different cause, that was reported in the forum and #71254.

Edit: The issue doesn't happen only in embed game mode, it can happen at anytime if we're not careful to avoid window size changes. We should probably think of a way to handle window size changes in movie mode, implement a way to prevent them, or warn the user when it happens. If the movie writer isn't prepared to handle resolution changes, it could even make Godot crash. See comments below.

Steps to reproduce

  • Open any project.
  • Make the viewport size in the Project Settings big enoough so that it has to be scaled down to fit the embedded window.
  • Enable Movie Maker mode.
  • Run the project.
  • Check the resulting video.

This might take several tries because it doesn't always happen. In my case it happens like 4 out of 5 times. It looks like a race condition between the embedded process and the MovieWriter initialization.

Minimal reproduction project (MRP)

Any project. The viewport has to be big enough to not fit the embedded window.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Bad

    Status

    For team assessment

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions