able-rocket-81197
08/26/2025, 11:16 AMtall-airline-16756
08/26/2025, 11:16 AMtall-airline-16756
08/26/2025, 11:17 AMable-rocket-81197
08/26/2025, 11:17 AMtall-airline-16756
08/26/2025, 11:18 AMable-rocket-81197
08/26/2025, 11:21 AMif (_egressClient == null)
_egressClient = new EgressServiceClient("http://localhost:6789", apiKey, apiSecret);
var request = new RoomCompositeEgressRequest
{
RoomName = "room2",
CustomBaseUrl = "http://localhost:7980",
Layout = "grid",
SegmentOutputs =
{
new SegmentedFileOutput
{
FilenamePrefix = "hls-output/",
PlaylistName = "index.m3u8",
LivePlaylistName = "index-live.m3u8",
SegmentDuration = 6,
Protocol = SegmentedFileProtocol.HlsProtocol,
}
}
};
try
{
var response = await _egressClient.StartRoomCompositeEgress(request);
callback?.Invoke(response.EgressId);
}
catch (Exception e)
{
callback?.Invoke(e.ToString());
}tall-airline-16756
08/26/2025, 11:21 AMCustomBaseUrl (like <CUSTOM_BASE_URL>) is reachable and set up correctly to handle HLS output.
• Check that your SegmentOutputs settings look good, including the FilenamePrefix, PlaylistName, and LivePlaylistName. Also, confirm that the Protocol matches the output format you want.
• Take a peek at the LiveKit server logs for any errors or warnings related to your egress request. If you don’t see any logs, it might be worth making sure logging is turned on and configured properly.
If you’re still running into trouble, could you let me know:
• Are there any specific error messages or exceptions popping up in your code?
• Is your egress server running on the same machine as the LiveKit server, or are they on different hosts?
• Have you tested the connection to Redis to confirm it’s working as expected?
Sharing these details will really help us get to the bottom of this together.able-rocket-81197
08/26/2025, 11:24 AMtall-airline-16756
08/26/2025, 11:24 AMCustomBaseUrl in your configuration should point to the URL of your custom recording app. This app takes care of rendering and laying out the egress content. If you don’t have a custom app yet, no worries—the default is https://recorder.livekit.io.
If you do have a custom app, just make sure it’s deployed and accessible at the URL you specify. You can also add authentication parameters in the URL if that’s something you need, like <CUSTOM_TEMPLATE_URL>?auth_param=value.
Feel free to reach out if you want me to walk you through setting up the CustomBaseUrl or if you have any other questions!
Sources: livekit/livekit_egress.pb.go | Custom Recording Template | LiveKit Docs | Egress examples | LiveKit Docs | packages/livekit-server-sdk/src/EgressClient.tsable-rocket-81197
08/26/2025, 11:27 AMtall-airline-16756
08/26/2025, 11:27 AMable-rocket-81197
08/26/2025, 12:04 PMtall-airline-16756
08/26/2025, 12:05 PMws_url in your egress server configuration is pointing to the right WebSocket URL of the LiveKit server. In Docker setups, this is usually the internal network IP (like 172.17.0.1 on Linux) or host.docker.internal if you’re on macOS or Windows.
• Double-check that Redis is set up to accept connections from your Docker containers. You can do this by updating the redis.conf file: comment out bind 127.0.0.1 and set protected-mode no.
• When running the egress container, don’t forget to add the --cap-add=SYS_ADMIN flag. This enables Chrome sandboxing, which is necessary for Room Composite egress to work smoothly.
• Take a look at your egress server’s YAML configuration to confirm it has the correct api_key, api_secret, and redis settings.
If you’re still running into issues, could you please share:
• What value do you have set for ws_url in your egress server config?
• Are there any logs from the egress server showing connection problems?
• Have you tried testing the connection between the containers, maybe with ping or curl?
With these details, we’ll be in a better spot to figure out what might be going on and help you get everything running smoothly.
Sources: Self-hosting the Egress Service | LiveKit Docs | .github/workflows/test-integration.yaml | Self-hosting the Egress Service | LiveKit Docsable-rocket-81197
08/26/2025, 12:06 PMtall-airline-16756
08/26/2025, 12:06 PMping <LiveKit_Server_IP>. This helps us see if the LiveKit server is reachable.
2. Test the WebSocket connection: Try using a tool like curl or wscat to connect to the WebSocket URL. For example:
wscat -c ws://<LiveKit_Server_IP>:7880
If you don’t have wscat installed, no worries—you can add it to your container or use another WebSocket client you prefer.
3. Check Docker network: Make sure both your containers are on the same Docker network. You can check this by running docker network inspect <network_name> and seeing if both containers show up there.
4. Verify ports: Double-check that the WebSocket port (usually 7880) is open and accessible from the egress server container. A quick way is to use telnet <LiveKit_Server_IP> 7880 to see if the port responds.
If you hit any snags or want me to walk you through any of these steps, just give me a shout—I’m here to help!able-rocket-81197
08/26/2025, 12:16 PMtall-airline-16756
08/26/2025, 12:16 PMping command isn’t available in your egress server container, no worries! Here are some other ways you can check connectivity:
1. Try using `curl`: If curl is installed, you can test the WebSocket URL like this:
curl -v ws://<LiveKit_Server_IP>:7880
This will help you see if the WebSocket server is reachable.
2. Install ping if possible: If you have the right permissions, you can add ping to the container. For example, on Alpine Linux containers, just run:
apk add iputils
3. Give telnet a try: If telnet is available, you can check the WebSocket port with:
telnet <LiveKit_Server_IP> 7880
4. Take a look at the Docker network: On the host machine, use docker network inspect <network_name> to make sure the egress and LiveKit server containers are on the same network.
If you hit any bumps or want a hand with these steps, just let me know—I’m here to help!