Convert videos to HLS, MPEG-Dash and CMAF
🤖/video/adaptive encodes videos into HTTP Live Streaming (HLS), MPEG-Dash and CMAF supported formats and generates the necessary manifest and playlist files.

This Robot accepts all types of video files and audio files. Do not forget to use Step bundling in your use parameter to make the Robot work on several input files at once.
This Robot is normally used in combination with 🤖/video/encode. We have implemented video and audio encoding presets specifically for MPEG-Dash and HTTP Live Streaming support. These presets are prefixed with "dash/" and "hls/". View a HTTP Live Streaming demo here.
CMAF aspect ratios
CMAF aligns near-equal rendition aspect ratios, within 1% of the largest rendition, without re-encoding or changing pixel dimensions. This lets presets such as "hls/480p" and "hls/720p" support bitrate switching together.
Renditions with substantially different ratios, such as 4:3 and 16:9, keep their geometry in separate video groups. The Assembly warns because DASH players cannot switch bitrate between these groups. HLS still lists every variant. Use matching rendition ratios when custom FFmpeg options change video geometry or layout.
Segment alignment
HLS and CMAF video segments split at existing keyframes, so their actual duration can exceed segment_duration. To align renditions to four-second segments, set "ffmpeg": { "force_key_frames": "expr:gte(t,n_forced*4)" } in each preceding 🤖/video/encode Step. Replace 4 with your chosen segment duration and use the same value for every rendition. Set keyframe intervals during encoding; packaging cannot add keyframes to copied streams.
Required CORS settings for MPEG-Dash and HTTP Live Streaming
Playing back MPEG-Dash Manifest or HLS playlist files requires a proper CORS setup on the server-side. The file-serving server should be configured to add the following header fields to responses:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Access-Control-Allow-Headers: *
If the files are stored in an Amazon S3 Bucket, you can use the following CORS definition to ensure the CORS header fields are set correctly:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET"],
"AllowedOrigins": ["*"],
"ExposeHeaders": []
}
]
To set up CORS for your S3 bucket:
- Visit https://s3.console.aws.amazon.com/s3/buckets/
- Click on your bucket
- Click "Permissions"
- Edit "Cross-origin resource sharing (CORS)"
Storing Segments and Playlist files
The Robot gives its result files (segments, initialization segments, MPD manifest files and M3U8 playlist files) the right metadata property relative_path, so that you can store them easily using one of our storage Robots.
In the path parameter of the storage Robot of your choice, use the Assembly Variable ${file.meta.relative_path} to store files in the proper paths to make the playlist files work.
Usage example
Implementing HTTP Live Streaming: encode the uploaded video into three versions, then cut them into several segments and generate playlist files containing all the segments:
{
"steps": {
":original": {
"robot": "/upload/handle"
},
"encoded_1080p": {
"ffmpeg_stack": "v7",
"preset": "hls/1080p",
"robot": "/video/encode",
"use": ":original"
},
"encoded_480p": {
"ffmpeg_stack": "v7",
"preset": "hls/480p",
"robot": "/video/encode",
"use": ":original"
},
"encoded_720p": {
"ffmpeg_stack": "v7",
"preset": "hls/720p",
"robot": "/video/encode",
"use": ":original"
},
"hls_bundled": {
"playlist_name": "my_playlist.m3u8",
"robot": "/video/adaptive",
"technique": "hls",
"use": {
"bundle_steps": true,
"steps": [
"encoded_480p",
"encoded_720p",
"encoded_1080p"
]
}
}
}
}Parameters
interpolateboolean | Record<string, boolean>Controls whether Assembly Variables are interpolated for individual instruction fields.
By default, most Robot instruction fields interpolate Assembly Variables. Set this to
falseto treat every instruction field as literal text, or set an individual field path tofalseto treat only that field as literal text. For Robot-specific fields that are literal by default, set this totrueor set that field path totrueto opt back into interpolation.Use field names such as
path, or dotted paths such asffmpeg.vffor nested objects.output_metaRecord<string, boolean> | boolean | Array<string>Allows you to specify a set of metadata that is more expensive on CPU power to calculate, and thus is disabled by default to keep your Assemblies processing fast.
For images, you can add
"has_transparency": truein this object to extract if the image contains transparent parts and"dominant_colors": trueto extract an array of hexadecimal color codes from the image.For images, you can also add
"blurhash": trueto extract a BlurHash string — a compact representation of a placeholder for the image, useful for showing a blurred preview while the full image loads.For images,
"thumbhash": trueinstead extracts a base64-encoded ThumbHash intometa.thumbhash, together withmeta.has_alpha(whether an alpha channel exists, even when fully opaque). It describes EXIF-oriented pixels and uses the first frame of animated images. Extraction is best-effort: images above 40 megapixels, unsupported formats, or a failed/bounded decode produce no placeholder. Successful extraction adds a metadata charge equivalent to 20% of that file's bytes. No ThumbHash surcharge applies when disabled or when no hash is produced.Set this option on the Step producing the image, such as
/upload/handlefor uploaded originals or/image/resizefor processed outputs. Setting it only on/transloadit/storedoes not request extraction: storage preserves the producer's metadata. Transloadit Storage persists a generated hash with its immutable version and returns it in stored results and native asset reads. Direct S3 uploads do not generate placeholders. A placeholder contains image information, so protect it with the same access controls as the full image.For videos, you can add the
"colorspace": trueparameter to extract the colorspace of the output video.For videos, you can also add
"interlaced": trueto detect whether the video is interlaced. This combines the cheap ffprobefield_orderflag with a boundedidetsampling pass over the first frames of the source, exposinginterlaced,field_order, and a diagnosticinterlace_detectionobject underfile.meta. This is computationally expensive and billed accordingly.For audio, you can add
"mean_volume": trueto get a single value representing the mean average volume of the audio file.You can also set this to
falseto skip metadata extraction and speed up transcoding.user_metaRecord<string, any>(default:{})Adds custom JSON metadata to each emitted file without changing its contents. Nested objects and arrays are supported.
Inheritance depends on the Robot. Values merge with existing
user_metaon the output file; the current Step replaces matching top-level keys. Assign required keys explicitly when a Robot creates fresh outputs.In processing Steps,
${file.*}refers to the first input and${result.*}to the emitted file. Values are evaluated per output after the Robot runs, before subsequent metadata extraction and temporary storage. On:original, values are evaluated per upload before metadata extraction.Downstream Steps read
${file.user_meta.key}. See Custom metadata for a complete example and inheritance rules.resultboolean(default:false)Whether the results of this Step should be present in the Assembly Status JSON
queuebatchSetting the queue to 'batch', manually downgrades the priority of jobs for this step to avoid consuming Priority job slots for jobs that don't need zero queue waiting times
force_acceptboolean(default:false)Force a Robot to accept a file type it would have ignored.
By default, Robots ignore files they are not familiar with. 🤖/video/encode, for example, will happily ignore input images.
With the
force_acceptparameter set totrue, you can force Robots to accept all files thrown at them. This will typically lead to errors and should only be used for debugging or combatting edge cases.ignore_errorsboolean | Array<meta | execute>(default:[])Ignore errors during specific phases of processing.
Setting this to
["meta"]will cause the Robot to ignore errors during metadata extraction.Setting this to
["execute"]will cause the Robot to ignore errors during the main execution phase.Setting this to
trueis equivalent to["meta", "execute"]and will ignore errors in both phases.usestring | Array<string> | Array<object> | objectSpecifies which Step(s) to use as input.
- You can pick any names for Steps except
":original"(reserved for user uploads handled by Transloadit) - You can provide several Steps as input with arrays:
{ "use": [ ":original", "encoded", "resized" ] } - You can also tag input Steps with
asto pass semantic intent to robots:{ "use": [ { "name": ":original", "as": "image" }, { "name": ":original", "as": "mask" } ] }
TipThat's likely all you need to know about
use, but you can view Advanced use cases.- You can pick any names for Steps except
ffmpegobjectCustom FFmpeg options are supported for the
"hls"and"cmaf"techniques. Non-empty custom options are rejected for"dash", the default technique.These options apply to the packaging command, which copies the input streams by default. Set encoding options, such as keyframe intervals, in the preceding 🤖/video/encode Step.
ffmpeg_stackv6 | v7 | v8 | string(default:"v7.0.0")Selects the FFmpeg stack for packaging. Defaults to
"v7.0.0". This Robot always uses at least"v7.0.0"; older stack selections are upgraded automatically.widthstring | number | nullThis parameter has no effect on this Robot. Set the rendition width in the preceding 🤖/video/encode Step.
heightstring | number | nullThis parameter has no effect on this Robot. Set the rendition height in the preceding 🤖/video/encode Step.
presetandroid | android-high | android-low | android_high | android_low | dash-1080p-video | dash-1080p_video |This parameter has no effect on this Robot. Set the encoding preset in the preceding 🤖/video/encode Step.
techniquedash | hls | cmaf(default:"dash")Determines which streaming technique should be used. Supports
"dash"for MPEG-Dash,"hls"for HTTP Live Streaming and"cmaf"for FFmpeg-based CMAF output with both MPEG-Dash and HLS manifests that reference the same fMP4 segments.playlist_namestringThe filename for the generated manifest/playlist file. The default is
"playlist.mpd"if yourtechniqueis"dash", and"playlist.m3u8"if yourtechniqueis"hls". For"cmaf", this value names the MPEG-Dash manifest and defaults to"playlist.mpd".hls_playlist_namestringOnly used when
techniqueis"cmaf". Defines the filename for the generated HLS master playlist. The default is"playlist.m3u8".segment_durationstring | numberThe duration for each segment in seconds. When omitted, defaults to 4 seconds for MPEG-Dash and CMAF, and 10 seconds for HLS.
closed_captionsboolean(default:true)Determines whether you want closed caption support when using the
"hls"technique.audio_groupboolean(default:false)When set to
trueand using the"hls"technique, audio-only input files are treated as alternate audio renditions instead of standalone stream variants. This enables players to offer audio track selection (e.g. for multiple languages). Audio-only files are listed as#EXT-X-MEDIA:TYPE=AUDIOentries in the multivariant playlist, and video variants reference them via theAUDIOattribute.When enabled, video inputs only include their video stream in the output segments (any muxed audio is excluded). Provide audio separately as audio-only input files.
Each rendition’s
LANGUAGEcomes from the first audio stream’slanguagetag in its audio-only input file, or"und"when the tag is missing. Set the tag on 🤖/audio/encode with"ffmpeg": {"metadata:s:a:0": "language=deu"}, for example.The first audio-only input in
use.stepsorder becomesDEFAULT=YES; the other renditions haveDEFAULT=NO. All audio renditions haveAUTOSELECT=YES. TheirNAMEuses the audio stream’stitletag when present, otherwise its language’s English name (for example,"eng"becomes “English” and"deu"becomes “German”). Untagged audio is named “Unknown”; unrecognized language codes are used as the name. Duplicate names receive a numeric suffix.This option only enables alternate audio renditions with the
"hls"technique and does not change packaging with"dash"or"cmaf". CMAF puts all audio in one adaptation set labeled with the first audio language. Settingaudio_group: truewith CMAF, or providing CMAF inputs with more than one known audio language (including tracks muxed in a single video), adds an Assembly warning; packaging continues with the existing CMAF output. For multi-language audio, usetechnique: "hls"withaudio_group: true.