
TITLE:                      SCREEN RECORDER USING PYTHON

DESCRIPTION:       Python is a beautiful programming language ,it is easiest to implement 
Python is a widely used general-purpose language. It allows performing a variety of tasks. One of them can be recording a video. It provides a module named pyautogui which can be used for the same. This module along with NumPy and OpenCV provides the way to manipulate and save the images (screenshot in this case)






import cv2
import numpy as np
import pyautogui
SCREEN_SIZE=(1920,1080)
fourcc=cv2.VideoWriter_fourcc(*"XVID")
out=cv2.VideoWriter("output.avi",fourcc,20.0,(SCREEN_SIZE))
cv2.namedWindow("Live",cv2.WINDOW_NORMAL)
cv2.resizeWindow("Live",480,270)
while True:
    img=pyautogui.screenshot()
    frame=np.array(img)
    frame=cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)
    out.write(frame)
    cv2.imshow('Live',frame)
    if cv2.waitKey(1)==ord("q"):
        break
cv2.destroyAllWindows()
out.release()
