# JACK + OBS = No Sound?



## OnkelTem (May 31, 2020)

This issue is similar to another one posted earlier but unlike the situation described there I never receive any audio at all.

I have configured two  JACK inputs in OBS:

OBS JACK - Browser audio
OBS JACK - AG03 Output;
and wired them up in Catia:






("system" represents an external audio mixer — Yamaha AG03)
and began to receive singal over these two inputs:





Now, when I record a video I get no audio at all in there.

This is my Audio settings page:





as you see I haven't selected any device in the Devices lists, because those lists don't provide anything usefull except for PulseAudio, who's "trubu ja shatal".

Latest log from OBS: https://obsproject.com/logs/B29FaiKv_plzCLwy

Also this is a video recorded just now to demonstrate the problem:

https://www.youtube.com/watch?v=mggeOs3lkbg


*Do you have any ideas what's wrong with this setup and how to resolve this issue?*


----------



## OnkelTem (Jun 1, 2020)

Created a bug report: https://github.com/obsproject/obs-studio/issues/3021


----------



## Fenrir (Jun 1, 2020)

Can you also provide a screenshot of the track settings in Edit -> Advanced Audio Properties?


----------



## OnkelTem (Jun 1, 2020)

Hi Fenrir.

Voila:






I also tried enabling all the tracks here.


----------



## Fenrir (Jun 1, 2020)

Ah, here:


```
00:46:15.758: Max audio buffering reached!
```

