emersion / xdg-desktop-portal-wlr

xdg-desktop-portal backend for wlroots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screensharing works in Firefox, but not in Chromium (Vivaldi)

mrpandey opened this issue · comments

I use Vivaldi 6.2.3105.48 (based on Chrome 116.0.5845.195) as my main browser. I have enabled WebRTC PipeWire support and set "wayland" as the preferred Ozone platform. Screen sharing shows a blank screen on it.

For screen sharing, I have been managing so far with Firefox 119.0. It works perfectly. But now I need screensharing on Vivaldi/Chrome for some reason.

So I went through this Troubleshooting Checklist. Everything is okay, except the last (7th) check.

  1. Does the screencast starts, but the recording stays black or receives no image?

Clients might not support the same format. Please run https://gist.github.com/columbarius/50239ea3c4c70df8f240aa50f88e801a and check if entries with "type": "PipeWire:Interface:Port" have the property .params.Format and if not check if .params.EnumFormat contains an entry compatible with the corresponding block from xdpw.

Please add the output of the script when opening an issue.

Here is the output for when Firefox was sharing screen.

{
  "id": 39,
  "type": "PipeWire:Interface:Node",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "max-input-ports": 0,
    "max-output-ports": 1,
    "change-mask": [
      "input-ports",
      "output-ports",
      "state",
      "props",
      "params"
    ],
    "n-input-ports": 0,
    "n-output-ports": 1,
    "state": "running",
    "error": null,
    "props": {
      "media.class": "Video/Source",
      "media.name": "xdpw-stream-dCflBD",
      "stream.is-live": true,
      "node.name": "xdg-desktop-portal-wlr",
      "node.driver": true,
      "client.id": 37,
      "object.id": 39,
      "object.serial": 90
    },
    "params": {
      "PropInfo": [],
      "Props": []
    }
  }
}
{
  "id": 40,
  "type": "PipeWire:Interface:Port",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "direction": "output",
    "change-mask": [
      "props",
      "params"
    ],
    "props": {
      "port.id": 0,
      "port.direction": "out",
      "port.name": "out_0",
      "node.id": 39,
      "object.id": 40,
      "object.serial": 91
    },
    "params": {
      "EnumFormat": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3840,
            "height": 2160
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        }
      ],
      "Meta": [
        {
          "type": "Busy",
          "size": 8
        },
        {
          "type": "Header",
          "size": 32
        }
      ],
      "IO": [
        {
          "id": "Buffers",
          "size": 8
        }
      ],
      "Format": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3840,
            "height": 2160
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "num": 60,
            "denom": 1
          }
        }
      ],
      "Buffers": [
        {
          "buffers": {
            "default": 1,
            "min": 1,
            "max": 32
          },
          "blocks": 1,
          "size": 33177600,
          "stride": 15360,
          "align": 16,
          "dataType": {
            "default": 4
          }
        }
      ],
      "Latency": []
    }
  }
}
{
  "id": 42,
  "type": "PipeWire:Interface:Node",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "max-input-ports": 1,
    "max-output-ports": 0,
    "change-mask": [
      "input-ports",
      "output-ports",
      "state",
      "props",
      "params"
    ],
    "n-input-ports": 1,
    "n-output-ports": 0,
    "state": "running",
    "error": null,
    "props": {
      "pipewire.client.reuse": 1,
      "media.name": "webrtc-consume-stream",
      "stream.is-live": true,
      "node.name": "firefox",
      "node.target": 39,
      "node.autoconnect": true,
      "media.class": "Stream/Input/Video",
      "client.id": 41,
      "object.id": 42,
      "object.serial": 93
    },
    "params": {
      "PropInfo": [],
      "Props": []
    }
  }
}
{
  "id": 43,
  "type": "PipeWire:Interface:Port",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "direction": "input",
    "change-mask": [
      "props",
      "params"
    ],
    "props": {
      "port.id": 0,
      "port.direction": "in",
      "port.name": "in_0",
      "node.id": 42,
      "object.id": 43,
      "object.serial": 94
    },
    "params": {
      "EnumFormat": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRA",
          "modifier": {
            "default": 144115206334822900,
            "alt1": 144115206334822900,
            "alt2": 144115206334822660,
            "alt3": 144115206334806270,
            "alt4": 144115188080056830,
            "alt5": 144115188080056580,
            "alt6": 144115188075858430,
            "alt7": 144115188075858180,
            "alt8": 0,
            "alt9": 72057594037927940
          },
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRA",
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBA",
          "modifier": {
            "default": 144115206334822900,
            "alt1": 144115206334822900,
            "alt2": 144115206334822660,
            "alt3": 144115206334806270,
            "alt4": 144115188080056830,
            "alt5": 144115188080056580,
            "alt6": 144115188075858430,
            "alt7": 144115188075858180,
            "alt8": 0,
            "alt9": 72057594037927940
          },
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBA",
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRx",
          "modifier": {
            "default": 144115206334822900,
            "alt1": 144115206334822900,
            "alt2": 144115206334822660,
            "alt3": 144115206334806270,
            "alt4": 144115188080056830,
            "alt5": 144115188080056580,
            "alt6": 144115188075858430,
            "alt7": 144115188075858180,
            "alt8": 0,
            "alt9": 72057594037927940
          },
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "BGRx",
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "modifier": {
            "default": 144115206334822900,
            "alt1": 144115206334822900,
            "alt2": 144115206334822660,
            "alt3": 144115206334806270,
            "alt4": 144115188080056830,
            "alt5": 144115188080056580,
            "alt6": 144115188075858430,
            "alt7": 144115188075858180,
            "alt8": 0,
            "alt9": 72057594037927940
          },
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        },
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "default": {
              "width": 1,
              "height": 1
            },
            "min": {
              "width": 1,
              "height": 1
            },
            "max": {
              "width": 4294967295,
              "height": 4294967295
            }
          },
          "framerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 0,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        }
      ],
      "Meta": [
        {
          "type": "Busy",
          "size": 8
        },
        {
          "type": "Header",
          "size": 32
        },
        {
          "type": "VideoCrop",
          "size": 16
        },
        {
          "type": "Cursor",
          "size": {
            "default": 16432,
            "min": 52,
            "max": 589872
          }
        },
        {
          "type": "VideoDamage",
          "size": {
            "default": 256,
            "min": 16,
            "max": 256
          }
        }
      ],
      "IO": [
        {
          "id": "Buffers",
          "size": 8
        }
      ],
      "Format": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3840,
            "height": 2160
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "num": 60,
            "denom": 1
          }
        }
      ],
      "Buffers": [
        {
          "size": 33177600,
          "stride": 15360,
          "buffers": {
            "default": 8,
            "min": 1,
            "max": 32
          },
          "dataType": {
            "default": 4
          }
        }
      ],
      "Latency": []
    }
  }
}

