---
layout: article
title: Start with Videos
description: Create your first Appwrite video from a Storage file, encode an adaptive ladder, and play the stream in a browser.
difficulty: beginner
readtime: 5
---

In this quick start you create a video from a file, encode it into a few renditions, and play the stream with a web player.

# Create encoding profiles

New projects have no [encoding profiles](/docs/products/videos/profiles), so create a small ladder first. You only do this once per project.

1. Sign in to [Appwrite Cloud](https://cloud.appwrite.io) and open a project.
2. Open **Videos** in the sidebar and select **Encoding profiles**.
3. Click **Create profile**.
4. Select the **360p**, **720p**, and **1080p** presets, and click **Create**.

![Create profile dialog with the 360p, 720p, and 1080p presets selected](/images/docs/videos/create-profiles.avif)

# Create a video

1. Select **Videos** and click **Create video**.
2. Choose a source:
   - **Upload**: Drop an MP4, MOV, WebM, MKV, or audio file and pick a **Destination bucket**. If the project has no buckets yet, click **Create Videos bucket**. The file is uploaded to that bucket and stays there.
   - **Storage**: Choose a file that is already in a bucket. Nothing is copied.
   - **Demo**: Pick one of the Blender open movies to try Videos without a file of your own. The Console downloads it and uploads it to the destination bucket.
3. Optionally enter a **Name**. It defaults to the file name.
4. Under **Profiles**, keep the selection or change it. Every profile that would not upscale the source is selected for you. Profiles larger than the source are marked **Upscale**, since upscaling adds size without adding detail.
5. Keep the output at **CMAF**, the default. CMAF encodes once and serves both an HLS and a DASH manifest. To pick HLS or DASH instead, open **Advanced settings**.
6. Click **Create video**.

![Create video wizard with a video file attached for upload, the Videos destination bucket, CMAF output, and three profiles](/images/docs/videos/create-video.avif)

The Console uploads the file from your browser, creates the video, and queues a rendition for each profile you selected. You can close the wizard while this runs, but keep the tab open until the upload finishes and the renditions are queued. Encoding runs on Appwrite and continues after you close the tab.

You can also start from Storage: open a video or audio file and click **Create video** to open the wizard with that file selected.

# Watch it encode

Open the video and select **Renditions**. Each rendition moves from **Queued** to **Encoding** to **Ready**, with a progress percentage while it encodes.

![Renditions tab with two renditions queued and the 360p rendition encoding, with a progress bar for each](/images/docs/videos/renditions-encoding.avif)

The video page shows a player as soon as one rendition is ready.

# Allow playback

A video you create in the Console is private. Only API keys and members of your project, in the Console, can play it. To play it on a public page:

1. Open the video and select **Settings**.
2. Under **Access**, turn on **Public playback**.

![Access settings of a video with Public playback turned on and Read granted to Any](/images/docs/videos/settings-access.avif)

This grants **Read** to **Any** on the video. The source file in Storage can stay private, because playback checks the video's permissions, not the file's. See [Permissions](/docs/products/videos/permissions) to share videos only with signed-in users or teams instead.

# Play the stream

Select **Install** on the video page. Pick a platform, player, and format, then copy the install steps and code. For a web page with [hls.js](https://github.com/video-dev/hls.js):

![Install page with the Web platform, hls.js, Vanilla, and CMAF (HLS) selected, and the install steps and code](/images/docs/videos/install.avif)

```sh
npm install hls.js
```

```js
import Hls from 'hls.js'

const video = document.getElementById('player')
const src =
  'https://<REGION>.cloud.appwrite.io/v1/videos/<VIDEO_ID>/outputs/cmaf/master.m3u8?project=<PROJECT_ID>'

if (Hls.isSupported()) {
  const hls = new Hls()
  hls.loadSource(src)
  hls.attachMedia(video)
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
  // Safari plays HLS natively
  video.src = src
}
```

```html
<video id="player" controls playsinline></video>
<script type="module" src="/main.js"></script>
```

The player loads the master manifest and picks the best rendition for the viewer's connection.

# Next steps

- [Play a video in your app](/docs/products/videos/play) covers Shaka Player, Video.js, AVPlayer, ExoPlayer, Flutter, and React Native.
- [Captions](/docs/products/videos/captions) adds subtitle tracks in more languages.
- [Permissions](/docs/products/videos/permissions) covers private videos for signed-in users and teams.
