# Live streams

# Live streams

Connect something that sends data while it runs — a camera, microphone,
vehicle, robot or bus.

Three types are built in:

| Type | What it is |
|---|---|
| **Camera** | a USB camera on this device |
| **MJPEG camera** | a camera or server you reach over HTTP |
| **Microphone** | audio plus a live loudness level |

Add one on **Inputs** ([how](https://phloem.ai/docs/inputs/)). **Channel path** is optional; it sets
where the data lands. Network sources reconnect if the link drops.

For anything else, install a connector from **Connectors**, then add it the
same way. Every live connector is listed at the end of this page.

| For | Connector |
|---|---|
| a PX4 or ArduPilot vehicle | [MAVLink](https://phloem.ai/docs/connectors/mavlink/) |
| ROS 1 / ROS 2 topics, over rosbridge or DDS | [ROS 2](https://phloem.ai/docs/connectors/ros2/) |
| a CAN bus, decoded with your DBC | [CAN](https://phloem.ai/docs/connectors/can/) |
| a PLC | [Modbus](https://phloem.ai/docs/connectors/modbus/), [OPC UA](https://phloem.ai/docs/connectors/opcua/), [EtherNet/IP](https://phloem.ai/docs/connectors/ethernetip/) |
| a DAQ | [NI-DAQmx](https://phloem.ai/docs/connectors/nidaqmx/), [LabJack](https://phloem.ai/docs/connectors/labjack/), [Measurement Computing](https://phloem.ai/docs/connectors/mcc/) |


### Camera

| Field | Required | Example |
|---|---|---|
| **Device** | yes | `/dev/v4l/by-id/usb-046d_C920…-index0` |
| **Channel path** | no | `/cam/front` |

Use the `/dev/v4l/by-id/…` path; short names like `/dev/video0` can change
after a reboot. A camera with a built-in microphone also sends
`/cam/front/audio/level` (loudness in LUFS; higher is louder), so it needs no
second input.

### MJPEG camera

| Field | Required | Example |
|---|---|---|
| **Stream URL** | yes | `http://127.0.0.1:8090/stream` |
| **Channel path** | no | `/cam/front` |

Video is stored as H.264. If the stream also sends JSON between frames, like
`{"path": "/audio/level", "f64": 0.42}`, each one becomes its own channel. One
stream can carry both video and numbers.

### Microphone

| Field | Required | Example |
|---|---|---|
| **Microphone** | no | `(system default)` |
| **Channel path** | no | `/audio` |

Loudness lands on `/audio/level`, and the audio is recorded beside it.
