Introduction
Sometimes a game has beautiful in-game music or you have a video with a great soundtrack – there are many reasons why you might want to record the sound playing on your Mac directly as an audio file. Here we'll show you how to do it easily, for free, and without quality loss.
Alternative: Hardware Cable Recording
Before we get to the elegant solution, here's briefly the "old school" method: You can actually plug a cable from the headphone output into the microphone input. This works, but has some disadvantages:
- Quality loss due to double conversion (Digital → Analog → Digital)
- Possible interference from the cable
- You can't hear anything during recording
- With newer Macs without a 3.5mm jack, you need additional adapters

Install BlackHole Audio Driver
BlackHole is a virtual audio driver that allows you to route audio between different apps on Mac. It's free, open source, and works perfectly for our purpose. You can download BlackHole from GitHub here.

After installation, you need to set the output and input to "BlackHole 2ch" in System Preferences → Sound.

Recording with QuickTime Player
Open QuickTime Player and go to "File" → "New Audio Recording".

In the recording window, click the arrow next to the red record button and select "BlackHole 2ch" as the source.

When you start recording now, the Mac's internal audio will be recorded. After stopping, you can save the recording as a file.
Monitor Audio While Recording (Optional)
So you're not "deaf" during recording, you can create a "multi-output device". This sends the audio simultaneously to BlackHole and to your speakers or headphones.
- Open the "Audio MIDI Setup" app (in Applications → Utilities).
- Click the plus icon at the bottom left and select "Create Multi-Output Device".
- In the list, select your normal speakers/headphones and "BlackHole 2ch". Enable "Drift Correction" for both.
- Right-click the new multi-output device and select "Use This Device For Sound Output".

Here's also a guide on how to record iPhone audio with your Mac.
Frequently Asked Questions About Mac Audio Recording
Is BlackHole really free and safe?
Yes, BlackHole is completely free and open source. It's a safe virtual audio driver used by many professionals for audio routing on Mac.
Can I monitor the audio while recording?
Yes, by creating a multi-output device in Audio MIDI Setup, you can send audio simultaneously to BlackHole (for recording) and to your speakers or headphones.
Is there any quality loss with this method?
No, since the audio is routed digitally within the system, there is no quality loss. The recording is in the same quality as the playback.