This is a repository for recording videos alongside screen information on mac computers. Audio, video, keyboard typing, mouse clicks, and computer screens are all recorded in parallel, and a video is created from the captured webcam/microphone (with audio/video streams connected) and the computer screen.
I created this script because I found few solutions that could seamlessly connect audio, video, and screen information written in Python. Most of the repositories out there record only one stream like an audio stream (e.g. sounddevice) or video stream (e.g. OpenCV). Moreover, this seemed like a difficult task because if you recorded many of these streams in parallel the timing may be off with the lips to the audio if you merged the two recordings.
Therefore, I looked deeper at the problem and it seemed like you could use Redis (using ray) or a similar distributed cue to record parallel instances of all the channels desired (audio, video, keyboard typing, mouse clicks, and computer screen recordings). Then, you could use packages like FFmpeg to merge the various channels. You can also use custom thresholding to make sure the audio and video are aligned.
Click on the image below to see a live demo of a recorded screencast!
To get started, you can create a virtual environment and install all dependencies.
git clone git@github.com:jim-schwoebel/video_record.git
cd video_record
python3 -m venv video_record
source video_record/bin/activate
sudo pip3 install -r requirements.txt
Now you can run main script. There are two arguments - the file name ('test.avi') and the number of seconds that you wish to record (60):
python3 record.py test.avi 60
Note that you may need to grant permission in the terminal for newer versions of Mac operating systems.
Any feedback this repository is greatly appreciated.
- If you find something that is missing or doesn't work, please consider opening a GitHub issue.
- If you want to learn more about voice computing, check out Voice Computing in Python book.
- If you'd like to be mentored by someone on our team, check out the Innovation Fellows Program.
- If you want to talk to me directly, please send me an email @ js@neurolex.co.
This repository is licensed under the Apache 2.0 License.