Uses gstreamer to stream devices from Rust to Livekit rooms. This crate provides necessary functionalities to streaming audio and video and video from local devices using gstreamer
and livekit
client sdks.
This crate is yet to be published to crates.io.
[dependencies]
livekit-gstreamer = { git = "https://github.com/oele-isis-vanderbilt/livekit-gstreamer.git" }
Warning
This crate has only been currently tested with gstreamer in Ubuntu 24.
Install gstreamer
in your system before using this crate (Ubuntu/Debian instructions below) or use the following link to install it in your system.
$ sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
See the examples directory for detailed usage examples:
-
lk_publish_cam_h264.rs
: Captures a camera stream using GStreamer, encodes it in H.264, and publishes it in I420 format to LiveKit. -
lk_publish_image_jpeg.rs
: Streams a sequence of JPEG images, converting them to I420 format for publication to LiveKit. -
lk_publish_multitrack.rs
: Publishes 2 video tracks to LiveKit, with the final video stream in I420 format and 2 audio tracks from microphones to the livekit room. -
lk_publish_one_minute.rs
: Streams video for one minute, converting to I420 format before publishing to LiveKit. -
stream_subscribe_video.rs
: Subscribes to a local GStreamer media stream in I420 format, do anything with it that you want. -
stream_subscribe_audio.rs
: Subscribes to a local GStreamer media audio stream, do anything with it that you want. -
lk_publish_mic.rs
: Streams audio from a local microphone to the livekit room. -
get_devices.rs
: Get all the devices, by path and their capabilities to the livekit room.
This work is supported by the National Science Foundation under Grant No. DRL-2112635.