Closed Bug 1876895 Opened 1 year ago Closed 1 year ago

unable to use Pipewire camera source when another application is already accessing it

Categories

(Core :: WebRTC: Audio/Video, defect)

Firefox 122
defect

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: be.0, Assigned: jgrulich)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0

Steps to reproduce:

  1. Plug in Razor Kiyo Pro UVC webcam
  2. Open Kamoso, which uses the GStreamer camerabin source
  3. In Firefox, set media.webrtc.camera.allow-pipewire to true in about:config
  4. In Firefox, go to WebRTC test page and select the same camera that Kamoso is using https://webrtc.github.io/test-pages/src/audio-and-video/

Actual results:

The video feed on the page in Firefox is blank and no error is shown. However, qpwgraph shows Kamoso and Firefox are both connected to the camera via Pipewire.

When Kamoso is closed and the WebRTC page is refreshed, the camera feed is shown on the page in Firefox. Reopening Kamoso then shows the camera feed in both Firefox and Kamoso successfully.

Expected results:

The camera feed should show up in Firefox regardless of the order applications using the Pipewire camera source are opened. Both applications work when Firefox accesses the camera first, then Kamoso, but Firefox doesn't work when Kamoso accesses the camera first.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Component: Widget: Gtk → WebRTC: Audio/Video
Assignee: nobody → jgrulich
Blocks: pipewire

This might not be a problem in our implementation, but rather a PipeWire limitation or bug. I can for example use PipeWire camera in OBS Studio and use it at the same time with Firefox. Trying Kamoso to use my camera and running OBS Studio I can see it has same problem. The camera says it's streaming, but we are not receiving any buffers. I will keep investigating and report this to PipeWire.

Perhaps the bug is in GStreamer which Kamoso uses. I have not tested the unreleased Pipewire camera support in OBS yet.

(In reply to Be from comment #3)

Perhaps the bug is in GStreamer which Kamoso uses. I have not tested the unreleased Pipewire camera support in OBS yet.

I don't think the bug is in gstreamer, it's rather in pipewiresrc (gstpipewiresrc) gstreamer elements provided by PipeWire itself. For the record the issue is reported here: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3840.

Yes, OBS is not released yet and I had to build it myself. I did that just to verify whether it's a specific issue on our side or not.

Upstream (WebRTC) fix for this issue: https://webrtc-review.googlesource.com/c/src/+/338921.

The severity field is not set for this bug.
:jib, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jib)
Severity: -- → S4
Flags: needinfo?(jib)

This is a simple backport of an WebRTC upstream change.

Upstream commit: 334e9133dcdecb5d00d991332e05c7b80ae26578

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e915ae33e90a WebRTC backport: Video capture PipeWire: add support for DMABuf buffer type r=pehrsons,webrtc-reviewers
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: