Skip to content

partykamdev/BlackHoleAudioRecorder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 BlackHole Audio Recorder

License: MIT macOS Homebrew

A simple yet powerful command-line tool to record system audio on macOS using BlackHole virtual audio driver.

BlackHole Audio Recorder Banner

🌟 Features

  • 📥 Auto-installation of BlackHole (2ch or 16ch) if not already installed
  • 🔄 Automatic audio device switching - sets BlackHole as output and restores original when done
  • 📁 Organized recordings in a dedicated folder
  • 🎚️ High-quality audio capture using SoX
  • 🔌 Zero configuration - works out of the box
  • 🎮 Simple controls - just press Ctrl+C to stop recording

📋 Requirements

  • macOS 10.10 or later
  • Homebrew package manager

🚀 Installation

  1. Clone this repository:

    git clone https://github.com/YOUR_USERNAME/blackhole-recorder.git
    cd blackhole-recorder
  2. Make the script executable:

    chmod +x record.sh

That's it! The script will automatically install any missing dependencies when you run it.

📝 Usage

Basic Usage

./record.sh

This will:

  1. Install BlackHole 2ch if not already installed
  2. Switch your audio output to BlackHole
  3. Start recording to ./recordings/recording_YYYYMMDD_HHMMSS.wav
  4. When you press Ctrl+C, it will stop recording and restore your original audio output

Custom Filename

./record.sh myrecording.wav

Records to ./recordings/myrecording.wav

Specify BlackHole Channel Count

./record.sh myrecording.wav 16

Uses BlackHole 16ch instead of the default 2ch version.

🔍 How It Works

The recording process follows these simple steps:

  1. The script sets BlackHole as your system audio output
  2. Any audio played on your Mac is routed through BlackHole
  3. SoX captures the audio from BlackHole and saves it to a file
  4. When you stop recording, your original audio output is restored

🛠️ Dependencies

The script automatically installs these dependencies if needed:

📊 Use Cases

  • 🎮 Record gameplay audio
  • 🎵 Capture streaming music
  • 🎙️ Save audio from video calls
  • 🎬 Record audio for screencasts
  • 🔊 Capture system sounds

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages