Gif file itself is not compatible with Rpg Maker. you have to use plugins and a .png file that will be used like gif by plugins. there are bunch of plugins you can search through internet.
for MP4, I know that there are basic function that you can add play the video by event. you can easily find it in Rpg Maker itself.