Check out Blender. Very powerful, open source (FREE), does lots of stuff like animation, still renderings, and motion tracking. There's definitely a learning curve, but there are tutorials out there that can help you do what you're talking about.
I've used it to do exactly what you're trying to...