godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

VideoPlayer feature - frame size of ogv video into Godot to fix SubViewport #9028

Open catafest opened 9 months ago

catafest commented 9 months ago

Describe the project you are working on

A 3D dynamic game with animated scenes that tell a story using an OGV file.

Describe the problem or limitation you are having in your project

I try to implement an animated story in the game, maybe with cut scenes or animation movies. I made a simple test and need to set the Size and size of 2D Override from SubViewport to see the entire OGV video played by VideoPlayer. for an OGV with 960x400 I need to set Size 2D Override up 2880x800 by testing step by step

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I think it is much better that Godot gets the size of the frame from the video and sets it. This will avoid setting the Size 2D Override manually.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

When is open the OGV file in Godot the frame size of the video is used to show the video in SubViewport without making changes in 2D Override from SubViewport.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I think this cannot be easily used with few lines of source code.

Is there a reason why this should be core and not an add-on in the asset library?

because will need to get the size of the frames when will open the file

Calinou commented 9 months ago

I don't think Godot should implicitly change the size of a subviewport based on its contents.

for an OGV with 960x400 I need to set Size 2D Override up 2880x800 by testing step by step

Something is off in your calculations (or your stretch mode settings). Can you upload a minimal reproduction project?