Video surveillance data is increasing quickly, it's a challenge to separate out moving objects from a massive video data in the field of computer vision. The article designs and implements a Cloud-based distributed video processing framework, and proposes an improved adaptive foreground extraction algorithm based on gaussian mixture model(GMM). The method obtains the optimal parameters by adaptive learning gaussian distribution and online EM(Expectation Maximization) algorithm, and it fuses the improved algorithm to distributed video processing framework. The experiment shows that the method can not only greatly improve the efficient of video processing but also accurate extract foreground targets under complex environment , and it has good robustness.