Typically that means there's something wrong with the device (it can't keep up) or your system (usually, again, it can't keep up). Either way, points to some kind of environment issue, not an issue with OBS.


----------



## OnkelTem (Jun 1, 2020)

Not really clear.
Let's do it one more time.
I've just cleared all the logs, deleted all the previous audio inputs.
Then I restarted OBS, added a new JACK Input, connected it, started the recording, stopped the recording.
No sound.
Log: https://obsproject.com/logs/KJ-Q8QxnGjk39r9t

---

Ah, I see these lines:


```
22:44:28.538: User added source 'JACK Input Client' (jack_output_capture) to scene 'JackTest'
22:44:28.564: Max audio buffering reached!
22:44:28.564: adding 1044 milliseconds of audio buffering, total audio buffering is now 1044 milliseconds (source: JACK Input Client)
```

What does this mean particularly and who sets this message? What are my further steps?

My device is an external mixer connected via USB. To be specific it is Yamaha AG03:






I see no problems reported in the syslog or by JACK (which is serving this device).


----------



## OnkelTem (Jun 1, 2020)

Fenrir said:


> ..



I did the following:

*I deleted that JACK Input Client* source
switched to some other (PulseAudio) source,
did some recording (which went well btw, with the proper sound)
and finally *added a new JACK Input Client again, and no message has appeared anymore. *

Then I tried restarting the JACK server, while OBS was running and afterwards - adding a new JACK Input Client. 
This has neither worked (again - no audio) nor it has brought the message again.

Which means that probably that message has nothing to do with the issue OR that it indicates that JACK plugin has ruined itself.
So it looks like a problem inside OBS, Joel.


----------



## Fenrir (Jun 1, 2020)

The buffering typically increases when the device is not sending data properly. When the max buffer (about one second) is reached, audio is effectively stopped from being output. It's not an issue internally to OBS, the data being sent in is faulty. I don't have enough technical understanding on how Jack works to know where you need to look, but a max buffer issue is not caused by OBS, it's caused by the device/audio input itself.


----------



## OnkelTem (Jun 1, 2020)

Fenrir said:


> ..



But if one deletes a JACK Input and then adds it back - shouldn't the message reappear? I'm not aware how OBS plugin system work, but I suppose a new instance is a new instance and it doesn't borrow whatever it had in its previous incarnations :)

That's said, I've discovered something new. Roughly speaking - I managed to get the sound, but no joy...

First, a scenario when sound doesn't work:


Run OBS with an active scene collection where all the audio sources are removed and with Settings w/o enabled Audio Devices.
Add some JACK Input source
Connect it to some audio source in *qjackctl* or your connections creating software
Record a video => NO AUDIO
Now a scenario when sound does work:

Same as before
*Add some PulseAudio source*
Add some JACK Input source
Connect it to some audio source in *qjackctl* or your connections creating software
*Remove the PulseAudio source*
Record a video => AUDIO IS FINE
Clean log of the latter scenario:  https://obsproject.com/logs/5Vn61NZMCMRzQQJQ

So as you see, some manipulations inside OBS magically made it working...


----------



## VennStone (Jun 2, 2020)

I do hope a solution is found for this. The RNG when recording audio with Jack (stream audio always works) is a bit frustrating. Even when it works there is a good chance of the audio being out of sync. This is with audio from a local interface and the audio being brought over the network using netjack. 

I've resorted to using _pulseaudio_-module-jack and bringing the audio in that way. It's not pretty, but it works.


----------



## OnkelTem (Jun 2, 2020)

VennStone said:


> I've resorted to using _pulseaudio_-module-jack and bringing the audio in that way. It's not pretty, but it works.



Same here. And since I needed more than one bridge between PA and JACK, I disabled PA jack autodetecting module, and create sinks/sources manually. At some point I ended up with this script:

https://gist.github.com/OnkelTem/a9630a9a75774a7bdb5a5481fe7a3d81

but now I'm working on a less verbose version. Basically, I don't want to depend on qjackctl or Catia and any other such software.
I dream of a version with just few lines, e.g.;


```
. functions

init -dalsa -dhw:AG06AG03 -r44100 -p256 -n3
connect pa:play1 system carla pa:rec1
connect pa:play1 pa:rec2
```

where `pa:play1` - is a PA sink, and `pa:rec1` and `pa:rec2`  - two PA sources (for recording, as I need two sound tracks).
See, just 3 lines and we can get JACK with 4 connections fully configured and running.
I barely imagine anything easier...


----------



## VennStone (Aug 3, 2020)

Fenrir said:


> The buffering typically increases when the device is not sending data properly. When the max buffer (about one second) is reached, audio is effectively stopped from being output. It's not an issue internally to OBS, the data being sent in is faulty. I don't have enough technical understanding on how Jack works to know where you need to look, but a max buffer issue is not caused by OBS, it's caused by the device/audio input itself.



I had a little spare time this morning to record OBS misbehaving with Jack2 using netone, most of my audiochain is IP based. I make extensive use of Jack in the studio and OBS is the only application not to record audio with Jack1 or 2. I should say reliably since it occasionally works. 

For this example I have a single stereo pair and one mono channel. Audacity is recording the stereo pair from the same Jack source as OBS. 








						OBS Jack Bug
					






					www.youtube.com
				




OBS shows that it is receiving audio on the assigned tracks. However, on the two video samples all 5 audio tracks are empty. This is not the case when using ffmpeg directly or when using multiple Pulseaudio sinks in OBS. 

Now the curious part is the stereo mixdown will make it to any streaming service you point OBS at. Granted, the audio is rarely in sync with the video. 



> Max audio buffering reached!


Jack would be throwing ProcessGraphAsyncMaster: Process error or at least generating some XRuns if something was amiss, yes?

This can be reproduced with any interface in my rack. (pictured) 

I would like to see this bug reopened because people can and have lost data to it. Myself included.

Log attached.


----------



## Birdulon (Dec 1, 2020)

Might be a bit late for OP, but chiming in for anyone who ended up here from googling the issue like I did.
Adding a small sync delay (20ms) to all of the Jack inputs via Advanced Audio Properties got it working for me, I suspect the default buffers take issue with the timing of certain sources and the above workarounds with bridges manage to produce streams that don't bother it as much.


----------



## VennStone (Dec 17, 2020)

This fixes the issue on my end. 









						linux-jack: fix timestamps, deadlock on shutdown, and port type by marcan · Pull Request #3879 · obsproject/obs-studio
					

Resubmit of #3856 (sigh). Description Bug fixes for linux-jack:  Mark input ports as terminal type. This means latency compensation does not expect to find other output ports that the data flows ou...




					github.com


----------



## Jiminimonk (Dec 27, 2020)

I hope this gets merged in soon.


----------



## Spy_Emanciator (Apr 9, 2022)

Ok so trying to stream live production on OBS to twitch & Youtube. Used to be a piece of cake until my PC fried and now I'm down to my DJ'ing laptop which happens to be a Macbook.

Somehow in their infinite wisdom they have decided to make OBS incompatible with receiving basic audio from the system and broadcasting it. So I've done the trouble shooting and found the only non subscription program that does this is QJackCTL from JackAudio. Once installing it and following the instructions here:









						How to setup OBS on macOS Mojave using JackPilot
					

Download Links:http://jackaudio.org/downloads/https://github.com/jackaudio/jackaudio.github.com/releases/tag/1.9.11 Support me on Patreon https://www.pat...




					www.youtube.com
				




First off they have changed their website and the program version since the video and as far as I can tell the program is harder to use and not effective in my case. When I go through the equivalents shown in the video on the "newer" build, I don't get QJackCTL listed in OBS as a mic source. Tried tweaking all the little settings in there and so forth. So I'm back at square one again and unable to afford a subscription service like SV Audio or equivalent.

Have I gone mad or is this somehow immoral that OBS and mac are that estranged and feeding the profiteering cycle for basic user function?

Demo Photo:









						imgur.com
					

Imgur: The magic of the Internet




					imgur.com


----------

