I need to simulate participants in my room, how ca...
# ask-ai
w
I need to simulate participants in my room, how can i add them using livekit cli?
t
Thanks for reaching out, Marcus. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You can simulate participants in your LiveKit room using the LiveKit CLI in several ways depending on your needs: • *Simulate a single participant and publish demo video:*`lk room join \ --url <project_secure_websocket_address> \ --api-key <project_api_key> --api-secret <project_secret_key> \ --publish-demo --identity bot_user \ my_first_room`This command joins the room and publishes a looped demo video as a participant. • *Simulate multiple participants for load testing:*`lk load-test \ --room test-room \ --video-publishers 8`This example simulates 8 participants publishing video tracks. You can adjust numbers and add
--audio-publishers
,
--subscribers
, and other flags as needed. • *Simulate a participant using your own media files:*`lk room join --identity publisher \ --publish <path to video.ivf> \ --publish <path to audio.ogg> \ --fps 23.98 \ <room_name>` • *Set participant attributes (optional):*`lk room join --identity publisher \ --attribute key1=value1 \ <room_name>` You can combine these methods, and also run load testers from multiple machines for large-scale simulations. For more details and options, see the LiveKit CLI documentation. Sources: CLI Setup | LiveKit Docs | cmd/lk/join.go | Benchmarking | LiveKit Docs