> For the complete documentation index, see [llms.txt](https://docs.zus.network/features-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zus.network/features-documentation/live-streaming.md).

# Live Streaming

Continuous uploading of live user's media (webcam & audio) to the server.

## Live-streaming with CLI

Use `stream` to capture video and audio streaming from local devices, and upload

The user must be the owner of the allocation. You can request the file be encrypted before upload and can send thumbnails with the file.

<table><thead><tr><th width="133">Parameter</th><th width="169">Required</th><th>Description</th><th>Default</th><th>Valid values</th></tr></thead><tbody><tr><td>allocation</td><td>yes</td><td>allocation id, sender must be allocation owner</td><td></td><td>string</td></tr><tr><td>encrypt</td><td>no</td><td>encrypt file before upload</td><td>false</td><td>boolean</td></tr><tr><td>localpath</td><td>yes</td><td>local path of segment files to download, generate and upload</td><td></td><td>file path</td></tr><tr><td>remotepath</td><td>yes</td><td>remote path to upload file to, use to access file later</td><td></td><td>string</td></tr><tr><td>thumbnailpath</td><td>no</td><td>local path of thumbnaSil</td><td></td><td>file path</td></tr><tr><td>chunknumber</td><td>no</td><td>how many chunks should be uploaded in a http request</td><td>1</td><td>int</td></tr><tr><td>delay</td><td>no</td><td>set segment duration to seconds.</td><td>5</td><td>int</td></tr></tbody></table>

![stream](https://github.com/0chain/blobber/wiki/uml/usecase/live_upload_live.png)

When we start a stream from CLI the localpath is where our live video file is stored (its size gets changed.). It is read segment by segment by ffmpeg, each segment is converted to the .ts video file, and stored in the remotepath. The number of seconds in each segment is specified by the delay.<br>

## Live-streaming with wasm.

Live video and audio are captured from the browser. The captured file is broken into segments is transcoded to the .ts video file using ffmpeg.wasm within browser. Each transcoded segment is then uploaded to the remotepath specified.&#x20;

## Download live-streaming

The video file is uploaded to the remotepath directory.&#x20;

{% code overflow="wrap" %}

```
./zbox download --live --localpath ./tvshow/live.m3u8 --remotepath /stream --allocation $ALLOC
```

{% endcode %}

A live.m3u8 file is created where continuous download of the video segment takes place.&#x20;

We can start playing it using&#x20;

```
vlc ./tvshow/live.m3u8
```
