import cv2 as cv
import numpy as np

cap = cv.VideoCapture(1)

print(cap.get(cv.CAP_PROP_FRAME_WIDTH))
print(cap.get(cv.CAP_PROP_FRAME_HEIGHT))

cap.set(3,3000)
cap.set(4,3000)

print(cap.get(cv.CAP_PROP_FRAME_WIDTH))
print(cap.get(cv.CAP_PROP_FRAME_HEIGHT))

while (cap.isOpened()):
    ret , frame = cap.read()

    if (ret == True):
        cv.imshow("camVid", frame)
        if cv.waitKey(25) & 0xFF == ord('q'):
          break
    else:
        break

cap.release()
cv.destroyAllWindows()

[(4, 'cv2.VideoCapture', 'cv.VideoCapture', True, 'import cv2 as cv\n'), (26, 'cv2.destroyAllWindows', 'cv.destroyAllWindows', True, 'import cv2 as cv\n'), (19, 'cv2.imshow', 'cv.imshow', True, 'import cv2 as cv\n'), (20, 'cv2.waitKey', 'cv.waitKey', True, 'import cv2 as cv\n')]