Advanced Audio Capture - Mac OS X

Advanced Audio Capture - Mac OS X

Advanced Audio Capture with Mac OS X

So I’ve been using Soundflower and WavTap to capture my mac audio for a long time. But I’ve never been really happy, as they have both been unreliable and unstable. I’ve been looking for an alternative for quite some time now, and I think I’ve finally found it. It’s a free open source piece of software known as Jack(osx) (http://jackaudio.org). Not only does it seem more reliable (I 've been using it for half a year now), but also allows you to capture each individual sound source separately, allowing for advanced audio routing with sheer endless possibilities. In this guide I’m going to show you a basic audio capture and a few possible advanced applications I could think of.

1. Basics

1.1 Game Audio Capture (aka what Soundflower / WavTap does)
  1. Download and install Jack2 from this site: http://jackaudio.org/downloads/ Follow the instructions.
  2. Open JackPilot
  3. Preferences: It is important to select Built-in Output as your Output Device. As your Input Device you would normally set your microphone, but since we select our microphone directly in OBS, it doesn’t really matter what you select here. Set the sample rate to whatever you use in OBS.
    zF3e1pI.png
  4. Go to System Preferences -> Sound -> Output and select JackRouter. Do the same for Input.
    lHMof2r.png

    Guc427f.png
  5. Back to JackPilot. Push Start. This will launch the sound server. Note that most likely you won’t hear anything right now. Don’t panic.
  6. We now want to setup OBS. Open OBS, go to Settings -> Audio and select JackRouter as your Mic/Auxiliary Audio Device.
    cIEYrxp.png
  7. You should now see the volume sliders for Mic/Aux in the OBS mixer.
    ItgPPTm.png
  8. Open up your game you want to stream.
  9. Now back to JackPilot. Click on Routing.
  10. You now have the Connections Manager in front of you. Here’s where the magic happens. You can route Send Ports to Receive Ports. You should see your game (something like hl2_osx, HotlineMiamiStea, cider, …) as a send port, and obs as a receive port. Now we need to link „game to system“. Click on the game once. Then click on system twice. System should now be red, and you should hear game audio. Now link „game to obs“, again by clicking on the game once, and double clicking on obs. If you have a look at JackPilot, it should display 4 connections.
    EroQmia.png

    NL0KhgT.png
  11. Go back to OBS. You should have game audio in OBS. Congratulations!
1.2 Adding another sound source

Want to play music in your stream? No problem.
1. Open up iTunes (for example).
2. Go back to the Connections Manager. You should see iTunes as a send port. Simply link „iTunes to system“ and „iTunes to obs“ like you did in 1.1.
c2Bxguc.png


3. You now have game audio and music in OBS. Congratulations!

A few tips:
- The more connections you make, the more CPU it will use. The basic audio capture from 1.1 uses 4 connections. Add one source (like in 1.2) and you have a total of 8 connections.
- Always start Jack before you start your program to capture. Otherwise it might not appear in the Connections Manager.
- If you quit JackPilot, the server will still run in the background. If you wish to stop the server, hit Stop in JackPilot.
- You can link individual channels (left or right) by clicking the arrow next to the port and selecting out1/2 and in1/2. (Note: I had to use this to capture the audio from GTA, as cider only outputs to one channel)
- Read the manual if you want to know more.

2. Advanced

2.1 Adding your microphone

If you select your microphone in the preferences of JackPilot, then the system send port should represent your mic. However, you possibly need to create an aggregate Device in your Audio Midi Setup in order to still use the Built-In Output.

zew2aa7.png

Select the aggregate device as input and output in the preferences of Jack. This really depends on the mic, though.

2.2 Applying Effects

It’s very simple to add standard audio effects. Go and get Au Lab from apple (for free). (https://www.apple.com/itunes/mastered-for-itunes/)
Make a new Document (Stereo In/ Stereo Out) with JackRouter as Input and Output Device.

8C4mIOu.png


AU Lab should now appear as Send/Receive Ports in JackPilot, where the Receive Port represents Audio 1 (Input) in AU Lab, and the Send Port represents Output 1. Make sure the Audio Engine is running (click at the bottom). Now you can add any effect you like.

ZmXYbPb.png


2.1 and 2.2 could be combined to add an effect to your microphone (like EQ). However we have one little problem: There are no volume controls in Jack. So we can in theory route both the game audio and microphone via Jack to OBS. But OBS only has 2 input ports. This means it gets really impractical. To get the right mix, we would need to lower the volume of the game a lot, which leads to us not hearing the game whilst streaming.
This issue is solved. All you need to do is mix everything in AU Lab. Here's how: You route everything to AU Lab, then apply filters / effects to whatever input channel(s) you like and adjust the volume of differerent audio sources. The mixed down result is then routed to OBS. Below are some screenshots of my settings (using qjackctl, see 2.6). I have given AU Lab 5 Input channels (stereo for music, stereo for ingame sound, mono for mic) and 4 output channels(stereo for mic, stereo for ingame+music). This way I can monitor what the stream hears (the mixdown of music and game), without hearing my own voice through the microphone. You can see the required connections down below. The volume is controlled with sliders next to the audio meters. To change the "Input Source of a Output" you need to click the small number next to the audio meters (yellow for on, grey for off). You can save your specific settings with File > Save As. This setup gives you full control over the volume, while applying effects and monitoring everything with professional audio meters. What more do you want? Here's a good website that explains the AU Lab window: http://sdg.mesonet.org/people/brad/.../AU Lab Documentation/AULabHelp/Document.html

KE8NbPQ.png


osUK21Y.png


Q7ig7QG.png


2.3 Recording multiple audio tracks

Want to record only the game without the music you are playing on stream? No problem. Use OBS to record the gameplay, and Audacity to record the different audio tracks. The audio tracks can later be seperated in your editing software.

An example: You want to record music, game sound and your (mono) microphone:
1. In the JACK preferences set "Virtual Input/Output Channels" to 5.
HnbNd39.png


2. Open Audacity and set the recording device to "JackRouter". Select 5 Channels.
oboeM41.png


3. Start recording in Audacity and then connect up Audacity in JACK. (OBS not set up in this screenshot)
eknMl1a.png


4. Watch as your tracks are recorded.
ZYoUfE7.png


5. Export the audio file with 5 tracks. (File > Export Audio)
3rrF22u.png


6. Open the file in your editing software (in my case FCPX).
y3Vk1XF.png


7. Add the gameplay video from OBS. Voilà!

2.4 Monitor your stream

If you have an external sound card (or a mic with headphone output), you can route your twitch stream (running in Firefox = "plugin-container" for example) to this second output (usually playback 3 and 4). Without an echo on stream!

yLA637R.png



2.5 Elgato Game Capture HD

Want to capture audio coming through the Elgato software, without it playing on your speakers? No problem! Simply route "Game Capture HD" to "obs" (and don't route it to "system", obviously). Voilà.

fFJujDI.png


2.6 Alternative: qjackctl

Qjackclt has become my go-to Jack GUI. In order for qjackctl to work you need to set Server Path to "/usr/local/bin/jackdmp" and Driver to "coreaudio" in the preferences. If you set the Frames/Period to a low value, you get a low latency. However, setting this too low will result XRUNs, which is bad. You want to find a the lowest setting, that gives you (almost) no XRUNs. For me this is 512 (this gives a latency of 32ms, which is not really noticeable).

sR8AoqL.png


bnzzX01.png


Now you can start the server. Note that all settings (like number of channels, sample rate) you set in JackPilot still apply. The number under "Started" is the XRUN count. To route audio press "Connect". In "Patchbay" you can set presets of connections that automatically connect once you open it.

---

I hope this helps someone. Let me know if it works for you and have fun streaming! :D

(Everything tested under Mac OS X 10.9 and OBS 0.10.1)

P.S.: If you find a typo, you can keep it.
P.P.S.: I could have made a 20 minute youtube video to gain some viewers. But I hate those long tutorial videos. Imho a guide like this with pictures is much clearer. If you still want to check out my stuff, go to https://www.youtube.com/channel/UC98dbu_q5JvQuiL71npdw_Q or catch me live over at http://www.twitch.tv/ZaphodZoidberg :P
Author
Zaphod Zoidberg
Views
40,845
First release
Last update
Rating
5.00 star(s) 3 ratings

Latest reviews

Excellent guide. Plenty of details and great use of screenshots!
Top