Godot Version
v4.2.1.stable.mono.official [b09f793f5]
Question
I’d like to record looping videos showing character models and animations playing in Godot, using the game’s lighting and shaders, and unlike the game project itself I’d like these videos to have a square aspect ratio.
Currently, my project is configured to normally have a window size of 1280x720 and has stretch mode set to “disabled”:
I set up the root node of a scene like so, expecting this window size to be used for the recorded video:
extends Node3D
@export var window_override: bool = true
@export var window_override_size: Vector2i = Vector2i(512, 512)
func _enter_tree():
if self.window_override:
self.get_window().size = self.window_override_size
Here’s what it looks like when the game is running, as expected:
But here’s what it looks like in the recorded video. It strangely has a resolution of 512x1024 instead of 512x512, and is stretched on the vertical axis:
How can I fix this? The video resolution is as expected if I overwrite the project-wide settings, but it seems very tedious and unnecessary to do this any time I want to create a video this way. Is there something else I can do to set the resolution programmatically, or at least set a different resolution for movie mode?