I was wanting to replace background with a virtual brick wall. The actor was moving so the wall behind him would also move slightly. So here is what i did.
Camera was on tripod. Actor was moving slightly around on the green screen. Camera followed him and always centered him in the shot. I then tracked some markers with Mocha on the green screen in order to follow movement. Exported and saved to Null Object. I then put a camera in AE enviornment added expression to the Camera and Null object. Deleted all the keyframe data in null object for rotation/scale and just kept movement. I then parented Camera Point of interest to the null object. Added in Wall in 3D space with the same perspective as green screen.
Seemed to Work.. Does this work flow sound right?? Should i have just parented the Wall to the null?? The virtual camera seemed to have the same motion as when i initially recorded it.
When the camera is on a tripod and there isn't any zooming, you're looking for a relatively basic 2D solution (lens distortion can cause some troubles with this sort of thing, but set that aside for now...). What you did works, but you could have just parented the wall as well.
A camera solution is sometimes better when you have a lot of 3D layers that you want to put in your scene (you could also just parent all of them to the null, however).
At any rate, you were smart to keep the camera on a tripod! Especially when you're using Mocha to solve!