I solved the problem only writing in the instruction "cap=cv2.VideoCapture()" the number 7 like this cap=cv2.VideoCapture(7)
Separate names with a comma.