Coder Social home page Coder Social logo

Comments (2)

acheronfail avatar acheronfail commented on July 23, 2024

I've just discovered a way to do this via the command line with pipewire:

$ pw-cli ls Node
# This will output a list of nodes... find the one you want, it will have `media.class = "Stream/Output/Audio"`
# To change its volume:
$ pw-cli s <id_from_prev_command> Props '{ mute: false, channelVolumes: [ 1.0, 1.0 ] }'

(Where channelVolumes are percentage values from 0 to 1)

See this link for more: https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Migrate-PulseAudio#sink-inputsource-output-volumemute


While it's good to have a way to do this, pw-cli's output isn't that nice to parse, and I need to confirm if it remembers the volumes like pulseaudio

from pa_volume.

acheronfail avatar acheronfail commented on July 23, 2024

I've discovered another pipewire utility: pw-dump which outputs everything as a JSON object, which allows finding the node more easily, something like:

$ id=$(pw-dump | jq '.[] | select(.type == "PipeWire:Interface:Node") | select(.info.props["application.name"] == "mpv") | .id')

And then the volume can be changed with the pw-cli command I mentioned above.

from pa_volume.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.