Screen Recorder using Python

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • In this video, I will show you how to create a screen recorder using python packages used are:
    1) pyautogui: to capture screenshots every second.
    2) numpy: to handle data
    3) cv2 : for image processing i.e create video
    related questions:
    * Computer Screen Recording using Python & OpenCV
    * OpenCV3 Tutorials 14 Recording Screen with OpenCV and PILLOW using Python
    * OpenCV TUTORIAL #3 How to Record Video in OpenCV & Python
    * 5 Python Projects for Beginners
    * Python Projects For Beginners | Python Projects Examples | Python Tutorial | Edureka
    * 15 Python Projects in Under 15 Minutes (Code Included)
    * Python Tutorial for Beginners [Full Course] 2019
    * Create your own Chatbot using Python #1
    * Python Tutorial For Beginners | Python Full Course From Scratch | Python Programming | Edureka
    * Python Tutorials for Beginners - Learn Python Online
    * Data Science In 5 Minutes | Data Science For Beginners | What Is Data Science? | Simplilearn
    * What Can You Do with Python? - The 3 Main Applications
    tags : #screen_recorder #opencv #i_know_python

Комментарии • 56

  • @muhammedbasheerkk8871
    @muhammedbasheerkk8871 3 года назад +2

    Wow ❤ , I was searching for this, Thank you ❤

  • @codingwithmagic9196
    @codingwithmagic9196 3 года назад +1

    At 2:30 when he typed *shit instead of *shot.
    LMAO

  • @allaeibgaming2164
    @allaeibgaming2164 3 года назад +1

    I am your new student

  • @dennisasamoah2213
    @dennisasamoah2213 4 года назад +1

    great video

  • @TheNitroPython
    @TheNitroPython 4 года назад +3

    Thanks for the video my man, quick question does this code also capture audio?

    • @joebox9999
      @joebox9999 4 года назад

      Opencv does not record audio. If you want to record video and audio use FFmpeg.

    • @cricketfever5678
      @cricketfever5678 4 года назад +3

      github.com/rajatmaurya702/Screen-Recorder-
      This can record audio with video.

    • @iamb0
      @iamb0 3 года назад

      @@cricketfever5678 no it keeps saying module error

    • @kikokal5810
      @kikokal5810 3 года назад

      @@iamb0 u need to download a module

    • @iamb0
      @iamb0 3 года назад

      @@kikokal5810 i download a module. It doesnt work

  • @gowthammohan9657
    @gowthammohan9657 3 года назад +1

    Changes needed if above code does nt work : 1) screen_size = pysutogui.size() 2) after exiting while loop add cv2.destryAllWindows() out.release()

  • @geeli_puppy_.
    @geeli_puppy_. 3 года назад +3

    I have tried to improve your code
    import cv2
    import numpy as np
    import pyautogui
    from random import randint
    import os
    screen_size = (1920,1080)
    fourcc = cv2.VideoWriter_fourcc(*'XVID')
    rand = randint(0, 10000000)
    while f'recorder {rand}.avi' in os.listdir():
    rand = randint(0, 10000000)
    out = cv2.VideoWriter(f'recorder {rand}.avi', fourcc, 20.0, (screen_size))
    while True:
    img = pyautogui.screenshot()
    frame = np.array(img)
    frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
    out.write(frame)
    cv2.imshow('Screen recorder', frame)
    if cv2.waitKey(1) == ord('q'):
    break

  • @shivensaini3643
    @shivensaini3643 4 года назад +2

    Hello BRO can you please create a video on OptionMenu(Dropdown menu) in Tkinter please you are my only and last hope.

    • @Iknowpython
      @Iknowpython  4 года назад +3

      Hey man its actually pretty easy i mean i have used in one of my project ruclips.net/video/9sia_Lg4d2Q/видео.html. In this video i have created a music player where name of songs are present in a drop down menu which i have extracted using os module so this video may help you

  • @fsociety595
    @fsociety595 4 года назад

    Can you also make videos for python learning for beginners......

  • @BhaiyaJee
    @BhaiyaJee 4 года назад +4

    can you please tell us how to add sound?

  • @323santosh
    @323santosh 4 года назад +1

    Can we do this recording for Mobile application, without using WebRtc?

  • @ssprajapat3135
    @ssprajapat3135 3 года назад

    hi man can you show us how build this with kivyMD??? because we want to create button

  • @suretmeyenateistoc4252
    @suretmeyenateistoc4252 2 года назад

    out=cv2.VideoWriter("output.avi", fourcc,20.0,(screen_size))
    cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'VideoWriter'
    > Overload resolution failed:
    > - Can't parse 'frameSize'. Input argument doesn't provide sequence protocol
    > - VideoWriter() missing required argument 'frameSize' (pos 5)
    > - VideoWriter() missing required argument 'params' (pos 5)
    > - VideoWriter() missing required argument 'frameSize' (pos 5)

  • @niteshsharma0229
    @niteshsharma0229 3 года назад

    Could you please let me how we can stop screen recording and video downloading in python.

  • @py_tok5589
    @py_tok5589 3 года назад

    you have any idea how to PIP INSTALL open cv? i did try and this comes up:'install' is not recognized as an internal or external command,
    operable program or batch file.

    • @py_tok5589
      @py_tok5589 3 года назад

      I did pipinstaled l open cv already, the video looks a bit clunky, surely improvements are under way

    • @user-xq3qx1gk7p
      @user-xq3qx1gk7p 3 года назад

      It should be pip install opencv-python

  • @sabaris2008
    @sabaris2008 3 года назад

    for me pip is not recogonized as a internal or external command please help

  • @stringconfection1971
    @stringconfection1971 4 года назад +1

    I tried this but the saved output video file is unable to open.. can suggest any solution

  • @bhupendrapandey4868
    @bhupendrapandey4868 3 года назад

    I am unable to record my progrme using python

  • @subbareddyd544
    @subbareddyd544 4 года назад +1

    Sir try to drop source code file in description

    • @cheenis99
      @cheenis99 3 года назад +4

      it takes 1 minute to type it bro... if you're gonna just script kitty cut and paste stackoverflow code at least don't be so open ab out it. it's cringe

  • @srivyshnavikoduri8652
    @srivyshnavikoduri8652 4 года назад

    Output Video file is not playing
    please help how to correct it

  • @jholjhaldai7173
    @jholjhaldai7173 3 года назад

    how to create a record video button in an App

  • @ivankrecker9210
    @ivankrecker9210 3 года назад

    Videos are becoming too fast this way, like ×2 or ×3 to speed. How to fix it out??

  • @prashikawachar9358
    @prashikawachar9358 4 года назад +1

    I want to develop screen recorder in django framework. Can you help me out?

  • @drac8854
    @drac8854 4 года назад +1

    How to record audio with it?

    • @ashwink4442
      @ashwink4442 4 года назад

      you can record the audio using a phone or something and join them using a video editor

    • @wunder1385
      @wunder1385 3 года назад +5

      @@ashwink4442 that is the most stupid suggestion I have ever seen

    • @mshailjain
      @mshailjain 3 года назад

      @@wunder1385 yepp

    • @abhisheksurela2881
      @abhisheksurela2881 3 года назад

      @@wunder1385 lol

  • @rahulbhatt1
    @rahulbhatt1 3 года назад

    Can't play the video we captured!!

  • @itsalllearningtubechannelf8686
    @itsalllearningtubechannelf8686 4 года назад

    why are you putting different queries to the same variable

  • @giorgialavidze5283
    @giorgialavidze5283 4 года назад

    how to executable pyinstaller doesn't work

  • @RenkraniGaming
    @RenkraniGaming 4 года назад +1

    why is it so fast?

  • @muhammedbasheerkk8871
    @muhammedbasheerkk8871 3 года назад +1

    Bro,can you give us source code ? 😊

  • @beastbomber2316
    @beastbomber2316 4 года назад +1

    befor i do this can this record my xbox screen

  • @laveenbagai6327
    @laveenbagai6327 4 года назад

    Not feasible!