ffmpeg with blackhole audio "crackling" noises, why?

Solution 1:

I am unable to get anything out of FFMPEG that's not a mess of crackles. I tried Soundflower, BlackHole and Rogue Amoeba's Loopback trial. A couple of Google results implied that FFMPEG v4.2 might be OK with later versions causing trouble (current latest at time of writing is v4.4), but v4.2 was no different for me.

The solution I ended up with was:

  • Use sox instead of ffmpeg, e.g. installed via Homebrew
  • Install BlackHole 2-channel - https://github.com/ExistentialAudio/BlackHole
  • I use AudioSwitcher (https://apps.apple.com/us/app/audioswitcher/id561712678) to easily switch devices, but System Preferences works too and there are FOSS solutions if you dig around
  • If you can't see BlackHole as a system audio output device, then in Audio MIDI Setup, create an aggregate device with an easy to type name and you should be able to select that instead

At this point, you should be all set. Record with e.g.:

sox -t coreaudio "BlackHole 2ch" ~/foo.flac