Imagine you have ingested all your assets with all audio tracks and all subtitle tracks. You have ingested them using an HD ingestion profile so you have all your video bitrates available. Then you realise that for a certain group of people you just want to present a subset of the available tracks. Perhaps you don't have the rights for some of the subtitles in a specific country, or you only want people in a certain region to see the highest bitrates. To solve this, do you really need to ingest everything again and create totally different material versions? No, you don't. You can achieve this very easy by using material variants.
When you create a material you can add any number of profiles to it. If you don't give it a profile it will automatically get the profile
The profile is used in the play call to decide if this material should be selected or not.
When you do a play call using exposure you always play an asset. Every asset can have any number of active materials and for every play call
the platform will select one material, a video version, that will be used for this play call.
If there is no active material the asset is in fact not playable and if there is only one the decision is simple, you will get this one. The question is what is happening if there are multiple active materials? The answer is that one will be selected based on the profile. See Material Profiles for more information.
In the platform there is a way to select the preferred profile for each play call.
This selection mechanism can be based on user, region or any other supported algorithm.
The logic can for instance be to select the profile
america if the play call originates from America,
asia if the play call originates from Asia and otherwise it will be `default.
To support this without material variants you would have to do one ingest to create a material with the profile
another ingest to create the America material, and a third ingest to create the Asia material.
If you instead use material variants you can create one single material having for instance profile
This will contain all audios, all subtitles and all video bitrates. Then you create two variants for this material.
One for America and one for Asia. For each variant you specify what should be available. It will be a subset of what is available for the base material.
You can create the variants either directly when doing the ingest or later as a simple update of the material.
When a play call is made the platform will realise that this material is in fact supporting all the profiles
asia is selected it will return a manifest with a limited number of tracks, as defined for that variant.
How To Select Tracks¶
Selecting which tracks to include for a variant can be done in a number of different ways. - Select all = true for a specific type, this always mean that you will get all. - Select included = true and provide the tracks you want to include (included = true is default) - Select included = false and provide the tracks you want to exclude.
The above apply for all type of tracks, audio/subtitle/video. For video there is also a special attribute called maxBitrate. If that is provided we will include all video tracks having a bitrate equal to or lower than the provided value.
Separation by regions¶
Material profile is selected based on the device location.
Europe is considered to be default in this example. For europe we will include all tracks of all types. This will be the base material with profile
For America, both North America and South America we will skip some languages both as audio and subtitles. We will just keep english and spanish.
We create a variant called America supporting both profile
southamerica (by separating in two profiles it will be easy to separate them in the future).
For Asia we do similar to America but here we will just keep English audio and subtitles.
For Africa we keep English and French for audio and subtitles. For Africa we also remove the highest video bitrate.
Separation by device type¶
Material profile is selected based on the device type.
Default is to include everything. This will be the base material with profile default`.
For mobile we want to skip the highest profile. We create a variant called mobile where the highest bitrate is excluded.
For setup boxes there is perhaps a problem with selecting subtitles (an invented problem) so here we create a variant called stb where we have just English subtitles.