Making a Video Codec and Player for a game engine, from scratch