Our APIs for generating MP4s have gone through a few iterations as we’ve worked through the ideal way to balance providing good defaults and giving developers the control needed to meet the needs of their use cases.
A few months ago we announced our new static renditions API, that gives you more flexibility over how you generate MP4s. You can specify highest, which uses the maximum resolution of your asset, or audio-only to get an audio-only version, naturally.
While those two MP4s fit the majority of use cases, we’ve also heard from customers who need more granular control over their MP4 renditions.
That's why today, I'm excited to announce advanced static renditions — a new way to generate MP4 files at the specific resolution you need, giving you precise control over your static video renditions.
When are advanced static renditions the way to go?
Our standard static renditions are simple, predictable, and cover most of what customers need.
But video workflows aren't always simple. Maybe you're:
- Uploading to social media platforms that perform best with specific resolutions
- Creating a mobile app that downloads short videos for offline viewing, where you want to offer multiple quality options but can’t use adaptive streaming
- Building a digital asset management system where different user tiers get access to different resolution downloads
For these more complex scenarios, highest available isn’t ideal. You need to be able to say "give me exactly 720p" or "I want both 480p and 1080p versions".
Using advanced static renditions
Advanced static renditions solve this by letting you specify exact resolutions when creating static renditions. Instead of asking for the highest quality, you can request a specific resolutions from our supported set:
- 270p
- 360p
- 480p
- 540p
- 720p
- 1080p
- 1440p
- 2160p
Here's how simple it is to create an asset with multiple specific MP4 renditions:
// POST /video/v1/assets
{
"input": "https://storage.googleapis.com/muxdemofiles/mux-4k.mp4",
"playback_policy": [
"public"
],
"max_resolution_tier": "2160p",
"video_quality": "basic",
"static_renditions" : [
{
"resolution" : "2160p"
},
{
"resolution" : "480p"
}
]
}
An advantage of this approach is that advanced static renditions are generated independently of the HLS adaptive bitrate ladder. If you’ve chosen to create the asset as basic video quality, but you specifically need a 360p MP4, we'll generate that 360p rendition specifically for the static rendition.
We don’t upscale content, so if you upload a 720p video and request a 1080p MP4, that rendition will be skipped rather than the video being artificially enlarged.
The technical details
Let’s talk about a few implementation details:
Quality inheritance: All static renditions inherit their video quality settings from the parent asset. If you're using our premium video quality level for example, your static renditions will be encoded with the same high-quality settings. This ensures consistency between your streaming and downloadable versions.
Flexible mixing: You can mix advanced static renditions with our standard audio-only renditions, but you can't combine the standard highest option with specific resolutions. You’ll need to pick one approach or the other for your static video renditions.
Predictable filenames: Each advanced static rendition gets a predictable filename based on its resolution (e.g. 480p.mp4, 1080p.mp4, etc.) making it easy to construct download URLs programmatically.
For more details on using advanced static renditions, check out the docs.
Pricing
Unlike standard static renditions, advanced static renditions incur a cost for encoding because they require dedicated encoding work for each file that you create. Advanced static renditions are billed per minute encoded. They are also billed per minute for static rendition storage and for delivery and are eligible for cold storage pricing.
You can find more detailed information on pricing in the encoding, storage, and delivery costs.
What's next
Advanced static renditions are available today to all customers. If you're working on projects that need this level of control over your static renditions, we'd love to have you try it out and give us feedback.
As always, we'd love to hear what you're building and how we can make it even better. Drop us a note if you have ideas for what we should tackle next.