Тёмный

Screen Recorder in Python 

NeuralNine
Подписаться 352 тыс.
Просмотров 40 тыс.
50% 1

In this video we learn how to record the screen in Python.
◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
📚 Programming Books & Merch 📚
💻 The Algorithm Bible Book: www.neuralnine.com/books/
🐍 The Python Bible Book: www.neuralnine.com/books/
👕 Programming Merch: www.neuralnine.com/shop
💻 Exclusive Content 💻
👥 Patreon: / neuralnine
🌐 Social Media & Contact 🌐
📱 Website: www.neuralnine.com/
📷 Instagram: / neuralnine
🐦 Twitter: / neuralnine
🤵 LinkedIn: / neuralnine
📁 GitHub: github.com/NeuralNine
🎵 Outro Music From: www.bensound.com/

Наука

Опубликовано:

 

21 мар 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 130   
@revolutionizer099
@revolutionizer099 3 года назад
Probably the best python project based channel on RU-vid. Great job, keep it up👍👍
@Blaze48000
@Blaze48000 3 года назад
Great video man keep up the great content
@wesleyelder
@wesleyelder 3 года назад
Amazing! Great video
@younessid437
@younessid437 3 года назад
Thank u so much bro, Nice, and clean Tuto
@michaelmebratu2921
@michaelmebratu2921 2 года назад
The best tutorial ever!!!
@vincent-ox5rz
@vincent-ox5rz 3 года назад
Your content is amazing dude. Keep up the great work. I will be here when you blow up. I also wanted to support you so i bough some of your books couple days ago and i will also support you on patreon :-)
@PlexAlanche
@PlexAlanche 3 года назад
Next Video: How to make a video conferencing program in python
@abrarmulla1196
@abrarmulla1196 3 года назад
i love your python vids
@albertoricardomorales6328
@albertoricardomorales6328 3 года назад
Awesome, pretty cool!
@janfiejka2890
@janfiejka2890 3 года назад
I love that Intro tho!
@fikrad0
@fikrad0 3 года назад
Great video🎥
@materyalmat
@materyalmat 3 года назад
I really needed that, thanks XD.
@NeuralNine
@NeuralNine 3 года назад
:)
@SparePlayss
@SparePlayss 3 года назад
now I can make a screen recorder and which my potato PC can handle xD
@NeuralNine
@NeuralNine 3 года назад
:D
@bud384
@bud384 3 года назад
Awesome!
@MathonX
@MathonX 3 года назад
Nice Video bro 🔥🔥 | | Keep it up!!!
@K3NT_
@K3NT_ 3 года назад
Bro how can i send this 'output.avi' directly to gmail for example? What needs to be written in the place for sending message? Thank you!)
@prateekgupta5034
@prateekgupta5034 2 года назад
hey , actually can you help me i am trying to record directly in webm format using opencv do you have any idea how we do that
@shaurryabaheti
@shaurryabaheti 3 года назад
Heyy i tried the code first it didnt work due to the resolution issue then scrot started behaving differently i mean it started returning the screen shot of the time when i executed the command to install scrot in my terminal
@anipro4920
@anipro4920 3 года назад
Amazing
@oolumee
@oolumee Год назад
Anyone know what values for fps, wait , etc works best for playback?
@Djellowman
@Djellowman 3 года назад
@NeuralNine there is an error in this vid, as the reason for the fast playback is because it didn't capture as many frames per second as you intended here, whilst the video is displaying the captured frames at 20 fps. Even though you've specified 120 fps, you're only capturing 5-10 fps and playing it at 20 fps in this video
@PythonicMind
@PythonicMind Год назад
How to fix that?
@Djellowman
@Djellowman Год назад
@@PythonicMind idk, it's been a year. but i'd say remove the waitkey() line, or make sure you're writing to the video at the same fps as you're recording screenshots The 20.0 specifies the video render fps. If he actually captures 120 fps like he intended to, the video would play 1/6th speed. But it's faster because the loop is slow. it might also be that taking screenshots in this way isn't the best way to record a high fps video.
@PythonicMind
@PythonicMind Год назад
@@Djellowman I fixed that. Thanks.
@Djellowman
@Djellowman Год назад
@@PythonicMind actually, see my other comment below in the comments. I posted an explanation and some code which you can try & play around with.
@Djellowman
@Djellowman Год назад
@@PythonicMind how did you fix it? i remember not being able to get playback speed exactly the same as recording speed
@ujjwalchetan4907
@ujjwalchetan4907 3 месяца назад
does it record system audio as well?
@1Aditya1
@1Aditya1 3 года назад
Cool one
@ebadansari6609
@ebadansari6609 3 года назад
Cool thing bro ❤️❤️
@melikmehmetbyk4489
@melikmehmetbyk4489 3 года назад
nice intro headshot :D
@jesusretes1449
@jesusretes1449 3 года назад
Could this work on 3.7 python
@kgv5179
@kgv5179 3 года назад
first!!!!!, u make amazing vids bro, keep up the work
@NeuralNine
@NeuralNine 3 года назад
thanks :)
@hasson2349
@hasson2349 Год назад
Is it with sound too?
@aliakbarkazeminiya2758
@aliakbarkazeminiya2758 Год назад
How can I read part of the page in real time and process the texts in that part?
@zombiekiller7101
@zombiekiller7101 3 года назад
Nice 👍
@lo2246
@lo2246 3 года назад
lets say I want to record only the sound of the screen, how do I do that?
@aniketm6098
@aniketm6098 2 года назад
you are creating a .avi file, it is running on you system but not on mine. please help me out
@leopoldoansantos
@leopoldoansantos 2 года назад
The best dev channel ever, congrats!!!
@codewithyug1129
@codewithyug1129 3 года назад
Awesome vid mate but can you also make a screen recorder in which if we say something, it will capture it?
@cybeartron
@cybeartron 3 года назад
Hey I also want this but till I understand it I will jus use audacity
@codewithyug1129
@codewithyug1129 3 года назад
@@cybeartron ik
@derex47
@derex47 Год назад
if i want to record the sound of a specific open program
@SamyarBorder
@SamyarBorder 3 года назад
you are amazing but why you didn't set the home page of your RU-vid Chanel ?
@prod_djack00
@prod_djack00 3 года назад
goodjob
@shrishsunder1794
@shrishsunder1794 3 года назад
Yup iam finding this ❤️❤️❤️❤️❤️❤️
@NeuralNine
@NeuralNine 3 года назад
👍
@AstoBolo
@AstoBolo 3 года назад
When i close the file and try to open the video it keeps saying corupted
@omarsenoussaoui6666
@omarsenoussaoui6666 3 года назад
please how to remote desktop with Py
@ricardomejiaa3781
@ricardomejiaa3781 3 года назад
Great
@canadianbeast8671
@canadianbeast8671 3 года назад
ur the best
@carlabosse
@carlabosse 3 года назад
Hey, was looking around your channel. Noticed you deleted the videos about the keylogger etc. Why? and are you planning on reuploading them in the future? Liked those alot...
@MananGandhi
@MananGandhi 3 года назад
actually, he was being striked by youtube, so he uploads them on patreon for his members and not on youtube
@carlabosse
@carlabosse 3 года назад
@@MananGandhi I am now a patreon :)
@NeuralNine
@NeuralNine 3 года назад
@@carlabosse appreciate it brother :)
@syllight9053
@syllight9053 3 года назад
Nice!
@NeuralNine
@NeuralNine 3 года назад
thanks :)
@syllight9053
@syllight9053 3 года назад
@@NeuralNine You're da best! Keep it up!
@phamtuongminh1468
@phamtuongminh1468 3 года назад
hi, you can teach me record area on srceen . thanks !
@Djellowman
@Djellowman 3 года назад
Correct me if i'm wrong, but the cv2.waitKey() function only functions as a sleep() here to free up the cpu and only check if a new frame needs to be recorded 10 times per second. The reason that the recording seems sped up can't have anything to do with this or the fps right? So why is the recording so sped up??
@Djellowman
@Djellowman 3 года назад
Is it playing every 20 frames at 120 fps..?
@Djellowman
@Djellowman 3 года назад
Yes this must be it. It's writing 120 frames per second, but 20 fps was specified in the cv2.VideoWriter(). For anyone reading this; if you want regular video speed, set the same as fps on cv2.VideoWriter() as the amount of frames you actually write per second.
@Djellowman
@Djellowman 3 года назад
It seems i have the same issue of the sped up output video. I'm not sure what causes this as it makes no sense for the waitKey to play a role.
@Djellowman
@Djellowman 3 года назад
It seems that both pyautogui.screenshot() and out.write(frame) take quite some time to take a screenshot and write it to the output file. This means that you'll always be writing the captured screenshot less often than your specified fps. I'm not quite sure how to solve this, but it seems that this method is not very well suited to record the screen, as it will always end up capturing less frames per second than specified as FPS. For example; on my machine it takes 20 ms to make the screenshot, and another 20 ms to write it to the output file. The whole loop is about 50 ms per iteration. This alone means that it's not possible to capture more than 20 fps with this method, on my machine.
@Djellowman
@Djellowman 3 года назад
import cv2 import numpy as np import pyautogui import keyboard import time SCREEN_SIZE = (1920, 1080) FPS = 20 fourcc = cv2.VideoWriter_fourcc(*"XVID") out = cv2.VideoWriter("output.avi", fourcc, FPS, (SCREEN_SIZE)) prev = 0 snapshot = False while True: time_elapsed = time.time() - prev print("time elapsed: ", time_elapsed) if not snapshot: print("taking screenshot...") img = pyautogui.screenshot() snapshot = True if time_elapsed > 1.0/FPS: prev = time.time() print("writing frame") frame = np.array(img) frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) out.write(frame) snapshot = False if keyboard.is_pressed("esc"): break out.release()
@CODEFORTRESS
@CODEFORTRESS 2 года назад
which editing software do you use?
@CaelmDev
@CaelmDev 4 месяца назад
kind of 2 years late lol but he uses shotcut
@aminegatou4492
@aminegatou4492 3 года назад
do this screen recorder also record the voice ?
@abdulmateen1663
@abdulmateen1663 3 года назад
Apparently NO!
@sarahshahini4138
@sarahshahini4138 2 года назад
I have a problem. Please help me. Import "puautogui" Could not be resolved pulance(reportMissingImports)
@asilkagan5010
@asilkagan5010 Год назад
"puautogui" should be "pyautogui" you misswriten "u" for " y"
@abhijitmondal7831
@abhijitmondal7831 3 года назад
🔥
@beastnighttv
@beastnighttv 3 года назад
When i try to open the avi file it says it is unsupported but why? I opened many AVI file in that software @NeuralNine can i get the code pls
@beastnighttv
@beastnighttv 3 года назад
" import cv2 import numpy as np import pyautogui import time SCREEN_SIZE = (1920, 1080) fourcc = cv2.VideoWriter_fourcc(*"XVID") out = cv2.VideoWriter("output.avi", fourcc, 20.0, (SCREEN_SIZE)) fps = 120 prev = 0 print("started") while True: time_elapsed = time.time() - prev img = pyautogui.screenshot() if time_elapsed > 1.0/fps: prev = time.time() frame = np.array(img) frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) out.write(frame) cv2.waitKey(100) cv2.destroyAllWindows() out.release() " My code any error or mistakes pls tell me
@ajiteshkumar
@ajiteshkumar 3 года назад
The screen size might be wrong. Make sure it is your display's screen size.
@beastnighttv
@beastnighttv 3 года назад
@@ajiteshkumar ok i will do that
@__3093
@__3093 3 года назад
yes
@S14Y3R
@S14Y3R 6 месяцев назад
Audio?
@btDhanjay
@btDhanjay 3 года назад
at 2:34 what does 20.0 do?
@o_poky9359
@o_poky9359 3 года назад
Its the number of the frames that should be shown in each second. Fps
@ilkinalizade8467
@ilkinalizade8467 3 года назад
i have errors like module cv2 has no VideeoWriter can you help me?
@osamaabdelaziz7312
@osamaabdelaziz7312 2 года назад
this VideeoWriter Error , put this VideoWriter True
@patricechaula3430
@patricechaula3430 Год назад
Why is mine just 8Kb and it doesn't play?
@KS-ym8xr
@KS-ym8xr 3 года назад
How you run ubuntu on windows please answer i really need that
@hackwithharsha5228
@hackwithharsha5228 3 года назад
Use virtual box 📦
@AlexxxMurkin
@AlexxxMurkin 3 года назад
He did say. It's WSL.
@ajiteshkumar
@ajiteshkumar 3 года назад
Go to Micosoft Store, then search for Ubuntu. Ubuntu subsystem for windows.
@jugertmucoimaj9017
@jugertmucoimaj9017 2 года назад
lmfao, first of all imagine getting a GeeksForGeeks tut and make it like you did it yourself and the second thing is that screenshotting each frame and adding those frame means low performance. Because that means 60 screenshots per second
@ninjacodertech
@ninjacodertech 3 года назад
can it be output.mp4 instead of output.avi???
@ninjacodertech
@ninjacodertech 3 года назад
also, would it be possible to make this stream aswell? like to twitch or something
@ajiteshkumar
@ajiteshkumar 3 года назад
@@ninjacodertech It is, but you might want to dive deeper. (You could also just use obs)
@SaiKrishna-wl1ql
@SaiKrishna-wl1ql 3 года назад
In top mnc company's entrance exam .they'll ask a coding question ,in that question we have to take predefined inputs ,but how to access those predefined inputs using python ,? Plz help me anyone
@madhavsingh7345
@madhavsingh7345 3 года назад
is it inputs using the console, or a different file of inputs? Inputs given through console can be gotten by x = input("prompt"), for inputs from a file, it depends on the file and the format.
@iluvmybruddas3072
@iluvmybruddas3072 3 года назад
Dam idk what I did I had a virus on my pc every time it reboots over n over command prompt opens that when you know it’s happening this sucks man
@Pixel-xk2ot
@Pixel-xk2ot 3 года назад
Try to look at %appdata%\Microsoft\Windows\Start Menu\Programs\Startup Thats a startup folder if something there just delete it (Windows 10)
@trevormckellen5613
@trevormckellen5613 2 года назад
the numbers in the waitKey() are miliseconds
@henryd3bby
@henryd3bby Год назад
Im gonna make unregistered hypercam 3
@tusharbhanushali2796
@tusharbhanushali2796 3 года назад
How I record video in a normal speed
@johnsun3239
@johnsun3239 3 года назад
But where is the sound? The screen recorder does not record sound.
@rabiumuhammedeffect423
@rabiumuhammedeffect423 3 года назад
My script is not capturing...
@jyotidwivedi2734
@jyotidwivedi2734 Год назад
7 line pr please sir bta diziye
@aldinbas4940
@aldinbas4940 3 года назад
3
@robinferizi9073
@robinferizi9073 3 года назад
Next tutorial: How to be born
@lornemalvoo
@lornemalvoo 3 года назад
Your biceps are getting more and more every day 🤷‍♂️
@b07x
@b07x 3 года назад
Gym ⛹️
@vaisakhrnair8240
@vaisakhrnair8240 3 года назад
this does not work for me
@jyotidwivedi2734
@jyotidwivedi2734 Год назад
Sir mere me error aa rha h
@mattmovesmountains1443
@mattmovesmountains1443 3 года назад
Anyone get the numbers dialed in so that it records/plays at 1:1?
@mattmovesmountains1443
@mattmovesmountains1443 3 года назад
@Ișfan Matei the program runs, but not the video? All the opencv stuff is new to me, so I'm not the best person to troubleshoot this. Maybe yours ran so quickly it looked like nothing happened. Does your code create a file? Of what size is the file? Is the extension correct? Maybe an issue with your media player playing files of that extension? Just a few initial thoughts.
@IzUrBoiKK
@IzUrBoiKK 3 года назад
Bro, Kem cho? Maja macho?
@pritamjana7557
@pritamjana7557 3 года назад
Gujarati
@roma.senatosu
@roma.senatosu 3 года назад
as I thought..
@duarteandre_
@duarteandre_ 3 года назад
Bye bye obs lmao
@yusefs.n2317
@yusefs.n2317 2 года назад
none of ur videos ever worked for me.
@rpg98
@rpg98 2 года назад
Great job .... Thank you - I needed Pillow package to be upgraded - I got 0xc10100be error and fix it by changing the resolution to match my PC resolution. FROM : SCREEN_SIZE = (1920, 1080) TO : SCREEN_SIZE = (3840, 2160) Also you can change the resolution of the capturing image from : img = pyautogui.screenshot() TO : img = pyautogui.screenshot(region=(0,0, 1920, 1080)) but this will crop the screen
@darktech1641
@darktech1641 2 года назад
oh my god how much big screen does your computer have
Далее
Speech Recognition in Python
7:32
Просмотров 170 тыс.
python 3.12 was ALMOST javascript
9:32
Просмотров 56 тыс.
I tried to make a Valorant AI using computer vision
19:23
Coding A Blockchain in Python
17:15
Просмотров 167 тыс.
Simple Automated SSH Python Bot
17:50
Просмотров 30 тыс.
Coding A Snake Game in Python
29:34
Просмотров 51 тыс.
Android App Development in Python With Kivy
26:27
Просмотров 276 тыс.
Automate your job with Python
6:07
Просмотров 377 тыс.
Python Sockets Simply Explained
39:33
Просмотров 156 тыс.
Screen Recorder With Python
6:48
Просмотров 3 тыс.