Well if you can construct programatically commands like "d:\\ffmpeg -i ..." and they work from the command line (which would be the place to test them) then there should be no problem launching them from system().

What makes you think the memory used by ffmpeg won't be freed?