<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>video conferencing on foosel.net</title><link>https://foosel.net/tags/video-conferencing/</link><description>Recent content in video conferencing on foosel.net</description><generator>Hugo</generator><language>en-us</language><copyright>Gina Häußge (foosel)</copyright><lastBuildDate>Sat, 11 Mar 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://foosel.net/tags/video-conferencing/feed.xml" rel="self" type="application/rss+xml"/><item><title>How to add an audio delay for video conferencing on Linux/Pulseaudio</title><link>https://foosel.net/til/how-to-add-an-audio-delay-for-video-conferencing-on-linuxpulseaudio/</link><pubDate>Sat, 11 Mar 2023 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-add-an-audio-delay-for-video-conferencing-on-linuxpulseaudio/</guid><description>&lt;p&gt;After recently switching to work under Linux, I needed a way to replicate &lt;a href="../how-to-add-an-audio-delay-for-video-conferencing-on-windows"&gt;my existing solution for delaying audio under Windows&lt;/a&gt; under Linux/Pulseaudio.&lt;/p&gt;
&lt;p&gt;To once again explain my situation, I use &lt;a href="https://obsproject.com/"&gt;OBS&lt;/a&gt; also for video conferencing, through the virtual camera&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;. OBS does not offer a built-in way to provide a virtual microphone with all the filters and such applied as well (in my case noise reduction and a limiter), so I need to solve this in a separate way. Additionally, my camera setup has a small delay of around 350ms that I also need to compensate by delaying my audio.&lt;/p&gt;</description><content:encoded><![CDATA[<p>After recently switching to work under Linux, I needed a way to replicate <a href="../how-to-add-an-audio-delay-for-video-conferencing-on-windows">my existing solution for delaying audio under Windows</a> under Linux/Pulseaudio.</p>
<p>To once again explain my situation, I use <a href="https://obsproject.com/">OBS</a> also for video conferencing, through the virtual camera<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>. OBS does not offer a built-in way to provide a virtual microphone with all the filters and such applied as well (in my case noise reduction and a limiter), so I need to solve this in a separate way. Additionally, my camera setup has a small delay of around 350ms that I also need to compensate by delaying my audio.</p>
<p>OBS offers a monitoring port that you can push your audio devices on, and that will get the filters applied, but <a href="https://obsproject.com/forum/threads/connecting-obs-with-zoom-without-av-syncing-issues.123960/post-469274">none of the configured offsets</a>. On Windows, I solved this <a href="../how-to-add-an-audio-delay-for-video-conferencing-on-windows">by using a combination of two Virtual Cable devices and RadioDelay between the two</a>.</p>
<p>Today I rebuild basically the same setup on Linux via a bunch of virtual <a href="https://www.freedesktop.org/wiki/Software/PulseAudio/">Pulseaudio</a> devices. I have this in <code>~/.local/bin/obs-virtual-mic</code>:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e">#!/bin/bash
</span></span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># create virtual speaker</span>
</span></span><span style="display:flex;"><span>pactl load-module module-null-sink sink_name<span style="color:#f92672">=</span>Virtual-Speaker sink_properties<span style="color:#f92672">=</span>device.description<span style="color:#f92672">=</span>Virtual-Speaker
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># create delayed virtual speaker &amp; associated mic</span>
</span></span><span style="display:flex;"><span>pactl load-module module-null-sink sink_name<span style="color:#f92672">=</span>Virtual-Speaker-Delayed sink_properties<span style="color:#f92672">=</span>device.description<span style="color:#f92672">=</span>Virtual-Speaker-Delayed
</span></span><span style="display:flex;"><span>pactl load-module module-remap-source source_name<span style="color:#f92672">=</span>Remap-Source master<span style="color:#f92672">=</span>Virtual-Speaker-Delayed.monitor
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># copy from virtual to delayed virtual with 350ms delay</span>
</span></span><span style="display:flex;"><span>pactl load-module module-loopback latency_msec<span style="color:#f92672">=</span><span style="color:#ae81ff">350</span> source<span style="color:#f92672">=</span>Virtual-Speaker.monitor sink<span style="color:#f92672">=</span>Virtual-Speaker-Delayed
</span></span></code></pre></div><p>Let&rsquo;s take a closer look at what this does:</p>
<ul>
<li>create two virtual sinks <code>Virtual-Speaker</code> and <code>Virtual-Speaker-Delayed</code> with <code>pactl load-module module-null-sink ...</code></li>
<li>create a virtual source for the delayed sink via <code>pactl load-module module-remap-source ...</code></li>
<li>finally mirror the sound from <code>Virtual-Speaker.monitor</code> to <code>Virtual-Speaker-Delayed</code> while adding a latency of 350ms</li>
</ul>
<p>I run this. Then OBS gets set to use <code>Virtual-Speaker</code> as monitor. In my video conferencing software I then use <code>Virtual-Speaker-Delayed</code> as my input to get my video and audio synced up.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>I prefer the flexibility and control it gives me with regards to how I show up, how my screen shows up, etc, vs what you usually get from your run-of-the-mill video conferencing tool.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>How to add an audio delay for video conferencing on Windows</title><link>https://foosel.net/til/how-to-add-an-audio-delay-for-video-conferencing-on-windows/</link><pubDate>Thu, 29 Sep 2022 00:00:00 +0000</pubDate><guid>https://foosel.net/til/how-to-add-an-audio-delay-for-video-conferencing-on-windows/</guid><description>&lt;h1 id="situation"&gt;Situation&lt;/h1&gt;
&lt;p&gt;&lt;a href="https://obsproject.com/"&gt;OBS&lt;/a&gt; used for video conferences through the virtual camera. Audio virtualized and with active OBS filters applied (limiter, noise suppression) through means of setting the monitor device to a sink created with &lt;a href="https://vac.muzychenko.net/en/"&gt;VirtualCable&lt;/a&gt; and using its source in the video conferences tools.&lt;/p&gt;
&lt;h1 id="problem"&gt;Problem&lt;/h1&gt;
&lt;p&gt;The camera feed has a slight delay of 300-400ms. The audio is thus ahead.&lt;/p&gt;
&lt;p&gt;Adding a delay through OBS doesn&amp;rsquo;t get applied to the monitor device (&lt;a href="https://obsproject.com/forum/threads/connecting-obs-with-zoom-without-av-syncing-issues.123960/post-469274"&gt;Source&lt;/a&gt;):&lt;/p&gt;</description><content:encoded><![CDATA[<h1 id="situation">Situation</h1>
<p><a href="https://obsproject.com/">OBS</a> used for video conferences through the virtual camera. Audio virtualized and with active OBS filters applied (limiter, noise suppression) through means of setting the monitor device to a sink created with <a href="https://vac.muzychenko.net/en/">VirtualCable</a> and using its source in the video conferences tools.</p>
<h1 id="problem">Problem</h1>
<p>The camera feed has a slight delay of 300-400ms. The audio is thus ahead.</p>
<p>Adding a delay through OBS doesn&rsquo;t get applied to the monitor device (<a href="https://obsproject.com/forum/threads/connecting-obs-with-zoom-without-av-syncing-issues.123960/post-469274">Source</a>):</p>
<blockquote>
<p>The sync offset that you apply in OBS only applies to either the recording from OBS or the output stream from OBS. It does not apply to the monitor. When you use a virtual cable, and you set it up as a monitor in OBS, you will hear the inputs without any sync delay. As far as I know there is no way to apply your delays to the audio monitor output.</p>
</blockquote>
<h1 id="solution">Solution</h1>
<p>Install <a href="https://www.daansystems.com/radiodelay/">RadioDelay</a>.</p>
<p>Create a second virtual cable device. Use its sink as the monitoring device in OBS, its source as source in RadioDelay, and set the sink of the first virtual cable as sink in RadioDelay. Apply the delay in RadioDelay.</p>
<p>The first cable now outputs delayed audio and can be used as audio source in the video conferencing tools.</p>
<p>You can also create a shortcut to fire up RadioDelay with the right devices selected, the delay applied and the output active with something like this:</p>
<pre tabindex="0"><code>&#34;C:\Program Files\Radiodelay\radiodelay.exe&#34; -delay 0.3 -in 5 -out 3
</code></pre><p><code>in</code> and <code>out</code> are the positions of the audio device in the drop-down list. <code>delay</code> is the delay in seconds.</p>
<p>Can of course also be used without OBS.</p>
<p><em>edit 2023-03-11:</em> <a href="../how-to-add-an-audio-delay-for-video-conferencing-on-linuxpulseaudio">Here&rsquo;s how I solved the same problem under Linux</a>.</p>
]]></content:encoded></item></channel></rss>