import cv2
cap=cv2.VideoCapture('fcwr.mp4')
writer1=cv2.VideoWriter('myresult.avi',cv2.VideoWriter_fourcc(*'DIVX'),cap.get(cv2.CAP_PROP_FPS),(720,404),True)
writer2=cv2.VideoWriter('myresult.avi',cv2.VideoWriter_fourcc(*'MJPG'),cap.get(cv2.CAP_PROP_FPS),(720,404),True)
writer3=cv2.VideoWriter('myresult.mp4',cv2.VideoWriter_fourcc(*'MP42'),cap.get(cv2.CAP_PROP_FPS),(720,404),True)
for i in range(60*round(cap.get(cv2.CAP_PROP_FPS))):
_,frame=cap.read()
writer.write(frame)
cap.release()
writer.release()