loop = True
while loop == True:
    frame1 = cv.QueryFrame(video1)
frame2 = cv.QueryFrame(video2)
cv.ShowImage('Camera 1', frame1)
cv.ShowImage('Camera 2', frame2)
char = cv.WaitKey(99)
if char == 27:
    loop = False
cv.DestroyWindow('Camera 1')
cv.DestroyWindow('Camera 2')
Capturing From 2 Cameras (OpenCV, Python)