2025-01-04 13:25:00
github.com
Today I was inspired by this tweet after which I fell into this rabbit hole to create an efficient recorder for your Screen, System audio, and Mic.
After trying to implement this using Claude in Swift I completely failed (see folder swift-version) so I decided to create a simpler version (also using Claude) in Node.js
An intelligent, multi-modal recording CLI tool that automatically captures and streams audio, screenshots, and webcam video to S3. Uses advanced detection and efficient resource management to capture multimedia content.
-
Intelligent Audio Recording:
- Monitors audio at 8kHz with automatic speech detection
- Switches to high-quality 44.1kHz recording when speech is detected
- Automatically stops recording after 2 seconds of silence
- Direct streaming to S3
-
Automated Screenshot Capture:
- Configurable screenshot interval
- Immediate upload of screenshots to S3
- Low-overhead screen capture
-
Webcam Video Capture:
- Configurable webcam capture interval
- Direct upload of webcam images to S3
- Supports custom webcam device selection
-
Efficient Resource Management:
- Minimal system resource usage during idle periods
- Intelligent detection and recording mechanisms
- Concurrent upload processing
This package requires:
You’ll need:
- S3-compatible storage endpoint
- Access key
- Secret key
- A bucket named “recordings” (or modify the code to use a different bucket name)
Run the recorder using npx:
npx efficient-recorder \
--endpoint YOUR_S3_ENDPOINT \
--key YOUR_ACCESS_KEY \
--secret YOUR_SECRET_KEY \
--enable-screenshot \
--screenshot-interval 5000 \
--enable-webcam \
--webcam-interval 3000 \
--image-quality 80
--endpoint
: Your S3-compatible storage endpoint URL--key
: Your AWS/S3 access key--secret
: Your AWS/S3 secret key--enable-screenshot
: Enable screenshot capture--screenshot-interval
: Interval between screenshots (ms)--enable-webcam
: Enable webcam capture--webcam-interval
: Interval between webcam captures (ms)--webcam-device
: Specify webcam device (optional)--image-quality
: Image quality for webcam/screenshots (1-100)
-
Audio Monitoring
- Continuous low-quality audio monitoring
- Switches to high-quality recording when speech is detected
- Automatic recording start and stop based on sound levels
-
Screenshot Capture
- Captures screenshots at specified intervals
- Immediate upload to S3
- Configurable capture frequency
-
Webcam Capture
- Captures webcam images at specified intervals
- Supports multiple webcam devices
- Immediate upload to S3
-
Efficient Upload
- Queued upload processing
- Concurrent uploads with multi-part support
- Minimal system resource overhead
Audio
- Monitoring: 8kHz, Mono
- Recording: 44.1kHz, Stereo
- Format: WAV (16-bit PCM)
Screenshots
- Captured at system screen resolution
- Uploaded as PNG
Webcam
- Resolution: 1280×720
- Format: JPEG
- Configurable quality
-
“Command not found: rec”
- Ensure SoX is installed correctly
- Verify SoX is in your system PATH
-
S3 Upload Issues
- Check S3 credentials
- Verify bucket exists and write permissions are granted
-
No Audio/Video Input
- Check system input devices
- Verify microphone and webcam permissions
MIT License – See LICENSE file for details
Contributions are welcome! Please submit a Pull Request.
For issues and feature requests, please open an issue on GitHub.
Keep your files stored safely and securely with the SanDisk 2TB Extreme Portable SSD. With over 69,505 ratings and an impressive 4.6 out of 5 stars, this product has been purchased over 8K+ times in the past month. At only $129.99, this Amazon’s Choice product is a must-have for secure file storage.
Help keep private content private with the included password protection featuring 256-bit AES hardware encryption. Order now for just $129.99 on Amazon!
Support Techcratic
If you find value in Techcratic’s insights and articles, consider supporting us with Bitcoin. Your support helps me, as a solo operator, continue delivering high-quality content while managing all the technical aspects, from server maintenance to blog writing, future updates, and improvements. Support Innovation! Thank you.
Bitcoin Address:
bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge
Please verify this address before sending funds.
Bitcoin QR Code
Simply scan the QR code below to support Techcratic.
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.