---
title: Adaptive bitrate playback URL guidelines
summary: null
url: >-
  https://www.fastly.com/documentation/guides/full-site-delivery/video/adaptive-bitrate-playback-url-guidelines
---

Fastly's [On-the-Fly Packager (OTFP) service](https://docs.fastly.com/products/fastlys-onthefly-packager-service) supports any directory structure you might use to store different quality levels of a video. To construct adaptive bitrate (ABR) playback URLs for a  video, make directory paths to that video unique. Ensure all the files associated with a particular video (e.g., quality levels, subtitles) exist under a single directory.

> **IMPORTANT:** 
>
> If you aren't sure how to configure OTFP, [contact support](https://support.fastly.com) before making any changes.
>
>

For example, say you had a video called Example Video. Assuming you had multiple quality levels and associated files for Example Video, the following directory structure would provide the best start to constructing ABR playback URLs:

| Directory path example                   | Description                                                      |
| ---------------------------------------- | ---------------------------------------------------------------- |
| `/foo/bar/example-video/`                | Base folder unique to this video                                 |
| `/foo/bar/example-video/480p_30fps.mp4`  | Quality level 480p with 30 frames per sec with audio             |
| `/foo/bar/example-video/720p_30fps.mp4`  | Quality level 720p with audio with 30 frames per sec with audio  |
| `/foo/bar/example-video/720p_60fps.mp4`  | Quality level 720p with audio with 60 frames per sec with audio  |
| `/foo/bar/example-video/1080p_30fps.mp4` | Quality level 1080p with audio with 30 frames per sec with audio |
| `/foo/bar/example-video/1080p_60fps.mp4` | Quality level 1080p with audio with 60 frames per sec with audio |
| `/foo/bar/example-video/4k_30fps.mp4`    | Quality level 4k with audio with 30 frames per sec with audio    |

With this directory structure, the ABR playback URL for all videos in the base directory would follow this template:

```plain
http://example.com/path/to/dir/<video_id>/<quality_file1_name_wo_ext>,<quality_file2_name_wo_ext>,...,<quality_fileN_name_wo_ext>/master.<f4m|m3u8|mpd>
```

For example, the ABR playback URLs for Example Video in every format would be:

| Format    | Example URL                                                                                                              |
| --------- | ------------------------------------------------------------------------------------------------------------------------ |
| HDS       | `http://example.com/foo/bar/example-video/480p_30fps,720p_30fps,720p_60fps,1080p_30fps,1080p_60fps,4k_30fps/master.f4m`  |
| HLS       | `http://example.com/foo/bar/example-video/480p_30fps,720p_30fps,720p_60fps,1080p_30fps,1080p_60fps,4k_30fps/master.m3u8` |
| MPEG-DASH | `http://example.com/foo/bar/example-video/480p_30fps,720p_30fps,720p_60fps,1080p_30fps,1080p_60fps,4k_30fps/master.mpd`  |

You can reduce the duplication in ABR playback URLs separating out the repeated prefix and suffix info as follows:

```plain
<filename_prefix><filename_variable><filename_suffix_wo_ext>.mp4
```

and the template would change to one of the following:

```plain
http://example.com/path/to/dir/<video_id>/<filename_prefix><quality_file1_variable_name_wo_ext>,<quality_file2_variable_name_wo_ext>,...,<quality_fileN_variable_name_wo_ext>,<filename_suffix_wo_ext>/master.<f4m|m3u8|mpd>
```

```plain
http://example.com/path/to/dir/<video_id>/<filename_prefix><quality_file1_variable_name_wo_ext>,<quality_file2_variable_name_wo_ext>,...,<quality_fileN_variable_name_wo_ext>/master.<f4m|m3u8|mpd>
```

```plain
http://example.com/path/to/dir/<video_id>/<quality_file1_variable_name>,<quality_file2_variable_name>,...,<quality_fileN_variable_name>,<filename_suffix_wo_ext>/master.<f4m|m3u8|mpd>
```

> **HINT:** To use token validation with ABR manifest URLs, special modifications must be made using [custom VCL](https://www.fastly.com/documentation/guides/full-site-delivery/fastly-vcl/about-fastly-vcl). [Contact support](https://support.fastly.com) for assistance.
