Question / Help Audio Capture with JACK

Zaphod Zoidberg

New Member
To all of you who want more control over sound:
I've written a little guide for advanced audio capture with a free open-source software called JACK. In my opinion it is a far superior alternative to Soundflower and WavTap. Let me know what you think and if it worked for you. :)

https://obsproject.com/forum/resources/advanced-audio-capture-mac-os-x.142/

Also a question for the devs: Would it be possible to give OBS 4 receive ports? (for the details see guide)

I hope this helps someone!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
The 'desktop audio' 1 and 2 options in audio settings simply create "Audio Output Capture" sources that are independent of the scenes.

You can do a similar thing by simply adding an audio output source to your scene, and then using that same source in the other scenes as well. Might consider consider some more in audio settings advanced later, but you can do the same thing without it just by manually creating that source and adding it to the scenes themselves (note: do not create duplicates, instead make it simply use the same source for multiple scenes you want to use it in)
 

Zaphod Zoidberg

New Member
@Jim I think you misunderstood me. That's not what I'm talking about. I've already been able to add Jack as a "global" audio source (simply by adding it as a Mic/Aux device).

My question was: Can we give OBS 4 audio input channels (so that it appears as in1, in2, in3, in4 under "obs" in Jack, see my guide, last picture). What I want to achieve: Have two seperate volume sliders for Jack in OBS. In other words: have one slider for in1+in2 and another slider for in3+in4. This way we can route the mic to in1+in2 and the game to in3+in4 and control the volume of these two sources independently (as there is no volume control in Jack).
 

keybounce

Member
Jack does not seem to remember what my settings were for a program; every time I start a program, no matter what it's past audio routing was, it starts going to system:playback_1 and system:playback_2; equally, it wants input to the system:capture_1 and _2.

It doesn't remember that safari's plugins should use playback_4 and _3 (yes, they're reversed), nor which programs want a different capture (output of another program).
And, I can't actually select my video capture program until after I start a recording, so my first recording has to be tossed after setting up, and restarted.

Is this normal, or am I doing something wrong?
 

RaqibMarvelous

New Member
Sadly, it looks like JACK doesn't work with Yosemite. I can get it to recognize my microphone, but speakers do not work at all.
 

keybounce

Member
@keybounce Have you tried 'File -> Save Studio Setup' in Jackpilot?
No.

I'm looking at a simpler case: Jack/Jack pilot never exits. The program that is being routed exits, and restarts, and when it does, it gets a fresh "default" setting of the first two channels of the output device.

Jack and Jack Pilot never exit, so there's nothing to re-load.
 

Zaphod Zoidberg

New Member
  • The good news: Ok, so I have figured out a way to give OBS 4 input ports: Simply set Virtual Input/Output Channels to 4 in the JACK Server preferences.
iR4JPit.png


  • My goal is: I want 3 seperate audio tracks for Music / Game / Microphone.

307dcpW.png


LPOYX7h.png


  • The problem: OBS can not recognize the 4 different input channels from JACK individually. It mixes them all down into 2 channels ("JackRouter"). ¨¨
  • My question: Would it be possible to somehow tell OBS to only use channel 1 and 2 from JACK for "Mic/Aux 1" (-> music from Itunes) and only channel 3 and 4 for "Mic/Aux 2" (-> sound from game)?

OK0KxX5.png


I really hope this works. This way we would have total control over audio! :D
 

keybounce

Member
Meanwhile, Jack now remembers the routing for a program as long as Jack doesn't quit. Of course, since Jack will gladly quit if it thinks someone else has tampered with the audio (repeat by: Turn the HDMI monitor off at night, turn it back on in the morning, and Jack complains when I turn it on that the audio settings have changed), this is of limited use.

Saving settings doesn't help, as Jack complains unless every program that was sending audio before is sending audio now. The program can be running, and not doing any audio -- jack won't see it, and complains that it's not there. Far too picky/demanding.

I still don't understand why some programs get no sound at all with Jack until i manually route them, while others get channels 1 and 2 by default.
 

keybounce

Member
Meanwhile, Jack now remembers the routing for a program as long as Jack doesn't quit. ...

Or not -- Minecraft (shows up as "Java") sometimes remembers it's audio settings over a crash and restart, and sometimes not.

I did not know about this. Thank you.
Now, about this "asla" stuff...

Code:
p, li { white-space: pre-wrap; }
09:48:25.587 Patchbay deactivated.

09:48:25.624 Statistics reset.

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

09:49:30.420 Startup script...

09:49:30.421 artsshell -q terminate

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

sh: artsshell: command not found

09:49:30.825 Startup script terminated with exit status=32512.

09:49:30.827 JACK is starting...

09:49:30.828 /usr/local/bin/jackd -dalsa -dhw:0 -r48000 -p1024 -n2

09:49:30.830 JACK was started with PID=57465.

Unknown driver "alsa"

jackdmp 1.9.10

Copyright 2001-2005 Paul Davis and others.

Copyright 2004-2014 Grame.

jackdmp comes with ABSOLUTELY NO WARRANTY

This is free software, and you are welcome to redistribute it

under certain conditions; see the file COPYING for details

09:49:30.866 JACK was stopped with exit status=255.

09:49:30.866 Post-shutdown script...

09:49:30.866 killall jackd

No matching processes belonging to you were found

09:49:31.275 Post-shutdown script terminated with exit status=256.

09:49:33.049 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

09:49:40.746 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

09:49:52.309 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

09:50:12.493 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

(copy/paste from that window is painful.)

===

EDIT: So with manually selecting coreAudio (why is that not the default), jack is up and running. Now to see how well this interface works.
 
Last edited:

keybounce

Member
1. How do I get qJackctl to support the "monitor" / playback of the outputs?
2. I'm pointing it at a composite device that has 6 outputs and 2 inputs. It shows me 6 outputs and 4 inputs. What?
3. Is there a way to specify which device it will use, separate from (what seems to be the case) the "default audio" device?
4. Does qJackCtl let me specify the default output channels, instead of defaulting to channels 1 and 2 of my composit device?
 

Zaphod Zoidberg

New Member
Just a quick update:
  • I've switched to using a much nicer GUI called "qjackctl" (should already be installed, see section 2.6 in my (updated) guide).
  • I've also found a workaround to my initial problem of this thread. Instead of trying to give OBS two different sources and mix it in OBS, I now do all the volume adjustments (mixing) in AU Lab and hand over the final mixed down audio to OBS (including music, ingame and microphone). This way I have precise control over my audio sources, can apply audio effects/filters and have a professional audio meters. For instructions and details see section 2.2.
JACK is still my preferred way of capturing audio; it has been working like a treat :D
 
Top