Skip to content

Latest commit

 

History

History
88 lines (64 loc) · 3.34 KB

cli-quickstart.md

File metadata and controls

88 lines (64 loc) · 3.34 KB

Quickstart

Note

iroh-live is pre-release, and these docs track its main branch. The irl downloads below are built from main.

This page streams a camera from one machine to another with irl, the iroh-live command line tool. It needs no code, no account and no server.

Tip

You need two machines with internet access, or two terminals on one machine. A camera is optional: irl can send a test pattern instead. On Linux x86-64 or aarch64, or macOS on Apple silicon, the steps take about two minutes.

Get irl

Download the build for your platform and put it on your PATH:

# Linux x86-64. For a Raspberry Pi or other aarch64 Linux, use irl-linux-aarch64.
curl -Lo irl https://github.com/n0-computer/iroh-live/releases/download/rolling-release/irl-linux-x86_64 && chmod +x irl && sudo mv irl /usr/local/bin/

# macOS on Apple silicon
curl -Lo irl https://github.com/n0-computer/iroh-live/releases/download/rolling-release/irl-macos-aarch64 && chmod +x irl && sudo mv irl /usr/local/bin/

On macOS, the system may block the binary the first time it runs. Allow it under System Settings → Privacy & Security. On Linux, the binary needs the runtime libraries that Install lists. Windows, Android and building from source are also on that page.

Publish

On the first machine, publish the camera and microphone:

irl publish

Without a camera, publish a test pattern and a beeping tone instead:

irl publish --test-source

irl prints a ticket, as text and as a QR code. The ticket is a string that tells a viewer where to find the stream. Keep the command running.

Watch

On the second machine, or in a second terminal, pass the ticket to irl watch:

irl watch <TICKET>

It works when a window opens and shows the picture. With --test-source, the picture is a sweeping bar with a frame counter and a clock, and a marker flashes with each beep. A line of statistics runs along the bottom edge of the window, and the terminal prints playing, press Ctrl+C to stop.

The two machines find each other through iroh. On one network they connect directly, and mDNS finds them without internet access. Across networks, iroh punches through NAT where it can and forwards through an iroh relay where it cannot. If nothing plays, see Troubleshooting.

Each run of irl publish prints a new ticket, because irl makes a new key on every start. IROH_SECRET keeps the key, and so the ticket.

Where to go next

  • Watch in a browser opens the same stream in a browser, through a media relay on your machine.
  • Calls and rooms connect devices in both directions with irl call and irl room.
  • irl watch --scan reads a ticket from a QR code, and the Android demo scans the one irl publish prints.
  • The Rust quickstart writes the same publisher and viewer as programs.
  • Every command and flag is in the irl reference.