I need help in setting up the self hosting livekit...
# ask-ai
r
I need help in setting up the self hosting livekit server to get the inbound configuration over websocket instead of SIP URI
t
Thanks for reaching out, Ninad. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
LiveKit doesn’t natively support inbound media configuration over WebSocket instead of SIP URI, but don’t worry—we have some options to explore together! Typically, media ingestion happens through RTMP, WHIP (which is WebRTC-based), or SIP (via RTP). If you’re interested in using WebSocket input, one possibility is to use the
websocketsrc
GStreamer plugin. This allows streaming WebSocket data into a GStreamer pipeline, which can then forward media to LiveKit via Ingress. Keep in mind, though, this approach involves some custom development since it’s not a built-in LiveKit feature. Another great alternative might be WHIP (WebRTC over HTTP), which could fit your needs nicely. Would you like me to walk you through how to use WHIP for media ingestion, or are you leaning toward setting up a custom WebSocket-based solution? I’m here to help with whichever path you choose! Sources: Self-hosted SIP server | LiveKit Docs | docker-compose.yaml | examples/plugins/websocketsrc/websocketsrc.go | Self-hosting the Ingress Service | LiveKit Docs
r
use WHIP for media ingestion
t
To use WHIP for media ingestion in LiveKit, here’s a friendly guide to help you through the process: 1. Create an Ingress: Start by using the
CreateIngress
API to set up a WHIP ingress. You’ll want to specify the input type as WHIP, along with details like the ingress name, room name, participant identity, and name. Once done, the API will provide you with an
IngressInfo
object that includes your connection settings, such as the URL and stream key. 2. Configure WHIP Client: Next, take the URL and stream key from the
CreateIngress
API and use them to configure your WHIP client: ◦ OBS: Simply select 'Custom...' in the Stream tab, then enter the URL in the 'Server' field and the stream key in the 'Stream Key' field. ◦ FFmpeg: You can use a command like:
ffmpeg -re -i <input> -c:v libx264 -b:v 3M -preset veryfast -profile high -c:a libfdk_aac -b:a 128k -f flv "<URL>/<Stream Key>"
. ◦ GStreamer: Use the
whipsink
plugin, making sure to include the URL and stream key in the
whip-endpoint
parameter. ◦ ESP32: Just configure the WHIP server URL and access token in the demo app settings, and use CLI commands like
start <server_url> <token>
. 1. (Optional) Enable Transcoding: If you need transcoding, you can set the
enable_transcoding
option to true when creating the ingress. Just make sure your source encoder settings are compatible with all subscribers. If you have any questions or want me to walk you through any of these steps, please don’t hesitate to ask—I’m here to help! Sources: Ingress overview | LiveKit Docs | Encoder configuration | LiveKit Docs | solutions/whip_demo/main/main.c