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:
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-import-subscription valueYour MK.IO subscription name, found under Dashboard > Subscription Summary
--mediakind-export-subscription valueYour MK.IO subscription name, found under Dashboard > Subscription Summary
--exportPulls data from Azure Media Services (or MK.IO), 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.
--streaming-policiesBoolean: 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.
--overwriteOverwrite resources that already exist
--debugEnable debug logging while running the tool
--created-beforeFilters exports to resources created before the given date
--created-afterFilters 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.