Videos are played in smaller resolution than the game

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.
If you meant inputting this code into gamefont.css - it does the same effect, and same problem with green artifact (it only appears at the start of the video).

And of course i remove old code modifier, as well as your script, before trying new solution.

Videos are in WEBM, mp4 are not picked up by the MV, they are not displayed when you get to chose which movie to play. And yes, video plays fine before, and even without the modifications (just smaller, as i showed in the post itself).

Seems like game seems to have no issues at all with displaying stretched video (apart from green artifact, but when it disappears movies look just fine), maybe there are a way to modify videos instead of maker's code?
Can you please teall exact parameters of the video that would perefctly fit the RM
The default game screen size is 816x624 unless you changed it with a plugin
Seems like game seems to have no issues at all with displaying stretched video (apart from green artifact, but when it disappears movies look just fine), maybe there are a way to modify videos instead of maker's code?
can you test with another video? Just want to make sure as well. Maybe one with a better bit rate and not fully compressed.

I did not encounter any artifacts for my videos but I do think it is because we are doing a lot more to stretch the video.

Also try changing the "cover" to the word "fill" with the other min width and min height values.

Edit:
So like this:
CSS:
video {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
 }
Or this:
CSS:
video {
    min-width: 100%;
    min-height: 100%;
    object-fit: fill;
 }
The default game screen size is 816x624 unless you changed it with a plugin
But is that all? I believe you said that simply changing resolutions of the video is not enough. So i need the other parameter that is important.
Also try changing the "cover" to the word "fill" with the other min width and min height values.
No, both variants work the same.
Screenshot to make sure i haven't input it in wrong way -
1761044336891.png


It has the same green artifact on all videos btw.
In your package.json, put this in under "main": "index.html":
Code:
"chromium-args" : "--disable-accelerated-video",
Keep using the same "cover" or "fill" code I gave you and see if this does anything to it.
It has the same green artifact on all videos btw.
In your package.json, put this in under "main": "index.html":
Code:
"chromium-args" : "--disable-accelerated-video",
Keep using the same "cover" or "fill" code I gave you and see if this does anything to it.
Like this?
1761047055839.png

Changes nothing.

I also tried searching for video plugins, but most of them appear to be paid. Found one that is free for non-commercial - i can't link it because this forum automaticly turns it into an entire code link. But the name is VPlayer RPG Maker plugin (MV + MZ)

It plays the video fine, but it does seems to have the function to pause the game while doing so, so the rest of the event is playing out in background while it plays the video 🙁
But is that all? I believe you said that simply changing resolutions of the video is not enough. So i need the other parameter that is important.
yes

I asked for other values as well because in the beginning I had no idea what exactly was happening with your video, but you provided that info earlier.
It plays the video fine
Are you saying that the video works with this plugin?

Hm, I would have to say that there is something else also messing with the video then.

As stated earlier, the preferred way is to have the video be the same as the screen so you don't have to do all the stretching/etc stuff with html/css.

I hope it is not a gpu issue or something else. If you have any other plugins, try turning them off as well if you haven't done so.

Glad you got some progress at least - the last thing I can think of from here is that the gpu is doing something else with it when you force stretch/fit the video.

It is just hard to diagnose since I do not have any of those issues on my side and cannot recreate it, either.
Are you saying that the video works with this plugin?

Hm, I would have to say that there is something else also messing with the video then.

As stated earlier, the preferred way is to have the video be the same as the screen so you don't have to do all the stretching/etc stuff with html/css.

I hope it is not a gpu issue or something else. If you have any other plugins, try turning them off as well if you haven't done so.

Glad you got some progress at least - the last thing I can think of from here is that the gpu is doing something else with it when you force stretch/fit the video.

It is just hard to diagnose since I do not have any of those issues on my side and cannot recreate it, either.


Sadly if i can't figure out how to make game pause while video is playing in this plugin. Wait command could do, but since my game will be played via web, it can desynch easily...

And yes, video works, but not in the same way. I do not stretch it, i just input coordinates where it is showed, and it is showing the right size instantly, unlike standard player. So i feel like the issue is in standard rm player, however i still don't understand why this plugin can stretch it bigger without problems, and standard player cant.

Maybe someone knows other free video plugins i could try?

Also, can you please check your code with my video? Just to make sure its not an issue with the video.

Just downloaded it and played it with no artifacts or errors in game. I'm really wondering if it is a computer/graphics card issue when stretching the video.

Edit: Your video is 940x720 so if your game's canvas is anything else, it will automatically try to size it against the canvas. Try setting your game's canvas to 940x720 and see if that solves it (without all the stretching css/js stuff).
Also, can you please check your code with my video? Just to make sure its not an issue with the video.
Just downloaded it and played it with no artifacts or errors in game. I'm really wondering if it is a computer/graphics card issue when stretching the video.

