I'm working on a web-based clone of the rhythm game StepMania, but I'm running into an issue with the background videos, which are in AVI format. Most web browsers can't decode these files, so I need to transcode them to MP4 for use in my game. I considered using ffmpeg.js, but it's quite large (24 MB), which is almost the size of my entire game. I'm looking for efficient offline methods to transcode these AVI files without increasing the size of my project too much. Any suggestions?
3 Answers
Why not just transcode the videos using software before including them in the game? On-the-fly transcoding seems unnecessary.
Why are you stuck on using AVI? Could you consider other formats instead? It might simplify things.
I'm cloning StepMania, which means I need to work with its files. Players download songs that often include background videos in AVI format, and unfortunately, most of them use DivX MPEG4, which isn't supported by HTML5 players.
Is it necessary to transcode in the browser? What about doing it server-side instead? It could save some hassle.
Using server-side options is tricky for my game. It's designed to work offline with NW.JS for desktop, but that won't work for Android since I’m using Cordova there. I need a solution that can handle video transcoding asynchronously without increasing my distribution size too much.

I’ll check out tools, but I was hoping to find a more flexible solution for future updates since some videos might need transcoding on the fly. Thanks for the suggestion!