Azure Media Services Assets code samples
Warning
Azure Media Services will be retired June 30th, 2024. For more information, see the AMS Retirement Guide.
This article is a listing of code samples for Assets.
List assets
This is a basic example of how to connect and list assets.
Node.JS | Python |
Get the storage container from an asset
This sample demonstrates how to find the Azure storage account container used to store the contents of this asset. This can be used to then edit sources, modify, or copy contents using the Azure storage SDK library.
Node.JS | Python |
List assets using filters
This sample shows you how to use filters in your list assets calls to find assets by date and order them.
Node.JS | Python |
List the streaming locators on an asset using filters
This sample shows you how to use filters to list the streaming locators attached to your assets.
Node.JS | Python not yet available |
List tracks in an asset
This sample shows you how to use the tracks collection to list all of the track names and track types (audio, video, or text) available on an asset
Node.JS | Python |
Add a WebVTT/IMSC1/TTML subtitle or caption to an existing asset
This sample shows you how to use the Tracks API on an Asset to add a new WebVTT or TTML/IMSC1 text profile caption or subtitle to an existing asset.
Node.JS | Python not yet available |
Add an additional audio track to an existing asset using the tracks API
This sample shows you how to use the Tracks API on an Asset to add an additional audio language or descriptive audio track to an existing asset. This sample demonstrates how to upload, encode using content aware encoding, and then late bind an additional audio track for a new language to the asset.
Node.JS | Python |
Asset management with .NET
The sample for .NET contains the methods listed above in one script.