Skip to content

Videos

Videos

Stream video and audio with Appwrite Videos. Turn files in Storage into adaptive HLS, DASH, and CMAF streams with encoding profiles, captions, and scrubbing thumbnails.

4 min read

Raw

Appwrite Videos turns video and audio files in Storage into adaptive streams. You create a video from a file that is already in a bucket, encode it into a ladder of renditions, and hand the master manifest URL to any HLS or DASH player.

The source file stays in its bucket, untouched. Each video has its own permissions, so who can watch a stream is separate from who can download the file.

You manage videos under Videos in your project, and encoding profiles under Videos > Encoding profiles.

Video page in the Console with the player paused on a frame of the video and its English caption on screen
Video page in the Console with the player paused on a frame of the video and its English caption on screen

Why stream instead of serving the file

You could put an MP4 in Storage and point a <video> tag at it. That works for short clips, but the viewer downloads one large file at one quality, whatever their connection. Streaming fixes this:

  • Faster start: The player fetches a small manifest and a few seconds of video, not the whole file.
  • Fewer stalls: The player drops to a lower quality when the connection slows, instead of pausing to buffer.
  • Better quality where possible: On a fast connection, viewers get your sharpest rendition.
  • Less wasted bandwidth: Viewers who stop after a minute only downloaded a minute.

Use Videos for anything longer than a short loop, or anything watched on mobile networks: courses, product demos, user uploads, recorded talks, and podcasts.

How it works

A video is built from a few resources:

  1. Video: Points at a source file in a Storage bucket and holds the media metadata probed from it, such as duration, resolution, and codecs. See Videos.
  2. Profile: A reusable encoding target with a resolution, video and audio bitrate, and codec. You create profiles once per project, before you encode. See Encoding profiles.
  3. Rendition: One encode of a video against one profile, packaged for one output. Players switch between renditions as bandwidth changes. See Renditions.
  4. Output: The streaming format a rendition is packaged in: HLS, DASH, or CMAF. Each output has a master manifest that players load first. See Outputs.
  5. Captions and timeline: Text tracks listed in the manifest, and scrubbing thumbnails generated from the source. See Captions and Timeline.
Plain text
Storage file ──> Video ──> Renditions (profile × output) ──> Master manifest ──> Player
├──> Captions
└──> Timeline (sprites + WebVTT)

The API at a glance

Everything the Console does is available from a server SDK with an API key. Create your encoding profiles once per project with project.createVideoProfile(). After that, a typical integration makes four calls per video:

StepCallNotes
1. Upload the sourcestorage.createFile()Any bucket. The file can stay private
2. Create the videovideos.create({ videoId, bucketId, fileId, permissions })Set who can watch with permissions. Queues the timeline. Metadata fills in shortly after
3. Encodevideos.createRendition({ videoId, profileId, output })Once per profile. Encoding runs in the background
4. PlayMaster manifest URLBuild it from the video ID. See Outputs

To run steps 2 and 3 for every upload automatically, see Automate with Functions.

Get started

Upload a file, encode a ladder, and play the stream in a browser.

Concepts

Core ideas behind videos, encoding, and delivery.

Guides

Step-by-step guides for playing and checking your streams.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.