And here is the output when Vivaldi was sharing screen.

{
  "id": 39,
  "type": "PipeWire:Interface:Node",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "max-input-ports": 0,
    "max-output-ports": 1,
    "change-mask": [
      "input-ports",
      "output-ports",
      "state",
      "props",
      "params"
    ],
    "n-input-ports": 0,
    "n-output-ports": 1,
    "state": "suspended",
    "error": null,
    "props": {
      "media.class": "Video/Source",
      "media.name": "xdpw-stream-IoGCDC",
      "stream.is-live": true,
      "node.name": "xdg-desktop-portal-wlr",
      "node.driver": true,
      "client.id": 37,
      "object.id": 39,
      "object.serial": 82
    },
    "params": {
      "PropInfo": [],
      "Props": []
    }
  }
}
{
  "id": 40,
  "type": "PipeWire:Interface:Port",
  "version": 3,
  "permissions": [
    "r",
    "w",
    "x",
    "m"
  ],
  "info": {
    "direction": "output",
    "change-mask": [
      "props",
      "params"
    ],
    "props": {
      "port.id": 0,
      "port.direction": "out",
      "port.name": "out_0",
      "node.id": 39,
      "object.id": 40,
      "object.serial": 83
    },
    "params": {
      "EnumFormat": [
        {
          "mediaType": "video",
          "mediaSubtype": "raw",
          "format": "RGBx",
          "size": {
            "width": 3840,
            "height": 2160
          },
          "framerate": {
            "num": 0,
            "denom": 1
          },
          "maxFramerate": {
            "default": {
              "num": 60,
              "denom": 1
            },
            "min": {
              "num": 1,
              "denom": 1
            },
            "max": {
              "num": 60,
              "denom": 1
            }
          }
        }
      ],
      "Meta": [
        {
          "type": "Busy",
          "size": 8
        }
      ],
      "IO": [
        {
          "id": "Buffers",
          "size": 8
        }
      ],
      "Format": [],
      "Buffers": [],
      "Latency": []
    }
  }
}

Any help is appreciated. Thank you.

Upgraded Vivaldi to 6.4, which runs on an upgraded version of Chromium. Things are working there.