Selecting specific Pipewire device in Gstreamer

I’m using Pipewire via Gstreamer in a Flatpak, and so far it’s working great. I’m trying to be more specific about which webcam to use in the Gstreamer pipline, but I don’t know how to specify that yet. The non-specific

gst-launch-1.0 pipewiresrc ! jpegdec ! xvimagesink

works, and I’m trying to do something like:

gst-launch-1.0 pipewiresrc path=v4l2:/dev/video0 ! jpegdec ! xvimagesink

with some value for path, ideally taken from pw-dump. I just don’t know which value to pass it, so whatever I choose, I get the message Setting pipeline to PAUSED ... and the video stream doesn’t start.

Each pipewire device has a node_id which is a integer, you have to pass that.

    "id": 39,
    "type": "PipeWire:Interface:Device",
    "id": 43,
    "type": "PipeWire:Interface:Node",

It turns out that the number is the id, but there are multiple sections matching /dev/video0, so I needed to choose the id of the hash map that also has a "type": "PipeWire:Interface:Node" entry.

gst-launch-1.0 pipewiresrc path=43 ! jpegdec ! xvimagesink

Thanks for your help. : )

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.