Edit: Your video is 940x720 so if your game's canvas is anything else, it will automatically try to size it against the canvas. Try setting your game's canvas to 940x720 and see if that solves it (without all the stretching css/js stuff).
Already tried making the video 816x624. Not helped.
But the one i send you should not be 940.
This is it's properties in windows -
1761060907288.png

I downloaded it from my link and it still shows the same number. Where did you get yours?
Those are the numbers I got when I checked your video after downloading it with the link you sent.There is nothing for the properties so I had to use a program (Handbrake) to get the dimensions.

Edit: Whatever is handling the frame width and height is not transferring properly, or, you are trying to render it out as 1280x720 when the display/video itself is set to display at 940x720.
1761061735634.png
Edit:
So like this:
CSS:
video {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
 }
This makes sense, but perhaps instead of using 100% you should use static pixel sizes capturing directly from the game resolution via the Graphics object
This makes sense, but perhaps instead of using 100% you should use static pixel sizes capturing directly from the game resolution via the Graphics object
Good call - that could really help with it - I'm not as familiar with CSS so this is a new process for me haha. Thanks!
This would be possible only with Javascript manipulating the element's CSS, basically what you showed here:
JavaScript:
const s     = Graphics._video.style;
s.objectFit = 'cover';
s.minWidth  = '100%';
s.minHeight = '100%';
Or you could copy the information directly from Canvas:
Graphics._canvas.width
Graphics._canvas.style.width
This would be possible only with Javascript manipulating the element's CSS, basically what you showed here:

Or you could copy the information directly from Canvas:
Graphics._canvas.width
Graphics._canvas.style.width
With this code target video works without artifacts. Basicly perfect result!
Almost, because the next video still plays with artifact.
So, what i need now is the command to turn this script off. Reverse what is done. I would use it after this video (because the rest are played just fine and i need the solution only for this one). Is it possible? It would finally solve the issue for me.

I am still curious on what causes the artifacts, and why the new script call fixed the artifact only for this specific video, but not for the rest, but at this point just having a solution would be great.

Edit: Whatever is handling the frame width and height is not transferring properly, or, you are trying to render it out as 1280x720 when the display/video itself is set to display at 940x720.
That's weird, because i saved it in video editor with 1280x720. It should not make a mistake.
Also when i open it in various programs, for example - AVC, it shows 1280x720.
Maybe the soft you used to check is incorrect?
1761078896043.png
With this code target video works without artifacts. Basicly perfect result!
Almost, because the next video still plays with artifact.
So, what i need now is the command to turn this script off. Reverse what is done. I would use it after this video (because the rest are played just fine and i need the solution only for this one). Is it possible? It would finally solve the issue for me.

I am still curious on what causes the artifacts, and why the new script call fixed the artifact only for this specific video, but not for the rest, but at this point just having a solution would be great.


That's weird, because i saved it in video editor with 1280x720. It should not make a mistake.
Also when i open it in various programs, for example - AVC, it shows 1280x720.
Maybe the soft you used to check is incorrect?
View attachment 351679
That is interesting - had to go through hoops to just get this info haha. It is correct at 1280x720 - the issue is that all my other videos are the correct resolution too, just not this specific file. I had to convert it to something else (mp4) to see the width and height.

In any case, I'm glad the code is starting to work out.

Just to clarify, is this what you are doing? Or something similar?
JavaScript:
const s = Graphics._video.style;
const c = Graphics._canvas.style;
s.objectFit = 'cover'; // or 'fill'
s.minWidth  = c.width;
s.minHeight = c.height;
That is interesting - had to go through hoops to just get this info haha. It is correct at 1280x720 - the issue is that all my other videos are the correct resolution too, just not this specific file. I had to convert it to something else (mp4) to see the width and height.

In any case, I'm glad the code is starting to work out.

Just to clarify, is this what you are doing? Or something similar?
JavaScript:
const s = Graphics._video.style;
const c = Graphics._canvas.style;
s.objectFit = 'cover'; // or 'fill'
s.minWidth  = c.width;
s.minHeight = c.height;

Nope, this -
const s = Graphics._video.style;
s.objectFit = 'cover';
s.minWidth = '100%';
s.minHeight = '100%';
And the script you mentioned both does not work (the video is still smaller with it) and causes the artifacts.

Also, yeah... sometimes it is so hard to pinpoint the issue. Especially if it's an area you know nothing about. But i was lucky that your and Dev's combined efforts allowed to find a soliton even without fully knowing the cause. At least i hope so - it would be logically to assume that if there are script to change something, there should be also a call to restore the default parameters. But in any case you both did great job here.

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