Videos are played in smaller resolution than the game

I have a problem -

As you can see, when video is being player, screen shifts to a smaller cube, and i don't really understand why.

I tried the solution offered by Dev_With_Coffee here - https://forums.rpgmakerweb.com/index.php?threads/show-movie-and-fullscreen.180497/#post-1533514

It sort of works, but videos are being stretched vertically a lot, while still being smaller than needed horisontally.

The video resolution is actually higher than the game. I tried making a matching one, but still play video command shrinks the observable screen.

Is there a way to make it match the screen? So there would be no changes when video is played.
we need some numbers before we can even guess what's happening.

what is the screen size of the game screen, and what is the screen size of the video?
which player(s) have you tried to use (default or plugin?)

The engine cannot display a video that has a greater screen size than the game screen, if that is tried the result is either nothing or a resized video depending on the player code.

As a side note, those numbers are always screen sizes, never resolutions. technically a resolution is something with dpi (dots per inch) or ppi (pixels per inch): a single number, never an area of two numbers. And that difference may become important when discussing display- or video formats.
So it's better to clear that up in advance.
This doesn't make sense, because the Video Element will always follow the Canvas Element...
So using this would adjust it vertically and horizontally:
CSS:
video {
    object-fit: fill;
}

The only plausible explanation is that the video has these borders, that is, they are not the borders of the player (HTML tag for video):
njh1ue1.png

That's exactly why I explained before about the auto-adjustment of the width, if it were like that we would at least see the sides of the video touching the limit of the Canvas
what is the screen size of the game screen, and what is the screen size of the video?
which player(s) have you tried to use (default or plugin?)
The size of the screen is default. Just fullscreened. I haven't changed anything. But i don't know how to say exact numbers, i know only default resolution. Or you want to know the size of my monitor? Because i am not sure about that either, but 1920x1080 is recommended resolution for me.
Video size is also 1920x1080
The only plausible explanation is that the video has these borders, that is, they are not the borders of the player (HTML tag for video):
Yes, you are correct, that video had borders. And for some reason i cannot remove them in video editor, no matter how i crop the video, the borders still remain...

However, there are other videos without borders i did tests with, and same problem occurs for them as well. Here is, for example, one of the videos without borders at all -

And here how it looks in game when i modify fonts like you suggested -

As you can see, vertical borders are removed, but horisontal are still there. So the video is distorted.
So basically your topic is resolved, since it's not a problem in RPG Maker.

Regarding video editing, I use Movavi 15, but to be honest, I would prefer to create that effect with Pictures or battle animation.
i know only default resolution.
what you call a resolution is the screen size, the term resolution for values like 540x480 is technically wrong.

and you stilol haven't told the screen size of the video's you're trying to display (right-click the videofile, properties and then details to get the screen width and screen height) or which player you're using (the default play movie event command or a video plugin?)
So basically your topic is resolved, since it's not a problem in RPG Maker.

Regarding video editing, I use Movavi 15, but to be honest, I would prefer to create that effect with Pictures or battle animation.
How is it resolved, if the video without borders is still displayed with borders?

I also use Movavi. I don't know why i can't edit borders out of that one, but like i said - there are other video without borders that is also displayed incorrectly, so the issue has to be with RM.

and you stilol haven't told the screen size of the video's you're trying to display (right-click the videofile, properties and then details to get the screen width and screen height) or which player you're using (the default play movie event command or a video plugin?)
1760942287350.png


The player is default.
How is it resolved, if the video without borders is still displayed with borders?
because no form of video editing can change the aspect ratio without distorting the image.

Example:
Take a single screenshot of the video, use any image program to increase its horizontal size to the one needed for your screen width without distortions, then try to see it: instead of black borders to the left and right, part of the picture on top and bottom will be cut off because that part (sky and grass) no longer fit the screen completely.

you could check the same with windows photo display (or however that program is called in your language: try to find a zoom that fits your screen and you'll see that that is impossible, either the zoom is to low (and and the picture doesn't reach from left to right) or the zoom is too high (and top and bottom are cut off).
because no form of video editing can change the aspect ratio without distorting the image.
But the aspect ratio from the video and from my screen are the same?
And in RM it should be even lower due to default resolution. So how it happens that the video that is by default bigger than the RM resolution is actually appear smaller in game?

To be clear, i just want the videos displayed in game to cover all playable screen. Don't even mind the borders, but i want it at least to be the same size as the screen with gameplay. Is it possible?
But the aspect ratio from the video and from my screen are the same?
no, they are not.
We can see that the video you linked has an aspect ratio of 4:3, that is what causes the black areas to the left and right.

And the RM has a default aspect ratio of 4:3, your monitor does not change that, you would have to change the game screen size with a plugin to solve that.
no, they are not.
We can see that the video you linked has an aspect ratio of 4:3, that is what causes the black areas to the left and right.

And the RM has a default aspect ratio of 4:3, your monitor does not change that, you would have to change the game screen size with a plugin to solve that.
So there is no way to edit the video to make it match game screen? The only solution is to change the game screen?
So there is no way to edit the video to make it match game screen?
your choice would be to either create new data to fill the black areas, or to cut away part of the top and bottom after increasing the size to fill everything from left to right.

