I have found the way to replace green screen and match camera move with background footage, but I don't understand how is it done for sky because the markers on green screen moves way faster than the objects in sky. Please share your experience.
You can assume celestial bodies are infinitely far away, as the amount of parallax you can achieve in anything except a space ship is infinitesimal. So that means that the moon and stars stay fixed to a point of view, as long as you're not panning. If you're panning then the moon and stars can be on layers a long way from the camera, but scaled up to fill the frame.