Track a fix area with meanshift -OpenCV
Whitespace. Use it. It makes code much clearer. Here's a list of places where you can add whitespace to make your code clearer.


(frame1,frame2,trackWindow) : \$\rightarrow\$ (frame1, frame2, trackWindow):
trackWindow1=[x0,y0,w,h] \$\rightarrow\$ trackWindow1 = [x0, y0, w, h]
( cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 1 ) \$\rightarrow\$ (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 1)
cv2.imshow("mask",mask) \$\rightarrow\$ cv2.imshow("mask", mask)


There are many other places like this in your code, so I'm going to recommend looking at PEP8, Python's official style guide, on how to correct these.

Finally, in all your if conditions, are just if conditions. If you're not using elif, then all of these conditions will be evaluated if they are true. Are you sure that you want this?