the stretch you've already seen is exactly what will happen if you try to fit everything into the wrong aspect ratio without changing the data.
your choice would be to either create new data to fill the black areas, or to cut away part of the top and bottom after increasing the size to fill everything from left to right.

the stretch you've already seen is exactly what will happen if you try to fit everything into the wrong aspect ratio without changing the data.
But can i do that? Stretch it into valid aspect ratio? If yes, then how? And to which one? I would like to at least test it how it will look like.

I just still not understand it. I made the video based on screenshot that was made in full screen. So it's the same size as game shows it to me. But then when i import it into the game, it is simply smaller than game's screen, both horisontally and vertically. Like the game window became smaller.

If i use the screenshot via show picture command, it will work just great. But when it's transformed into a video it becomes smaller? That's just breaks my brain, i don't understand it.
you CANNOT stretch a video into a different aspect ratio.
How often do we have to write that for you to understand?

To change the aspect ratio you either have to create new data (by giving the video/picture to an artist to add new parts to the left and right) or cut away part of it from top and bottom.
Because the problem is only with this video and not with RPG Maker, the video editing was done by you and some software not mentioned in this request. I advised you to use a software I always use...
In closing, the issue regarding RPG Maker was resolved in the other thread, meaning the problem isn't with RPG Maker now.
So, it's understood that this is the place to ask for help with RPG Maker, and that part has been resolved.
If you show me a screenshot of the video editor, maybe I can guide you.
by the way - this is where you went wrong:
I made the video based on screenshot that was made in full screen. So it's the same size as game shows it to me.

Full screen is NOT the game screen, full screen means "zoom the smaller window to your monitor screen size".
And then you commanded your video software to create a video on monitor size despite the screenshot being of a different size and aspect ratio.

If you had told the video software to make the video in the game's screen size (which is much smaller than your monitor screen size), then it would have worked exactly like with the screenshot
If i use the screenshot via show picture command, it will work just great.
Having the video with the proper width/height is preferable over stretching the video or making changes with it using html/js/css/etc.

(Not sure if the others covered this already - haven't fully checked out the links/posts)

In any case, assuming you are using the normal "Play Video" event command or using the basic video player in MV/MZ, one possibility I can think of is running this code in a script call when playing your video (run the script call before playing the video or during the video being played so you can see it - use DevTools to see the difference if it is working):
JavaScript:
const s     = Graphics._video.style;
s.objectFit = 'cover';
s.minWidth  = '100%';
s.minHeight = '100%';

Hope this helps.
one possibility I can think of is running this code in a script call when playing your video
It's actually very simple, changing the game's own CSS without needing to create a plugin that modifies the video player.
I showed it here in this thread 😉

This doesn't make sense, because the Video Element will always follow the Canvas Element...
So using this would adjust it vertically and horizontally:
CSS:
video {
object-fit: fill;
}
The only plausible explanation is that the video has these borders, that is, they are not the borders of the player (HTML tag for video):
Having the video with the proper width/height is preferable over stretching the video or making changes with it using html/js/css/etc.

(Not sure if the others covered this already - haven't fully checked out the links/posts)

In any case, assuming you are using the normal "Play Video" event command or using the basic video player in MV/MZ, one possibility I can think of is running this code in a script call when playing your video (run the script call before playing the video or during the video being played so you can see it - use DevTools to see the difference if it is working):
JavaScript:
const s     = Graphics._video.style;
s.objectFit = 'cover';
s.minWidth  = '100%';
s.minHeight = '100%';

Hope this helps.
You know what? THIS IS WORKING! Exactly as i needed! Hovewer, there are problem.

As you can see, at the start of the video green artifact appears. It is always the same. And it also spreads to all other videos played after. Do you know what that is and if there is a way to get rid of it?

If you had told the video software to make the video in the game's screen size

What is it? I am a bit lost since you talk about aspect ratios as well and i don't know much about that. Can you please teall exact parameters of the video that would perefctly fit the RM and will take full screen instead of making picture smaller?

It's actually very simple, changing the game's own CSS without needing to create a plugin that modifies the video player.
It does not give the same effect. Please, compare to the movie above:

In this variant the image is stretched upwards.
But with solution by Bass2yang it looks exactly as the game. And that is what i need. If only there is a way to remove the artifact...
As you can see, at the start of the video green artifact appears. It is always the same. And it also spreads to all other videos played after. Do you know what that is and if there is a way to get rid of it?
You could try marking it with css instead and forcing a few other attributes of the video to see if it makes a difference (edit: try removing the 'object-fit: fill' if you still have it):
CSS:
video {
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
 }

I am assuming the green artifact is probably an issue with stretching the video that is compressed a certain way. Check your settings as well. Is it an mp4 or a webm file?

Stretching it is most likely the cause since we are doing a lot more to the video now. I am also assuming that your video plays fine before it is used in RPG Maker.

Hopefully there aren't any other plugins affecting it.

Currently, this CSS code (and the JS code I gave you) is working fine for my videos - no artifacts or distortion.

Edit: Do note that if you are using my code and also using the "object-fit: fill" code, you might be trying to make it do two things since 'fill' can cause a distortion as well. You will need to remove that part of the css code and see if that helps.

Original thread: https://forums.rpgmakerweb.com/threads/videos-are-played-in-smaller-resolution-than-the-game.180600/