Bulk import of AMS asset metadata
Practical steps for bulk migrating video assets from Azure to MK.IO using MediaKind’s migration tool.
Migrating a large video library from Azure Media Services one at a time can be impractical and time-consuming. Below is a walkthrough of how to leverage MediaKind’s bulk-ingest tool for a smooth and quick bulk migration of video assets from your AMS storage account to MK.IO.
You can retrieve the script for the MK.IO bulk-ingest tool in this public GitHub repository: mediakind-video/ams-migration-tool.
Before starting
Ensure that you have subscribed to MK.IO through Azure Marketplace and that your MK.IO subscription is up and running.
Also ensure that you connect your Azure storage account that contains the assets that you need to migrate. MK.IO will connect directly to this account, to index the existing files and create new access URLs for you to stream your content from. Assets will remain in your Azure storage account and part of your existing Azure subscription. Access to your assets, from MK.IO, can be easily managed by you, using the Shared Access Signature (SAS token) that you create directly in Azure.
Import your assets
- Navigate to the Media Services section of your AMS portal.
- Enter the MK.IO portal under the subscription instance to which you want to migrate your AMS assets.
- Build the program using the bulk-ingest script using the binary from our public GitHub repository.
- In the command-line terminal, type in mkio-ams-migration.
- Migration is available from AMS to MK.IO or from MK.IO subscription to MK.IO subscription in the same account.
- Populate the below parameters and their values:
Option | Value |
---|---|
--azure-subscription value | Your Azure AMS account > Overview > Essentials > Subscription ID |
--azure-resource-group value | Your Azure AMS account > Overview > Essentials > Resource Group |
--azure-account-name value | Your Azure account ID |
--mediakind-import-subscription value | Your MK.IO subscription name, found under Dashboard > Subscription Summary |
--mediakind-export-subscription value | Your MK.IO subscription name, found under Dashboard > Subscription Summary |
--export | Pulls data from Azure Media Services (or MK.IO), creating a JSON file as output. |
--import | Reads the JSON file and inserts data into MK.IO. |
--validate | Validates imported assets. |
--assets | Boolean: option defaults to false, but will set to true if flags are added. |
--asset-filters | Boolean: option defaults to false, but will set to true if flags are added. |
--streaming-locators | Boolean: option defaults to false, but will set to true if flags are added. |
--content-key-policies | Boolean: option defaults to false, but will set to true if flags are added. |
--streaming-endpoints | Boolean: option defaults to false, but will set to true if flags are added. |
--streaming-policies | Boolean: option defaults to false, but will set to true if flags are added. |
--migration-file value | Specify migration file to use for import and/or export. |
--overwrite | Overwrite resources that already exist. |
--debug | Enable debug logging while running the tool. |
--workers | Number of workers to process assetFilters in parallel. |
--created-before | Filters exports to resources created before the given date. |
--created-after | Filters exports to resources created after the given date. |
To migrate from AMS to MK.IO the command will look like the example below:
./mkio-ams-migration --azure-subscription 29628ffc-5d07-4af3-88a8-3f710582a73b --azure-resource-group ams-test --azure-account-name amstest --mediakind-import-subscription migration --export --import --assets --streaming-locators --asset-filters --content-key-policies --streaming-endpoints
To migrate from MK.IO subscription to MK.IO subscription in the same MK.IO account, the command will look like the example below:
./mkio-ams-migration --mediakind-export-subscription mkioexportsubscription --mediakind-import-subscription mkioimportmigration --export --import --assets --streaming-locators --asset-filters --content-key-policies --streaming-endpoints
- Run the migration using the information gathered in Setup.
- You can view the migration progress in the command terminal as the steps complete.
Verify your assets have been imported
You can refresh the Assets section of your MK.IO dashboard to verify that the assets you’ve migrated from AMS have been ingested and indexed into MK.IO.
Enable your migrated asset for streaming
Once you have migrated all your assets, you are ready to create Streaming endpoints and Streaming Locators to enable them to be delivered your client applications.
Need some help with your bulk migration from AMS to MK.IO? Take a look at this tutorial in our support portal or visit the MediaKind support center.
Updated about 2 months ago