Injecting into a running program to grab the frames doesn’t sound like a trivial task and it won’t work by simply open an executable.
I would recommend to create the frames by a capturing software e.g. fraps while your game is running.