Skip to main content

utility tool - Screen Recorder

Reason this release was yanked:

missing dependencies

Project description

pwp_packs

The pwp_packs package contains utility tools. Currently, it includes a Screen Recorder tool that can record your system screen in any resolution, along with audio.

Developed by Vivek Kumar - ProgresswithPython (c) 2024 (www.youtube.com/c/progresswithpython)

Examples of How To Use Screen Recorder Tool

from pwp_packs.screenrecorder import ScreenRecorder

recorder = ScreenRecorder("test.mp4")
recorder.start()
input("enter to stop recording...")
recorder.stop()

#You can use the overwrite parameter with True to overwrite the file if it already exists.
recorder = ScreenRecorder("test.mp4",overwrite=True) #it will overwrite test.mp4 if exists.
recorder.start()
input("enter to stop recording...")
recorder.stop()

# By Default, Mouse will be recorded but if you don't want to recorde mouse then make "draw_mouse" parameter False
#recorder = ScreenRecorder("test.mp4", overwrite = True, draw_mouse = False)
from pwp_packs.screenrecorder import ScreenRecorder

#you can define duration also
recorder = ScreenRecorder("test.mp4",duration=30)
recorder.start() #it will record for 30 seconds

with Audio

from pwp_packs.screenrecorder import ScreenRecorder,get_audio_devices

get_audio_devices() # Print the name of audio devices available in your system
# audio_names = get_audio_devices(text=True) # This will return the name of audio devices in text format
# print(audio_names)

# Copy the name of that audio devices you want to record into a list
audio_devices = ["Microphone Array (Realtek(R) Audio)","Stereo Mix (Realtek(R) Audio)"] # Taking two audio devices to record, Note: audio devices name may varies from system to system.

recorder = ScreenRecorder("test.mp4",audio_devices=audio_devices)
recorder.start()
input("enter to stop recording...")
recorder.stop()

#you can define delays in audio input devices if audio is aheading or not sync with video

audio_delays = [0,1000] # 1 second delay in stereo mix input device
recorder = ScreenRecorder("test.mp4",audio_devices=audio_devices,audio_delays = audio_delays)
recorder.start()
input("enter to stop recording...")
recorder.stop()

To see all Screen Recorder Parameters

from pwp_packs.screenrecorder import ScreenRecorder

print(ScreenRecorder.__doc__)

Using ScreenRecorderGUI

from pwp_packs.screenrecorder import ScreenRecorderGUI

recorder = ScreenRecoderGUI(filename_prefix = "PWP.mp4")  # filename prefix with video extension
recorder.show() # It will show a small gui with start and stop button with recording timer in the top center of your screen

# Right click on gui to get option to close gui.

# You can provide the width,height for gui and x,y for gui position.(optional)
recorder = ScreenRecorderGUI(filename_prefix = "PWP.mp4", width = 500, height = 50, x=0,y=0,background_color = "blue")
recorder.show()

# Note: ScreenRecorderGUI rest parameter are same as ScreenRecorder parameter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pwp_packs-0.0.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

pwp_packs-0.0.1-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pwp_packs-0.0.1.tar.gz.

File metadata

  • Download URL: pwp_packs-0.0.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for pwp_packs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9e39277bd1d82f96777fa71f793e8f70341285ab4e7736518fe4d745003530bf
MD5 5654979b4ffb7b19ea1beb9c14692b00
BLAKE2b-256 1b78509ffac60c96a64e4b55468b3f2c96376350eab562a170e2d7c251207fef

See more details on using hashes here.

File details

Details for the file pwp_packs-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pwp_packs-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for pwp_packs-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58f73a8a279a10869230c64b386d056f3b4bdd53be2df52809225e12ff80ef82
MD5 40ea726b88fcaca11c512b832f9c50b9
BLAKE2b-256 f25e8509b2c4d6fdfbe28f343c50ccc734ef0e1f05b5a8ca44a89fa2b1c5cfac

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page