How to connect JACK input Client to f.e Zoom

etron770

New Member
I am getting the Micro into the JACK input Client, but not to Zoom.
What do I have to connect?
Configuration see pictures:

Screenshot_screenshot jack client.png

Screenshot_Jack.png
 

AaronD

Active Member
Close to the top right, you have a "ZOOM VoiceEngine". What does that do?

That said, I'd shy away from using JACK in OBS. Yes, it works......as long as you never change scenes. When a scene becomes inactive, like when you switch away from it, its JACK clients disappear, and their connections with them. Then when you switch back to that scene, the JACK clients come back, but their connections don't. Unless you have something to auto-reconnect them?

I do this instead, in a script:
Bash:
#
# Start Jack
#

echo
echo "Start Jack"
qjackctl &
PID_JACK=$!
sleep 5

#
# Create Bridges to/from PulseAudio
#

echo
echo "Create Bridges to/from PulseAudio"
INDEX_SINK_0=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_Playback     client_name=PA_out_Playback     )
INDEX_SINK_1=$(     pactl   load-module     module-jack-sink    channels=2    sink_name=PA_out_Meet_Rtrn    client_name=PA_out_Meet_Rtrn    )
INDEX_SOURCE_0=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_Mics          client_name=PA_in_Mics          )
INDEX_SOURCE_1=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_Meet_Send     client_name=PA_in_Meet_Send     )
INDEX_SOURCE_2=$(   pactl   load-module     module-jack-source  channels=2  source_name=PA_in_Record        client_name=PA_in_Record        )

#
# Remove Automatic Connections
#

disconnect_all ()
{
    for CONNECTION in $(jack_lsp --connections "$1")
    do
        if [[ "$CONNECTION" = "$1" ]]
        then
            continue
        fi
        jack_disconnect "$1" "$CONNECTION"
    done
}
disconnect_all system:capture_1
disconnect_all system:capture_2
disconnect_all system:playback_1
disconnect_all system:playback_2

#
# Save and Set Default Connections
#

PA_DEFAULT_SINK=$(      pactl   get-default-sink    )
PA_DEFAULT_SOURCE=$(    pactl   get-default-source  )
pactl   set-default-sink    PA_out_Playback
pactl   set-default-source  PA_in_Mics

#
# Create Bridges to/from Mic, Spk
#

echo
MIC0=hw:CARD=U192k,DEV=0
SPK0=hw:CARD=U192k,DEV=0

echo "Use MIC0: $MIC0"
zita-a2j -j MIC0 -d $MIC0 -c 2 -r 48000  &
PID_MIC0=$!
sleep 1

echo "Use SPK0: $SPK0"
zita-j2a -j SPK0 -d $SPK0 -c 2 -r 48000 &
PID_SPK0=$!
sleep 1

And later:

Bash:
#
# Remove Bridges to/from Mic, Spk
#

echo
kill -TERM "$PID_MIC0"
sleep 1

kill -TERM "$PID_SPK0"
sleep 1

#
# Restore Default Connections
#

echo
echo "Unload Bridges between Jack and PulseAudio"
pactl   set-default-sink    "$PA_DEFAULT_SINK"
pactl   set-default-source  "$PA_DEFAULT_SOURCE"

#
# Remove Bridges to/from PulseAudio
#

pactl unload-module $INDEX_SOURCE_2
pactl unload-module $INDEX_SOURCE_1
pactl unload-module $INDEX_SOURCE_0
pactl unload-module $INDEX_SINK_1
pactl unload-module $INDEX_SINK_0

#
# Stop Jack
#

echo
echo "Stop Jack"
kill -TERM "$PID_JACK"
sleep 1

That way, I have a PulseAudio connection for each individual signal, and that *doesn't* go away.

And, I do all of my audio work in a DAW anyway. Not OBS. The PA bridges are *only* for what OBS actually needs, with no processing in OBS at all. Everything is done in the DAW, and everything connects to the DAW.
 

etron770

New Member
Thank you for your answer,

I do not know what ZOOM VoiceEngine is for – something which starts with Zoom.
Maybe I should explain the issue: The issue is delay between Video and Audio. I need to adjust the audio to the OBS video output.

To your script: I am using openSUSE with wireplumber, not PulseAudio. Trying to switch to PulseAudio causes more errors
Starting the script I get:
Create Bridges to/from PulseAudio
Failure: No such entity
Failure: No such entity
Failure: No such entity
Failure: No such entity
Failure: No such entity
./StartJack.sh: Zeile 29: jack_lsp: Kommando nicht gefunden.
./StartJack.sh: Zeile 29: jack_lsp: Kommando nicht gefunden.
./StartJack.sh: Zeile 29: jack_lsp: Kommando nicht gefunden.
./StartJack.sh: Zeile 29: jack_lsp: Kommando nicht gefunden.
Failure: No such entity
Failure: No such entity
I do not find the missing jack_lsp


