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.
  • Populate the below parameters and their values:
OptionValue
--azure-subscription valueYour Azure AMS account > Overview > Essentials > Subscription ID
--azure-resource-group valueYour Azure AMS account > Overview > Essentials > Resource Group
--azure-account-name valueYour Azure account ID
--mediakind-subscription valueYour MK.IO subscription name, found under Dashboard > Subscription Summary
--exportPulls data from Azure Media Services, creating a JSON file as output.
--importReads the JSON file and inserts data into MK.IO.
--validateValidates imported assets.
--assetsBoolean: option defaults to false, but will set to true if flags are added.
--asset-filtersBoolean: option defaults to false, but will set to true if flags are added.
--streaming-locatorsBoolean: option defaults to false, but will set to true if flags are added.
--content-key-policiesBoolean: option defaults to false, but will set to true if flags are added.
--streaming-endpointsBoolean: option defaults to false, but will set to true if flags are added.
--migration-file valueSpecify migration file to use for import and/or export.

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-subscription migration --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? Visit the MediaKind support center.