Skip to content

linux-pipewire: camera source has no "Restore camera controls" option (only V4L2 does) #1067

Closed as not planned

Description

@zackees

Follow-up to #385 (reported there by @alerque).

What I verified in the code on master:

So the checkbox appears or not depending on the source type, not the camera: the generic webcams in the report are in V4L2 sources, the PTZ camera is in a PipeWire source (see #827).

Not verified: whether the PipeWire source writes saved controls on connect today (needs a PTZ device test; that would be the RED test).

Proposed: a per-source option with the same wording and default as the V4L2 one. @rdoupe owns camera controls (#827, #1054), so I am leaving this for you to claim.

Activity

  1. rdoupe commented on Oct 16, 2026

    @rdoupe
    Collaborator

    Checked the "Not verified" part on master (673f76f) and in 0.1.0-beta.20261014: the PipeWire camera source never writes a saved control to the camera on its own. Only a change the user makes in the window is written.

    • control_changed() (camera-portal.c:644, the file's only pw_node_set_param) runs only as a modified callback on the control properties. Those are created inside device_selected(), after obs_properties_apply_settings() has collected its callbacks (libobs/obs-properties.c:360-393; the Rust lane collects first too), so opening or reloading the window doesn't run it. Source creation, scene collection load, obs_source_update() and a replug don't call it either.
    • Real app with a stand-in PTZ node that logs every Props write: 0 writes for start, opening Properties after the camera was moved from outside, Defaults, OK, Cancel/Discard, a scene switch, SetInputSettings of another key, and a replug. One click on Pan's arrow gave exactly one write.

    So the #385 override can't happen in the PipeWire source today, and a "Restore camera controls" option there would be new behaviour (restoring on connect), not a fix. I'm not claiming this one.

    One related thing I did see: the window shows the saved value, not the camera's current one, so the first nudge after an outside move starts from the saved value (18000 jumped to 10800 here).

  2. alerque commented on Oct 16, 2026

    @alerque
    1. the window shows the saved value, not the camera's current one

    This is a tricky bit because most of the time if I'm setting up a camera with absolute values I'd like them to stay with those settings and reset the camera if I adjust them. Always reading from the camera and updating values would risk loosing local setup work, but also specifically while setting up a camera it would sometimes be useful to be able to read the current values. There is a "Defaults" option already to set defaults, but a "read current values from camera" option where supported might be pretty nice. Possibly out of scope for this issue, but closely related.

  3. rdoupe commented on Oct 16, 2026

    @rdoupe
    Collaborator

    Agreed, keeping the saved values as the source of truth makes sense for a set-up camera, and nothing changes there. A "Read current values from camera" button (where the camera supports reading them) sounds useful for setup, but it's a new feature rather than a fix, so could you open it as a Discussion (Ideas)? That's where this fork takes feature requests. Happy to build it once it's been looked at.

  4. zackees commented on Oct 18, 2026

    @zackees
    MemberAuthor

    Closing. @rdoupe's check showed the PipeWire camera source never writes a saved control to the camera on its own: only a change made in the Properties window is written. So the #385 override can't happen there, and a "Restore camera controls" option would be new behaviour, not a fix.

    @alerque's follow-up, a "Read current values from camera" button, is now an Ideas discussion: #1418. Please reopen this if a PipeWire camera is found overwriting its controls on connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions