> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/dynamic-media-optimization-dmo/transformations/video-optimization/video-api/optimizing/transcode.md).

# Transcode

## Overview

Video transcoding is an add-on to our service, designed to provide seamless and efficient transcoding capabilities. It specializes in converting input videos into adaptive streaming formats, such as HTTP Live Streaming (HLS). With support for various input file formats (e.g. MP4, MOV) and target resolutions, optimal video delivery is guaranteed across multiple devices and network conditions.

Visit the following links to learn more about adaptive video streaming over HTTP:

{% embed url="<https://en.wikipedia.org/wiki/HTTP_Live_Streaming>" %}

The process can be summarized in three simple steps:

1. Upload of the origin video file to DAM.
2. Transcoding into chunks with support for multiple target resolutions.
3. Generation of the playlist file ( *.m3u8* for HLS) that provides the necessary information for the video player to retrieve and play the video segments in a specific order and format.

## Typical use cases

By leveraging video transcoding for adaptive streaming, you gain access to the following:

* **Multi-device compatibility** - With adaptive streaming formats like HLS, the videos become compatible with a wide range of devices, including smartphones, tablets, smart TVs, and desktop computers. This broad compatibility ensures that the content reaches a larger audience.
* **Improved user experience** - Adaptive streaming adjusts the video quality dynamically, based on the viewer's available bandwidth. This results in reduced buffering times, faster start-up and uninterrupted playback, enhancing the overall user experience.
* **Bandwidth optimization** - Our service efficiently compresses and transcodes videos, reducing the file size without compromising the visual quality. This optimization helps to minimize bandwidth consumption, allowing smoother playback even on limited network connections.
* **Scalability and flexibility** - Support for large volumes of video transcoding requests as well as a wide range of input file formats and target resolutions, thus ensuring scalability and providing flexibility in adapting to specific requirements.

## Activation in DAM

Video Transcoding is an add-on service that can be purchased and activated as a [Postprocess](/digital-asset-management-dam/settings/automations/post-processing.md#post-process-list) for automatic execution during file upload in DAM. Contact Sales or the Support team to enable this feature.

## Recommended Video properties

To have the best results from this postprocess, we encourage the following settings for input videos:

| Quality | Resolution        | Bitrate            |
| ------- | ----------------- | ------------------ |
| High    | 960x540 / 854x480 | 1200 - 1500 kbps   |
| HD 720  | 1280x720          | 1,500 - 4,000 kbps |
| HD 1080 | 1920x1080         | 4,000-8,000 kbps   |
| 4K      | 3840x2160         | 8,000-14,000 kbps  |

## API endpoints

Video Transcoding is also available through API endpoints. Information about them is available in an always up-to-date documentation, that can be accessed via the following link:

{% embed url="<https://developers.scaleflex.com/#6a62c3b1-65f5-40c2-ad32-f3f08422435b>" %}

There, you can find detailed information about the API endpoints, together with all required request parameters, so you know how to interact with them.

This feature is developed for transcoding of external videos which are not stored directly in DAM. The process is asynchronous.

## Examples

### Input video

{% embed url="<https://www.pexels.com/download/video/16343098>" %}

### Request body

```json
[
    {
        "url":"https://www.pexels.com/download/video/16343098", 
        "video_protocols": "hls"
    }
]
```

### API response

```json
{
    "status": "ok",
    "version": 2.11,
    "result": [
        {
            "uuid": "e7777629-34fd-4088-9541-c705dc599b10",
            "url": "https://www.pexels.com/download/video/16343098",
            "sha1": "dfec29eb2d9d5234e4ed5b70cebd4da00f721d26",
            "transcoded": [
                {
                    "resolution": "auto",
                    "playlists": [
                        "https://fbmjmuoeb.filerobot.com/gDOla_16343098/hls/video.m3u8"
                    ]
                }
            ],
            "progress": "https://api.filerobot.com/fbmjmuoeb/v4/video-status/ZXUtb3YtNzA2LWdyYTIuZWxhc3RpYy11cGxvYWRlci5haXJzdG9yZS5zY2FsM2ZsM3guY29tOjg3MzI__e7777629-34fd-4088-9541-c705dc599b10"
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scaleflex.com/dynamic-media-optimization-dmo/transformations/video-optimization/video-api/optimizing/transcode.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
