Not really sure what is going on here. I currently uses a modified version of this script to handle various screencasting stuff. https://gitlab.gnome.org/-/snippets/19
However when this script is run it results in a green screen. as far as I know gstreamer should be able to handle format stuff. I have used this before in gnome without issues.
EDIT: this seems to only happen with xvimagesink, so I guess it's more likely to be a xwayland issue? Closing and moving to cosmic-comp
Originally reported to https://github.com/pop-os/xdg-desktop-portal-cosmic/issues/39