i made this for penguinmod, but turns out, it's lightweight enough that it actually fits and runs well in vanilla scratch. a 3 minute, 30 fps video in just over 3 mb (as of 05/27, now just over 2 mb). i question my abilities as a programmer sometimes (if it's slow or laggy, run it in turbowarp)
UPDATE (05/27/26): i made it SMALLER and MORE EFFICIENT!! the encoded video is now 2.3 MB instead of 3.2 MB, thanks to my good friend: delta frames! now the renderer only draws the changes from the last frame (which is SO MUCH MORE FASTER), and if that's too big, it falls back to the original encoded frame. the drawbacks which seem to occur only on vanilla scratch is lag in certain areas and visual artifacting, but i'm sure that can be solved and i'm kinda lazy atm. anyways, original description below i tried out using pre-defined tiles arranged into mosaics to encode the video. this saves a ton of space and also just draws quicker in general! this was largely inspired by @Youtube-king's "Superfast videoplayer" and i even pulled the tiles from it, but they're originally from the discrete cosine transform table (thanks for doing the hard work of ripping them for me lol) and i have no idea how discrete cosine transform works, so i just wrote a python script to create a mosaic from the tiles this encoded video comes down at 3.2 MB (now 2.3 MB) compared to my first attempt's 6 MB, so yeah, that's definitely an improvement! the original bad apple video can be found here: https://www.youtube.com/watch?v=FtutLA63Cp8