<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Pipewire on blog.rymcg.tech</title>
    <link>https://blog.rymcg.tech/tags/pipewire/</link>
    <description>Recent content in Pipewire on blog.rymcg.tech</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <managingEditor>ryan-blog@rymcg.tech (EnigmaCurry)</managingEditor>
    <webMaster>ryan-blog@rymcg.tech (EnigmaCurry)</webMaster>
    <copyright>Copyright © 2020-2026, EnigmaCurry</copyright>
    <lastBuildDate>Thu, 09 Apr 2026 12:00:00 -0600</lastBuildDate><atom:link href="https://blog.rymcg.tech/tags/pipewire/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Record Firefox Audio in Audacity with PipeWire</title>
      <link>https://blog.rymcg.tech/blog/linux/pipewire-record-firefox-audacity/</link>
      <pubDate>Thu, 09 Apr 2026 12:00:00 -0600</pubDate>
      <author>ryan-blog@rymcg.tech (EnigmaCurry)</author>
      <guid>https://blog.rymcg.tech/blog/linux/pipewire-record-firefox-audacity/</guid>
      <description>&lt;p&gt;This guide shows how to record audio playing in Firefox using
Audacity, with PipeWire as the audio backend. You&amp;rsquo;ll create a virtual
sink to route Firefox audio into Audacity, and use qpwgraph to set up
monitored playback so you can hear what you&amp;rsquo;re recording through your
headset.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;PipeWire (with pipewire-pulse)&lt;/li&gt;
&lt;li&gt;Audacity&lt;/li&gt;
&lt;li&gt;qpwgraph&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;create-a-virtual-sink&#34;&gt;Create a virtual sink&lt;/h2&gt;
&lt;p&gt;Create a null sink called &lt;code&gt;recordbus&lt;/code&gt; that will act as an
intermediate audio bus:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl load-module module-null-sink sink_name&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;recordbus &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sink_properties&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;device.description&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;recordbus
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a virtual sink with an associated monitor source
(&lt;code&gt;recordbus.monitor&lt;/code&gt;). Firefox audio will be routed into this sink,
and Audacity will record from its monitor.&lt;/p&gt;
&lt;h2 id=&#34;route-firefox-to-the-virtual-sink&#34;&gt;Route Firefox to the virtual sink&lt;/h2&gt;
&lt;p&gt;In your PipeWire/PulseAudio volume control (e.g., &lt;code&gt;pavucontrol&lt;/code&gt;), move
Firefox&amp;rsquo;s output to the &lt;code&gt;recordbus&lt;/code&gt; sink. Alternatively, you can do
this from the command line once Firefox is playing audio:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Find the Firefox sink input indexes&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Look for entries with application.name = &amp;#34;Firefox&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl list sink-inputs | grep -B &lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;application.name = &amp;#34;Firefox&amp;#34;&amp;#39;&lt;/span&gt; | grep &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Sink Input #&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Move all Firefox sink inputs to recordbus&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl list sink-inputs | grep -B &lt;span style=&#34;color:#ae81ff&#34;&gt;20&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;application.name = &amp;#34;Firefox&amp;#34;&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  | grep &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Sink Input #&amp;#39;&lt;/span&gt; | grep -o &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;[0-9]*&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  | xargs -I&lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; pactl move-sink-input &lt;span style=&#34;color:#f92672&#34;&gt;{}&lt;/span&gt; recordbus
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;set-the-default-recording-source&#34;&gt;Set the default recording source&lt;/h2&gt;
&lt;p&gt;Set &lt;code&gt;recordbus.monitor&lt;/code&gt; as the default source so that Audacity will
pick it up automatically:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl set-default-source recordbus.monitor
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;configure-audacity&#34;&gt;Configure Audacity&lt;/h2&gt;
&lt;p&gt;In Audacity, set the recording device to the generic &lt;strong&gt;PipeWire&lt;/strong&gt;
input. Since you&amp;rsquo;ve set &lt;code&gt;recordbus.monitor&lt;/code&gt; as the default source,
Audacity will capture Firefox audio from the virtual sink rather than
your headset microphone.&lt;/p&gt;
&lt;p&gt;Hit Record in Audacity and play audio in Firefox. Audacity will
capture the Firefox audio stream.&lt;/p&gt;
&lt;h2 id=&#34;enable-silent-monitoring-with-qpwgraph&#34;&gt;Enable silent monitoring with qpwgraph&lt;/h2&gt;
&lt;p&gt;By default, you won&amp;rsquo;t hear the audio while recording because it&amp;rsquo;s
being routed to the virtual sink instead of your headset. To monitor
the recording through your headset, use qpwgraph to connect
Audacity&amp;rsquo;s monitor outputs to your headset.&lt;/p&gt;
&lt;p&gt;Open qpwgraph:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;qpwgraph
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In the graph, make these connections:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;PipeWire ALSA [audacity.bin]:monitor_FL&lt;/code&gt; → your headset&amp;rsquo;s &lt;code&gt;playback_FL&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;PipeWire ALSA [audacity.bin]:monitor_FR&lt;/code&gt; → your headset&amp;rsquo;s &lt;code&gt;playback_FR&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This routes Audacity&amp;rsquo;s monitor output to your headset so you can hear
what&amp;rsquo;s being recorded in real time.&lt;/p&gt;
&lt;h3 id=&#34;save-and-activate-the-patchbay&#34;&gt;Save and activate the patchbay&lt;/h3&gt;
&lt;p&gt;To make this routing persistent and automatic:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In qpwgraph, go to &lt;strong&gt;Patchbay&lt;/strong&gt; → &lt;strong&gt;Save&lt;/strong&gt; to save the current
graph connections as a patchbay file.&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;Patchbay&lt;/strong&gt; → &lt;strong&gt;Activated&lt;/strong&gt; so that qpwgraph will
automatically restore these connections whenever the relevant audio
nodes appear.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With the patchbay activated, whenever Audacity&amp;rsquo;s audio node appears,
qpwgraph will automatically connect its monitor outputs to your
headset. You don&amp;rsquo;t need to manually reconnect each time.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;The complete audio routing looks like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Firefox → recordbus (virtual sink)
                ↓
       recordbus.monitor → Audacity (recording input)
                              ↓
              Audacity monitor → Headset (via qpwgraph patchbay)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;restore-your-default-microphone&#34;&gt;Restore your default microphone&lt;/h2&gt;
&lt;p&gt;When you&amp;rsquo;re done recording, restore your normal microphone as the
default source:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl set-default-source alsa_input.usb-YOUR_DEVICE_NAME.analog-stereo
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replace the device name with your actual microphone&amp;rsquo;s PulseAudio
source name. You can list available sources with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pactl list sources short
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    
  </channel>
</rss>
