How to migrate all your content from AMS into MK.IO using MK.IO bulk migration tool

How to migrate all your content from AMS into MK.IO using MK.IO bulk migration tool

In this article we will describe in detail the process to migrate all your assets, asset filters, streaming locators, content key policies, streaming endpoints from AMS into MK.IO.

The idea is that if today you have a playback URL in the following format:

once you move this asset to MK.IO your playback URL for the same asset will be something like this (where only the FQDN part of the URL changes):

1. Your Microsoft Azure user has contributor privileges in the subscription that holds your AMS account (this is to prevent issues down the path of migration)
2. You need to install GO in the computer where you are running the migration from. Download and install - The Go Programming Language
3. You need to install Azure Cli in the computer where you are running the migration from. Install the Azure CLI for Windows | Microsoft Learn
4. Download the latest version of the bulk migration tool: GitHub - mediakind-video/ams-migration-tool

1. Connecting to Microsoft Azure from your command line:
      a. Open a command line in windows or from bash
      b. run #az login --use-device-code
            This command will return instructions as follows: To sign in, use a web browser to open the page and enter the code <madeupcode> to authenticate.
      c. open in a browser and paste the code given by the command line. At this time you will need to log in with the user email address that has contributor permissions in the subscription that holds your AMS account. Once logged in the browser, come back to the command line and find the subscriptions you have access to.
      d. Now in the command line set the subscription that holds your AMS account as follows: #az account set --subscription <yoursubscriptionid>
            You can find the subscriptionid for the above step from the Azure Portal, being on the overview section of your AMS account: 
        an empty output is expected from running the command 

2. set your MK.IO JWT token that will be used to connect with MK.IO in your command line:
    a. To do so, first open a web browser and log into (sign in with Microsoft SSO), click on Sign in on the top right.
     b. Once you are logged in, open a second tab on the same browser and open this link in the new tab:
     c. This should provide you with your user_id and token. Note that this token is valid for 1 year.
     d. copy the value of that token (without the " " ) and bring it to your command line and run this: # set MKIO_TOKEN=<PASTEHEREYOURTOKEN> (set will work on windows command line, if you are using other tool like mobaexterm use export MKIO_TOKEN=<PASTEYOURTOKEN>
     e. finally confirm the token has been loaded running this: # echo %MKIO_TOKEN%, you should see the MK.IO token to be used.

3. Running the tool
      a. after having downloaded the tool from GitHub - mediakind-video/ams-migration-tool (click on the green button and download as a zip).
      b. extract the contents into a folder and navigate to this folder from the command line you run the steps above:
    c. now you can build up your command to run based on this:

go run main.go --azure-subscription 2a23445a-1234c-4239-adae-f4234685afaa1 --azure-resource-group corytv --azure-account-name corytvams --mediakind-subscription mediakind-eastus --export --import --assets --streaming-locators --asset-filters --content-key-policies --streaming-endpoints

            --azure-subscription, subscription ID we connected to in step 1 above 
            -- azure-resource-group, you can see this when in the overview window of the AMS account:
            --azure-account-name, this is the AMS account name, in the above screenshot is corytvams
            --mediakind-subscription, you can find this name when logged in MK.IO on the top right corner:
            --export, to export from AMS (you can choose to do this step only and dont do the --import into MK.IO just yet or do it all together as we are doing in this example)
            --import, in conjuction with --export it will import what was just exported from AMS in the same command (you can choose to import an specific json exported previously if you like)
            --assets, --streaming-locators, --asset-filters --content-key-policies -- streaming-endpoints, are the entities from AMS we will export from AMS and import into MK.IO.

 We have seen exporting from AMS around 4500 assets per minute. 
 MK.IO accepts 1000 assets import per minute (same rule applies for locators, or other entities).
 While the tool is running, you can see progress importing into MK.IO looking into the Dashboard where you can see the number of assets increasing, then once assets are finished we continue with content key policies or streaming policies as they are required for locators and we finish with locators and streaming endpoints.

    • Related Articles

    • How to use DRM to playback MK.IO assets encrypted

      Intro Currently, MK.IO solution supports only MediaKind's DRM solution as the unique provider of DRM encryption keys. External 3PP Key Management System solutions will be considered. In MK.IO there are the following groups of encryptions: 1. ...
    • Comparison list between AMS vs MK/IO for container, video codec and audio codec

      Please find the comparison list between AMS vs MK/IO for the supported container, video codec and audio codec: Type AMS Availablie in MK.IO Container FLV (with H.264 and AAC codecs) (.flv) Yes Container MXF (.mxf) Yes Container GXF (.gxf) No ...
    • How to use MK.IO APIs - step by step

      This article will describe the step by step on how to use MK.IO APIs documented here: As you already know, you can use APIs to automate the process of different tasks, in MK.IO world they can be used to ...
    • MediaKind's Support Tool Transition FAQ

      MediaKind is partnering with SymphonyAI! We're excited to announce an upcoming update to our customer support ticketing system! In our continuous effort to enhance your support experience, we will be transitioning to a new support ticketing system ...
    • How to find MK.IO Customer ID and Subscription ID

      This article will describe the step by step on how to find the Customer ID and Subscription ID Below are the instructions to find the customer id: Login to the MK.IO portal Choose your subscription. Once logged, open another tab in ...