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

# VOD Playback

> Direct play, transcode, and manifest endpoints for movies and TV episodes

See the [Playback Guide](/api-reference/playback-guide) for the full flow. Each step is detailed below.

## Decide the playback method

<ParamField header="Device-ID" type="string" />

<ParamField header="Device-Audio-Codecs" type="string">Comma-separated, e.g. `aac,ac3`</ParamField>

<ParamField header="Device-Audio-Channels" type="integer" />

```bash theme={null}
curl http://<server>:9014/watch/vod/501/play-info \
  -H "Device-ID: my-device-1" -H "Device-Audio-Codecs: aac,ac3" -H "Device-Audio-Channels: 6"
```

<ResponseField name="method" type="string">`direct`, `remux`, `audio-only`, or `transcode`</ResponseField>
<ResponseField name="url" type="string">Path to request next</ResponseField>
<ResponseField name="format" type="string">`mkv`, `mp4`, or `dash`</ResponseField>

```json theme={null}
{"method": "direct", "url": "/watch/vod/501/file", "format": "mkv"}
```

`GET /watch/vod/{item_id}/play-info`

***

## Direct play / redirect notice

```bash theme={null}
curl http://<server>:9014/watch/vod/501 -H "Range: bytes=0-"
```

Direct play returns the raw file (Range supported for seeking). Otherwise returns:

```json theme={null}
{"status": "redirecting", "type": "dash", "transcode_url": "/watch/vod/501/master.mpd"}
```

`GET /watch/vod/{item_id}`, raw bytes at `/watch/vod/{item_id}/file`

***

## Transcoded manifests

<ParamField query="version" type="integer">Which available version to play</ParamField>

<ParamField query="maxBitrate" type="integer" />

<ParamField query="audioTrack" type="integer" />

```text theme={null}
GET /watch/vod/{item_id}/master.mpd    # DASH: Roku, Android
GET /watch/vod/{item_id}/master.m3u8   # HLS: web
```

Requesting either manifest starts the transcode job if it isn't already running; segment requests that follow are held until ffmpeg produces them.

<Warning>
  Roku and Android are DASH-only. Always route those clients to `master.mpd`, never `master.m3u8`. See the [CLAUDE.md design note](/) on live/VOD format selection if you're extending this.
</Warning>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.