> ## Documentation Index
> Fetch the complete documentation index at: https://rendi.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Playlist Outputs

> Generate HLS or DASH playlist outputs from FFmpeg in Rendi — segmented streaming-ready files.

FFmpeg can generate playlist-based streaming formats like HLS and MPEG-DASH, which split media into multiple segment files plus a manifest. Rendi fully supports these outputs—automatically storing all generated files and providing you with a streamable manifest URL.

## Overview

When your FFmpeg command outputs a playlist manifest (e.g., `playlist.m3u8` or `manifest.mpd`), Rendi will:

* Store all generated playlist files (manifest + segments).
* Return back an **accessible URL** for the manifest file.
* Allow you to **stream directly** from your Rendi storage using that manifest URL.

Alternatively, you can request the output using [**dynamic\_files**](/dynamic-files#dynamic-outputs), which returns a zipped package containing the manifest and all segment files.

> **Playlist output files should start with `out_playlist_` prefix**

## Supported Formats

Rendi now supports FFmpeg jobs that generate playlist-based outputs.

### HLS (`.m3u8`):

#### FFmpeg Command to generate hls playlist

This command takes the first 20 secondes of the video, and creates 4 segments, 5 seconds each. Outputs to `playlist.m3u8` manifest file. Notice you must use the `out_playlist_` prefix.

```bash theme={null}
ffmpeg -i https://storage.rendi.dev/sample/sample.avi -t 20 -c:v h264 -c:a aac -b:v 2000k -b:a 128k -hls_time 5 -hls_list_size 0 -f hls playlist.m3u8
```

#### Generate hls playlist using Rendi

To run this command in Rendi, you need to use the `/v1/run-ffmpeg-command` endpoint:

```bash theme={null}
curl --location 'https://api.rendi.dev/v1/run-ffmpeg-command' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json; charset=utf-8' \
--data '{
    "input_files": {
        "in_1": "https://storage.rendi.dev/sample/sample.avi"
    },
    "output_files": {
        "out_playlist_1": "playlist.m3u8"
    },
    "ffmpeg_command": "-i {{in_1}} -t 20 -c:v h264 -c:a aac -b:v 2000k -b:a 128k -hls_time 5 -hls_list_size 0 -f hls {{out_playlist_1}}"
}'
```

### MPEG-DASH (`.mpd`):

#### FFmpeg Command to generate dash playlist

This command takes the first 20 secondes of the video, and creates 4 segments, 5 seconds each. Additionally generates two init files. One for video and one for audio. Outputs to `manifest.mpd` manifest file. Notice you must use the `out_playlist_` prefix.

```bash theme={null}
ffmpeg -i https://storage.rendi.dev/sample/sample.avi -t 20 -map 0:v -map 0:a -c:v libx264 -b:v 2000k -c:a aac -b:a 128k -use_timeline 1 -use_template 1 -seg_duration 5 -init_seg_name init-$RepresentationID$.mp4 -media_seg_name chunk-stream$RepresentationID$-$Number%05d$.m4s -adaptation_sets \"id=0,streams=v id=1,streams=a\" -f dash manifest.mpd
```

#### Generate dash playlist using Rendi

To run this command in Rendi, you need to use the `/v1/run-ffmpeg-command` endpoint:

```bash theme={null}
curl --location 'https://api.rendi.dev/v1/run-ffmpeg-command' \
--header 'X-API-KEY: <api-key>' \
--header 'Content-Type: application/json; charset=utf-8' \
--data '{
    "input_files": {
        "in_1": "https://storage.rendi.dev/sample/sample.avi"
    },
    "output_files": {
        "out_playlist_1": "manifest.mpd"
    },
    "ffmpeg_command": "-i {{in_1}} -t 20 -map 0:v -map 0:a -c:v libx264 -b:v 2000k -c:a aac -b:a 128k -use_timeline 1 -use_template 1 -seg_duration 5 -init_seg_name init-$RepresentationID$.mp4 -media_seg_name chunk-stream$RepresentationID$-$Number%05d$.m4s -adaptation_sets \"id=0,streams=v id=1,streams=a\" -f dash {{out_playlist_1}}"
}'
```

## Using your playlist output

When commands' `status` reaches `SUCCESS`, you'll get the manifest file in the response:

```json theme={null}
{
  "command_id": "6197c8db-65f5-4e22-aa90-92d79378a336",
  "status": "SUCCESS",
  "command_type": "FFMPEG_COMMAND",
  "total_processing_seconds": 29.8374,
  "ffmpeg_command_run_seconds": 2.252912998199463,
  "vcpu_count": 8,
  "output_files": {
    "out_1": {
      "file_id": "4ed6573f-00be-44d0-b14b-928204670375",
      "storage_url": "https://storage.rendi.dev/files/.../playlist.m3u8",
      "status": "STORED",
      "rendi_store_type": "OUTPUT",
      "is_deleted": false,
      "size_mbytes": 5.415143966674805,
      "file_type": "output_manifest",
      "file_format": "m3u8",
      "file_count": 5
    }
  },
  "original_request": {
    "input_files": {
      "in_1": "https://storage.rendi.dev/sample/sample.avi"
    },
    "output_files": {
      "out_playlist_1": "playlist.m3u8"
    },
    "ffmpeg_command": "-i {{in_1}} -t 20 -c:v h264 -c:a aac -b:v 2000k -b:a 128k -hls_time 5 -hls_list_size 0 -f hls {{out_1}}"
  }
}
```

##### `size_mbytes`

Contains the total size of the complete playlist, including:

* The manifest file
* All segment/chunk files
* Any associated sub-playlists (for multi-bitrate HLS)

##### `file_count`

The number of files that compose the full playlist output (e.g., 1 manifest + 4 segments = 5).

## Related Resources

* [Run FFmpeg Command](/api-reference/endpoint/run-ffmpeg-command) - API documentation
* [Dynamic Files Output](/dynamic-files#dynamic-outputs) - Output your playlist as dynamic output
* [Delete Command Files](/api-reference/endpoint/delete-command-files) - Delete your playlists
