Create, list or update an asset filter in the portal
Navigate to the Media Services account you want to work with.
Select Assets. The assets screen will appear.
Select the asset you want to work with from the list.
Add a filter
Select + Add an asset filter. The Add asset filter screen will appear.
Enter a name in the Asset filter name field.
List and update a filter
Select a filter from the filters list. The Update asset filter screen will appear.
Time constraints
Select the Time range constraints tab.
If you need to change the timescale of the filter, check the manifest to get the timescale and timestamps, enter a number into the Timescale field.
Optionally, you can set:
The earliest timestamp that should appear in the playback manifest.
The last timestamp that should appear in the playback manifest.
The limit for rewinding content.
How much time to delay your live broadcast.
Track constraints
Select the Track constraints tab.
Enter the bitrate in the HLS startup bitrate field to set the first video track to appear in the HLS playlist to allow HLS native players to start downloading from this quality level.
From the Track selection rules dropdown lists, select the track, video, audio or text.
From the Type dropdown list select one of the conditions for the rule.
In the Value field, enter the value for the condition of the rule.
Once you have finished configuring the asset filter select Save.
List asset filters with the CLI
For more information about this command, see the Media Services CLI reference.
List asset filters with REST
See the Media Services REST API for listing asset filters.
List asset filters with Python
The functions in the Python code snippets assume that you have:
Imported the necessary modules. You may not need all of the modules shown here. If the code below doesn't use the module, you can omit it.
Read and instantiated environment variables by using load_env() as below. Depending on what you are doing, you may or may not need some of the variables.
Created a Media Services client as below.
from dotenv import load_dotenv
from azure.identity import DefaultAzureCredential
from azure.mgmt.media import AzureMediaServices
from azure.mgmt.media.models import (
AccountFilter,
FirstQuality,
AssetFilter
)
import os
# Create the Media Services client and authenticate using the DefaultAzureCredential
default_credential = DefaultAzureCredential()
client = AzureMediaServices(default_credential, subscription_id)