| lsp-plugins | Linux Studio Plugins Project (Stand-alone) | Paket
| lsp-plugins | Linux Studio Plugins Project (Stand-alone) | Quellpaket
| lsp-plugins-common | Linux Studio Plugins (Common files) | Paket
| lsp-plugins-devel | Linux Studio Plugins Development files | Paket
| lsp-plugins-doc | Linux Studio Plugins Documentation | Paket

No one is providing jack_lsp
 

AaronD

Active Member
I do not know what ZOOM VoiceEngine is for – something which starts with Zoom.
What happens if you connect the mic to it anyway? :-)

Maybe I should explain the issue: The issue is delay between Video and Audio. I need to adjust the audio to the OBS video output.
Live audio delay from a mic to an app other than OBS? That's one of the things that my DAW does. Insert the delay plugin (or several) at the right spot(s) in the DAW's processing chain, and tune as needed.
 

etron770

New Member
Live audio delay from a mic to an app other than OBS? That's one of the things that my DAW does. Insert the delay plugin (or several) at the right spot(s) in the DAW's processing chain, and tune as needed.
I assume DAW = Digital Audio Workstation.
Which DAW would you suggest? I need a nearly exact synchronization between OBS and audio. The audio is now before the Video output.
So I'm looking for the best solution, and not necessarily for integration into OBS
 

AaronD

Active Member
I assume DAW = Digital Audio Workstation.
Yes.

Which DAW would you suggest?
I like Ardour, but as I'm sure you know, there are lots of them to choose from.

I'm on Ubuntu Studio, so it's already preinstalled and working, along with a bunch of plugins, and OBS. To install it manually on another Debian-based system, it's just sudo apt install ardour, and then see what it takes to get some plugins. YMMV.

I need a nearly exact synchronization between OBS and audio.
How exact? Within 1 video frame? 1 audio sample? Only enough that a human won't notice (a small handful of frames)?

Consider how far away a source has to be in the real world, for us to perceive a mismatch. The speed of light is practically instant for this purpose, and the speed of sound in air is approximately 1000 feet/second, or 1 ft/ms. If you can tolerate an additional foot of distance, that's an additional millisecond of delay.

So how exact does it really need to be?

The audio is now before the Video output.
Good. That makes it easy.

So I'm looking for the best solution, and not necessarily for integration into OBS
The DAW should do it then. You can even integrate the DAW, or at least its control, into OBS, using the Advanced Scene Switcher plugin to look for whatever trigger you want, and send the appropriate messages to the DAW:
I use Open Sound Control (OSC):
1696090285534.png

That sets the fader for channel strip #1 to 0dB. You can also set up a 20kHz sine generator, and control some auxiliary send levels from that with a slightly different message, and feed those into the side-chain of some gates. Then the timing controls of those gates create a nice fade instead of a hard on/off like the message itself is limited to. Read the documentation. :-)
 

etron770

New Member
So how exact does it really need to be?
As exactly as a professional broadcaster is satisfied – I think that means that humans do not realize the delays.

I like Ardour, but as I'm sure you know, there are lots of them to choose from.

Ardour is already installed, but no plan how to uses it ... must read the manual
 

jebba

Member
That said, I'd shy away from using JACK in OBS. Yes, it works......as long as you never change scenes. When a scene becomes inactive, like when you switch away from it, its JACK clients disappear, and their connections with them. Then when you switch back to that scene, the JACK clients come back, but their connections don't.

I use JACK with Ardour and OBS Studio. It works great. (Would be more awesome with JACK output too...) I even disable Pulseaudio in the OBS Studio compile/build I do.

To keep JACK from disconnecting, I use the Downstream Keyer plugin, and it has the JACK input.


This way, the JACK input never drops, and I can switch scenes freely.

Learning Ardour and JACK is very much worth it. Soooooooooo much better than pulseaudio.

With respect to the delay people will notice: in my experience singers will notice if you get over 20ms delay (e.g. if you are feeding their voice back to them).

Happy hacking,

-Jeff
 

AaronD

Active Member
To keep JACK from disconnecting, I use the Downstream Keyer plugin, and it has the JACK input.


This way, the JACK input never drops, and I can switch scenes freely.
I've known about that plugin for a long time, and every once in a while I think it might be useful, but it's always been for video. I never knew it did audio too! The demo never mentioned that at all.

If I'd known that, I might have done it that way instead of what I have now. But what I have now works, solidly, and so I'm not too eager to change it. Maybe the next rig will do it that way; I'll have to wait and see what's available then.

Better, of course, would be some global JACK clients natively in OBS.
 

jebba

Member
Ya, DSK works just like a Scene, so anything you can do in a Scene you can do in DSK. You create a scene, then in the DSK panel, say "use that scene for the DSK". So any scene(s) can be used as a DSK.

Edit: I'm really surprised there isn't a DSK native in OBS Studio. Seems like a major use feature, not so hard to implement.

wrt to JACK, it would be so awesome for real JACK support in OBS. The input plugin has worked well (flawless?) for me. But out would be awesome too.
 
Top