Hey, guys welcome back to my website! In this post, we will talk about how to create a SCREEN RECORDER' using Python. It is going to be so much exciting!! So without wasting the let's dive into the video!! So first let's talk about its features:-
- Graphic User Interface (GUI) ❌
- professional ✅
- Simple code for beginners ✅
- Advanced ✅
So, here is the video of the Screen Recorder at the top. You also see it on my channel 'ABHICODER'. Now let's see the process of creating it. here are some modules to be installed on your computer:-
MODULES:-
pip install open-cv
pip install numpy
pip install pyautogui
Process:-
First, open your Favourite Python IDE, I like VS code so I am using it. Then create a Python file named 'main.py'. Then go to 'Pypi.org' and search for 'Open-CV' the copy the code and paste it in your terminal and hit enter. Then do the same for the 'NumPy' package and 'Pyautogui' package. after that paste the code in your IDE, which I have given below. and just Run it!! It's ready!!
Detain explanation:-
So first open your favourite IDE and then Paste the code given below. Don't worry! I will explain. Then import 'cv2', 'numpy', 'pyautogui'. After that set the screen size as your screen size. To set the correct size is very important, else it will now work properly. The video writer function for the open-cv in the next line. Then an 'out' variable That will save the recorded screen footage by the name of the video will be saved by the name 'Output.mp4'. You can also change it as you want. But the video will be stored where this 'main.py' file is saved, You can see it there. Then we will start a while loop, Inside that while loop we will take a variable named 'image which will store the 'pyautogui.screenshot()' function. Basically, it will take many screenshots at a time and convert them into a video. If you noticed I have written frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB) This is actually because if you don't give this function, and start recording then in the Output video, it will be seen like yellows and whites. So after entering this function, if you start recording then it will capture the video in the correct colour, in RGB colours. So as we have passed a 'out' variable so in the next line we are adding the a write function the 'out' variable so that it can convert all the screenshot image and create a video and serve to us. Then here at the last, we are passing a 'if' condition that if 'q' key is pressed one time then it will break the function means end the function.
Python code:-
So that it! Hope you will like this project. If you like this video then please click on the like button. and if you are new to my channel then please SUBSCRIBE to my channel. As I bring always some amazing content related to programming. Please help me reach 1000 subscribe.
Keep visiting!!
Goodbye!!
</p (adsbygoogle = window.adsbygoogle || []).push({});
1 Comments
This information is so useful and informative which you have shared here. It is beneficial for beginners to develop their knowledge. It is very gainful information. Thanks for sharing free youtube video downloader.
ReplyDelete