No element "webrtcsink"

Hi,
I built webrtcsink and gstwebrtc-api as described in README, and also built gst-plugins-rs/net/rtp as suggested in https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/405.

However, when I run “gst-launch-1.0 webrtcsink name=ws meta=“meta,name=gst-stream” videotestsrc ! ws. audiotestsrc ! ws.” command from webrtc’s README, I get the following warning.

WARNING: erroneous pipeline: no element “webrtcsink”

To solve this problem, I also tried to install webrtc system-wide by running:

cd gst-plugins-rs
$ cargo cbuild -p gst-plugin-webtrc --prefix=/usr
$ cargo cinstall -p gst-plugin-webrtc --prefix=/usr

and came across the permission denied error:

Error: CliError { error: Some(failed to copy /home/gst-plugins-rs/target/x86_64-unknown-linux-gnu/release/gstrswebrtc.pc to /usr/lib/x86_64-linux-gnu/pkgconfig/gstrswebrtc.pc

Caused by: Permission denied (os error 13)), exit_code: 101 }

Then I copied the file manually by sudo cp -i .... However, it still doesn’t work, the no element warning still appears. So I’m kind of clueless now…

I’m appreciate for any help :slight_smile:

I have Ubuntu 24.04 and after a few tries I found out that there are two solutions that work for me:

  1. A temporary resolution: using --gst-plugin-load to preload in addition to the list stored in environment variable GST_PLUGIN_PATH by:
export GST_PLUGIN_PATH="<path to /gst-plugins-rs/target/debug>:$GST_PLUGIN_PATH" 
gst-inspect-1.0 webrtcsink --gst-plugin-load=$GST_PLUGIN_PATH 

However, it only works for the current terminal, i.e. you have to run it every time for a new session.

  1. A permanent resolution which works fine for me: To replace the file libgstrswebrtc.so into the directory of system/user-wide plugin path by running:
sudo cp <path to /gst-plugins-rs/target/debug/libgstrswebrtc.so> /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrswebrtc.so 

PS: I used a stupid way to find the GStreamer plugin path using:

GST_DEBUG=GST_REGISTRY:6,GST_PLUGIN:6 gst-inspect-1.0 

GST_DEBUG=GST_REGISTRY:6,GST_PLUGIN:6 lists all the scanning for plugins.