> For the complete documentation index, see [llms.txt](https://docs.sky-pulse.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sky-pulse.org/documentation/software-and-getting-started/basic-streaming-guide.md).

# Basic streaming guide

This page provides an overview of how to stream video from cameras connected to the Helios, assuming you have a clean image with no packages pre-installed.

### 1. Prequisites:

In order to start video streaming, you need some basic packages. \
The packages required are pre-installed on the Helios, but in case you flashed a custom image, these are the packages you need:

1. <mark style="color:violet;">**GStreamer**</mark>
2. <mark style="color:violet;">**MediaMTX**</mark>

{% hint style="success" %}
The Helios comes pre-installed with these packages out of the box, install them if you're using a custom image not supplied by us.
{% endhint %}

#### Connecting via SSH:

```bash
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
Skypulse@skypulse.local
```

**Username:&#x20;**<mark style="color:purple;">**Skypulse**</mark>\
**Password:&#x20;**<mark style="color:purple;">**pass**</mark>

{% hint style="info" %}
**If you encouner any problems or if this is your first time connecting to a Helios, please follow the** [**Getting started**](/documentation/software-and-getting-started/helios-getting-started.md) **guide.**
{% endhint %}

#### Installing GStreamer:

GStreamer is the backbone of the video pipeline. Install it via the terminal:

```bash
sudo apt update

sudo apt update && sudo apt install -y \
 libgstreamer1.0-dev \
 libgstreamer-plugins-base1.0-dev \
 gstreamer1.0-plugins-base \
 gstreamer1.0-plugins-good \
 gstreamer1.0-plugins-bad \
 gstreamer1.0-plugins-ugly \
 gstreamer1.0-tools \
 gstreamer1.0-libav \
 gstreamer1.0-rtsp \
 libgstrtspserver-1.0-dev
```

#### Installing MediaMTX:

The server required for WebRTC and RTSP streaming. To install it via <mark style="color:cyan;">**wget**</mark> run the following in the /home/Skypulse directory:

1. <mark style="color:purple;">**Install**</mark><mark style="color:purple;">:</mark>

```bash
wget https://github.com/bluenviron/mediamtx/releases/download/v1.9.0/mediamtx_v1.9.0_linux_arm64v8.tar.gz

```

2. <mark style="color:purple;">**Extract:**</mark>

```bash
tar -xvzf mediamtx_v1.9.0_linux_arm64v8.tar.gz
```

3. <mark style="color:purple;">**Permissions**</mark> (ensure it is executable):

```bash
chmod +x mediamtx
```

### 2. Video streaming

The Helios utilizes GStreamer to capture and encode video directly from the camera hardware.\
By using **H264 compression**, we minimize latency and bandwidth usage.

There are two options for streaming:

1. <mark style="color:violet;">**WebRTC**</mark> (Browser based)
2. <mark style="color:violet;">**RTP**</mark> (Direct UDP)

#### 1. WebRTC:

Best for low-latency viewing directly in a web browser without extra software.

1. <mark style="color:purple;">**Connect**</mark><mark style="color:purple;">:</mark> open two SSH terminals.
2. <mark style="color:purple;">**Start media server**</mark> (terminal 1): navigate to **/home/Skypulse** and run:

```bash
./mediamtx
```

3. <mark style="color:purple;">**Launch stream**</mark> (terminal 2): Run the following:

```bash
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x
h264,width=640,height=480,framerate=30/1 ! h264parse ! rtspclientsink
location=rtsp://127.0.0.1:8554/cam1
```

4. <mark style="color:purple;">**View:**</mark> navigate to: [<mark style="color:blue;">**http://192.168.168.33/cam1/**</mark>](http://192.168.168.33/cam1/) **on your PC.**

{% hint style="info" %}
**192.168.168.33 is the default IP of the Helios, if you have a custom IP setup change accordingly.**
{% endhint %}

#### 2. RTP (Direct UDP):

The most direct "push" method, offering the lowest possible latency via&#x20;**ffplay**.

1. <mark style="color:purple;">**Launch stream**</mark> (Execute the capture command, replacing   &#x20;\<PC\_IP> with your Windows   &#x20;IP):

```bash
gst-launch-1.0 v4l2src device=/dev/video2 ! video/x
h264,width=1280,height=720,framerate=30/1 ! h264parse ! rtph264pay !
udpsink host=<PC_IP> port=5000
```

2. <mark style="color:purple;">**PC Setup:**</mark> Create a file named   &#x20;stream.sdp on your desktop. Paste this inside   &#x20;<mark style="color:$warning;">**exactly**</mark>:

```bash
c=IN IP4 0.0.0.0
m=video 5000 RTP/AVP 96
a=rtpmap:96 H264/90000
```

3. <mark style="color:purple;">**Launch player**</mark> (on your PC): Run CMD from your Windows desktop and execute:

```bash
ffplay -protocol_whitelist file,udp,rtp -i stream.sdp -fflags nobuffer-flags low_delay
```

### 3. Resolution Customization

All stream resolutions are **fully customizable** to balance quality against network stability.\
Modify the <mark style="color:red;">**`width=`**</mark> and <mark style="color:red;">**`height=`**</mark> parameters in the GStreamer commands:

* High detail: <mark style="color:purple;">**`width=1920,height=1080`**</mark> (1080p)
* Performance mode: <mark style="color:purple;">**`width=640,height=480`**</mark> (VGA)
* Frame rate: adjust <mark style="color:purple;">`framerate=30/1`</mark> (e.g., to  &#x20;<mark style="color:purple;">**60/1**</mark> or  &#x20;<mark style="color:purple;">**15/1**</mark>) based on bandwidth needs.
