Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

pipewire 2 channel to 8 (7.1 / 2 + 5.1) channel filter

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
DeIM
Guru
Guru
User avatar
Posts: 465
Joined: Tue Apr 11, 2006 7:03 pm

pipewire 2 channel to 8 (7.1 / 2 + 5.1) channel filter

  • Quote

Post by DeIM » Fri Jan 05, 2024 9:35 am

I was looking for something to distribute 2 channel audio source to 8 channel output (it's generic but my setup is something like headphones on FL FR and rest is connected to 5.1 loudspeaker)
I often got audio only from headphones. I manually connected channels in helvum but it was reset each time new audio played.
So I decided to solve it somehow and I found filter which makes opposite - 8 channels to 2 channels.
I made dirty custom changes which I would like to share, ask for review and tuning.

Code: Select all

# 2 to 8 channels sink
#
# Copy this file into a conf.d/ directory such as
# ~/.config/pipewire/filter-chain.conf.d/
#
context.modules = [
    { name = libpipewire-module-filter-chain
        flags = [ nofail ]
        args = {
            node.description = "Virtual Surround Sink DeIM"
            media.name       = "Virtual Surround Sink DeIM"
            filter.graph = {
                nodes = [
                    # duplicate inputs
                    { type = builtin label = copy name = copyFL  }
                    { type = builtin label = copy name = copyFR  }
                    { type = builtin label = copy name = copyFC  }
                    { type = builtin label = copy name = copyRL  }
                    { type = builtin label = copy name = copyRR  }
                    { type = builtin label = copy name = copySL  }
                    { type = builtin label = copy name = copySR  }
                    { type = builtin label = copy name = copyLFE }

                    # stereo output
                    { type = builtin label = mixer name = mixFL }
                    { type = builtin label = mixer name = mixFR }
                    { type = builtin label = mixer name = mixFC }
                    { type = builtin label = mixer name = mixLFE }
                    { type = builtin label = mixer name = mixRL }
                    { type = builtin label = mixer name = mixRR }
                    { type = builtin label = mixer name = mixSL }
                    { type = builtin label = mixer name = mixSR }
                ]
                links = [                    
                   { output = "copyFL:Out" input = "mixFL:In 1" }
                   { output = "copyFR:Out" input = "mixFR:In 2" }
                   { output = "copyFL:Out" input = "mixFC:In 3" }
                   { output = "copyFR:Out" input = "mixLFE:In 4" }
                   { output = "copyFL:Out" input = "mixRL:In 5" }
                   { output = "copyFR:Out" input = "mixRR:In 6" }
                   { output = "copyFL:Out" input = "mixSL:In 7" }
                   { output = "copyFR:Out" input = "mixSR:In 8" }
                ]
                inputs  = [ "copyFL:In" "copyFR:In" "copyFC:In" "copyLFE:In" "copyRL:In" "copyRR:In" "copySL:In" "copySR:In" ]
                outputs = [ "mixFL:Out" "mixFR:Out"  "mixFC:Out" "mixLFE:Out" "mixRL:Out" "mixRR:Out" "mixSL:Out" "mixSR:Out" ]
            }
            capture.props = {
                node.name      = "effect_input.virtual-surround-7.1-deim"
                media.class    = Audio/Sink
                audio.channels = 8
                audio.position = [ FL FR FC LFE RL RR SL SR ]
            }
            playback.props = {
                node.name      = "effect_output.virtual-surround-7.1-deim"
                node.passive   = false
                audio.channels = 8
                audio.position = [ FL FR FC LFE RL RR SL SR ]
            }
        }
    }
]
Top
Post Reply
1 post • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy