Get started
Introduction
Caution
iroh-live is a preview for development and testing, and it is not ready for production. Its API, its commands and its network protocol may change before the first release.
iroh-live sends live video and audio between devices, directly, with no
server that you have to run. It is an open source Rust library, and irl is
its command line tool.
A publisher is a device that sends a camera, a screen, a microphone or a file. A viewer is a device that plays it. The two connect over iroh, which finds a direct path through most networks, so the video never passes through a server. A media relay is optional: it takes the stream once and serves it to browsers and to more viewers than the publisher’s own uplink can carry.
Three ways in
- Try it with no code. Stream a camera from one machine to another with
irlin the Quickstart. You need no account and no server. - Build it into a Rust app. Write the two programs of the Rust quickstart, then pick a guide below.
- Run a media relay. Do I need one? answers in one table, and Watch in a browser runs a media relay on your machine.
What can I use it for?
- Publish a camera, a screen or a file from one device to another, across networks, without running a server.
- Stream audio for a voice channel, an intercom or a radio stream.
- Make calls and run small rooms between devices.
- Show a stream in a browser, or reach a large audience, through a media relay.
- Send video from robots and other devices to software that reacts to it. Sample apps lists the programs you can run.
How it works
Every video rendition and every audio track travels on its own QUIC streams, so a lost video packet never delays audio. The wire protocol is Media over QUIC (MoQ).
A publisher encodes one source into several renditions of different sizes, a ladder. Each viewer’s player picks the rendition that its link can carry, and switches without a blank frame when the link changes. A playout clock keeps audio and video in step. Capture, codecs and GPU rendering come from moq’s moq-video and moq-audio. How it works explains the model, and Crates and features shows how the crates stack.
Compared with WebRTC platforms
Hosted WebRTC platforms such as Daily route every stream through their media servers. iroh-live differs in three ways:
- Peers connect directly where they can. Media between two devices does not pass through a server, so no server on the path adds delay or cost. Media relays are for browsers and large audiences.
- The SDK is open source and works without n0. You can build and ship on iroh-live alone, and run the media relay yourself. The n0.computer team also plans hosted media relays, which are in private preview.
- The transport is QUIC, not WebRTC. Tracks do not block each other, and the same iroh connection can carry your application’s own data.
iroh-live is much younger than those platforms, and the next section lists what it does not have.
Status
iroh-live is an early preview, and its API changes often.
- It depends on the unreleased
mainbranch of moq, pinned by git rev, so it is not on crates.io. Install has the dependency line. - Linux is the main target, and macOS, Windows and Android are tested too. See Platform support.
- The media relay lets anyone read every broadcast on it by default. See Run a media relay.
- There is no recording service, no telephony, and no prebuilt call interface. Record a broadcast writes files in your own program, and the call tutorial builds a call window.
- Browsers need WebTransport. Chromium works, Firefox works from version 153, and Safari does not.
Where to go next
- Contributing points at the build and test instructions, and maps each crate to the internals page that explains it.
- If something does not work, see Troubleshooting.