Introducing MPEG-DASH support for adaptive streaming
We are happy to announce that a beta version of our new /video/adaptive Robot has been released, which contains our long-awaited support for the streaming standard MPEG-Dash!
Using the /video/adaptive Robot is very easy. You
simply pipe /video/encode and
/audio/encode Steps into this Robot and it
will generate the M4F segments along with the MPD manifest file for you. If you then feed the
Robot's output to a storage Robot of your choice – and use the
${file.relative_path}
Assembly Variable in the storage Robot's path
parameter – all files will be stored in the proper location relative to each other, making sure that
the manifest file works.
Let's dive right in and have a look at an example Template:
{
"steps": {
"1080p-video": {
"robot": "/video/encode",
"use": ":original",
"ffmpeg_stack": "v2.2.3",
"preset": "dash-1080p-video"
},
"720p-video": {
"robot": "/video/encode",
"use": ":original",
"ffmpeg_stack": "v2.2.3",
"preset": "dash-720p-video"
},
"32k_audio": {
"robot": "/video/encode",
"use": ":original",
"ffmpeg_stack": "v2.2.3",
"preset": "dash-32k_audio"
},
"64k_audio": {
"robot": "/video/encode",
"use": ":original",
"ffmpeg_stack": "v2.2.3",
"preset": "dash-64k_audio"
},
"adaptive": {
"robot": "/video/adaptive",
"use": {
"steps": [
"1080p-video",
"720p-video",
"32k_audio",
"64k_audio"
],
"bundle_steps": true
},
"technique": "dash",
"playlist_name": "my_playlist.mpd"
},
"store": {
"robot": "/s3/store",
"use": "adaptive",
"path": "dashtest/${file.meta.relative_path}/${file.name}",
"key": "YOUR_AWS_KEY",
"secret": "YOUR_AWS_SECRET",
"bucket": "YOUR_S3_BUCKET"
}
}
}
As you can see in this Template, we are creating two high-bitrate video versions of the input video as well as two audio-only versions. To assist you with the encoding settings, we have added new special presets to the /video/encode and /audio/encode Robots, specifically for MPEG-Dash. As usual, you can overwrite these settings with your own custom FFmpeg settings, though.
Here are the formats and codecs that you can currently pipe into the /video/adaptive Robot for use with MPEG-Dash:
- Formats:
mp4
andwebm
- Video codecs:
h264
,hvec
,vp8
,vp9
- Audio codecs:
aac
,ac3
,vorbis
- DRM is currently not supported, but we'll likely add this later on
The Robot not only allows you to change the duration of the segments (default: 10 seconds), but also the name of the manifest files, because having better control over that file's name could be relevant to your website due to player constraints, or compatibility with existing solutions. The segment file names, however, will be set by the Robot itself and cannot be controlled directly right now.
You can see the above example Template in action in this demo. Instructions on how to playback the manifest file can also be found there.
When you're ready to get serious, please hop over to the /video/adaptive Robot's documentation to learn about all the presets and parameters.
Even though it is still in beta, we are very excited about the release of this Robot! We hope you'll give it a warm welcome, and let us know your findings via the speech bubble on our site! The /video/adaptive Robot is flexible and besides DASH, even supports Apple's HTTP Live Streaming (HLS). More on that in another blog post. 😄