How can I put videos without loss of game performance?

I’m planning to add short videos in MP4 format to my game, but I’m noticing that there are some slowdowns when the video plays. Also, even in MP4 the file size is still a little big, and I’m afraid the game will end up with too big a size after compiling. I’m trying to compress the videos but there’s a limit to how far I can do this. Any suggestions on how I can optimize the use of these cutscenes in Gdevelop?

Multiple factors make the size of a video: the size (resolution), the FPS, the duration, and maybe the encoding/compression (and the quality of the audio, if there is any).
Have you tried the video example project? Check if it runs smooth for you.