建立連線到 Azure 的影片索引器帳戶Create a Video Indexer account connected to Azure

建立影片索引器帳戶時,您可以選擇免費試用帳戶 (您可取得特定的免費編製索引分鐘數) 或付費選項 (您不會受限於配額)。When creating a Video Indexer account, you can choose a free trial account (where you get a certain number of free indexing minutes) or a paid option (where you're not limited by the quota). 使用免費試用時,影片索引器最多可為網站使用者提供 600 分鐘的免費編製索引,以及為 API 使用者提供 2400 分鐘的免費索引編製。With a free trial, Video Indexer provides up to 600 minutes of free indexing to website users and up to 2400 minutes of free indexing to API users. 使用付費選項時,您會建立連接到您的 Azure 訂用帳戶的影片索引子帳戶,以及 Azure 媒體服務帳戶。With the paid option, you create a Video Indexer account that's connected to your Azure subscription and an Azure Media Services account. 您需支付已編制索引的分鐘數,以及媒體帳戶相關費用。You pay for minutes indexed as well as the media account related charges.

本文將說明如何建立連結到您 Azure 訂用帳戶和 Azure 媒體服務帳戶的影片索引器帳戶。This article shows how to create a Video Indexer account that's linked to an Azure subscription and an Azure Media Services account. 本主題提供使用自動 (預設) 流程連線到 Azure 的步驟。The topic provides steps for connecting to Azure using the automatic (default) flow. 也會示範如何手動連線到 Azure (進階)。It also shows how to connect to Azure manually (advanced).

如果您要從試用版移至付費影片索引子帳戶,您可以選擇將所有影片和模型自訂複製到新的帳戶,如從試用帳戶匯入您的內容一節中所述。If you are moving from a trial to paid Video Indexer account, you can choose to copy all of the videos and model customization to the new account, as discussed in the Import your content from the trial account section.

必要條件Prerequisites

  • Azure 訂用帳戶。An Azure subscription.

    如果您還沒有 Azure 訂用帳戶,請先註冊 Azure 免費試用版If you don't have an Azure subscription yet, sign up for Azure Free Trial.

  • Azure Active Directory (Azure AD)網域。An Azure Active Directory (Azure AD) domain.

    如果您沒有 Azure AD 網域,請使用您的 Azure 訂用帳戶建立此網域。If you don't have an Azure AD domain, create this domain with your Azure subscription. 如需詳細資訊,請參閱管理您 Azure AD 中的自訂功能變數名稱For more information, see Managing custom domain names in your Azure AD

  • Azure AD 網域中具有應用程式系統管理員角色的使用者。A user in your Azure AD domain with an Application administrator role. 當您將影片索引器帳戶連線到 Azure 時,會用到此成員。You'll use this member when connecting your Video Indexer account to Azure.

    此使用者應該是具有工作或學校帳戶的 Azure AD 使用者。This user should be an Azure AD user with a work or school account. 請勿使用個人帳戶,例如 outlook.com、live.com 或 hotmail.com。Don't use a personal account, such as outlook.com, live.com, or hotmail.com.

    所有 AAD 使用者

自動流程的其他先決條件Additional prerequisites for automatic flow

  • Azure AD 網域的使用者和成員。A user and member in your Azure AD domain.

    當您將影片索引器帳戶連線到 Azure 時,會用到此成員。You'll use this member when connecting your Video Indexer account to Azure.

    此使用者應該是Azure 訂用帳戶中具有「擁有者」**** 角色或同時有「參與者」**** 和「使用者存取系統管理員」**** 角色的成員。This user should be a member in your Azure subscription with either an Owner role, or both Contributor and User Access Administrator roles. 使用者可以使用兩個角色新增兩次。A user can be added twice, with two roles. 一次使用「參與者」角色,另一次使用「使用者存取系統管理員」角色。Once with Contributor and once with user Access Administrator.

    存取控制

手動流程的其他先決條件Additional prerequisites for manual flow

  • 使用 Azure 入口網站註冊 EventGrid 資源提供者。Register the EventGrid resource provider using the Azure portal.

    Azure 入口網站中,前往 [訂用帳戶]**** -> [subscription] -> [ResourceProviders]****。In the Azure portal, go to Subscriptions->[subscription]->ResourceProviders.

    搜尋 Microsoft.MediaMicrosoft.EventGridSearch for Microsoft.Media and Microsoft.EventGrid. 如果不是處於「已註冊」狀態,請按一下 [註冊]****。If not in the "Registered" state, click Register. 這需要幾分鐘來完成註冊。It takes a couple of minutes to register.

    EventGrid

連線到 AzureConnect to Azure

注意

如果您的 Azure 訂用帳戶使用以憑證為基礎的多重要素驗證,請務必在已安裝必要憑證的裝置上執行下列步驟。If your Azure subscription uses certificate-based multi-factor authentication, it's crucial that you perform the following steps on a device that has the required certificates installed.

  1. 瀏覽至影片索引子網站並登入。Browse to the Video Indexer website and sign in.

  2. 選取 [建立新帳戶] 按鈕:Select the Create new account button:

    建立新的影片索引子帳戶

  3. 當訂用帳戶清單出現時,選取您想要使用的訂用帳戶。When the subscriptions list appears, select the subscription you want to use.

    將影片索引子連接到 Azure

  4. 從支援的位置選取 Azure 區域:美國西部 2、北歐或東亞。Select an Azure region from the supported locations: West US 2, North Europe, or East Asia.

  5. 在 [Azure 媒體服務帳戶]**** 下,選擇其中一個選項:Under Azure Media Services account, choose one of these options:

    • 若要建立新的媒體服務帳戶,請選取 [建立新的資源群組]****。To create a new Media Services account, select Create new resource group. 提供資源群組的名稱。Provide a name for your resource group.

      Azure 會在您的訂用帳戶中建立新帳戶,包括新的 Azure 儲存體帳戶。Azure will create your new account in your subscription, including a new Azure Storage account. 新的媒體服務帳戶具有具有串流端點和10個 S3 保留單元的預設初始設定。Your new Media Services account has a default initial configuration with a streaming endpoint and 10 S3 reserved units.

    • 若要使用現有的媒體服務帳戶,請選取 [使用現有資源]****。To use an existing Media Services account, select Use existing resource. 從帳戶清單中,選取您的帳戶。From the accounts list, select your account.

      媒體服務帳戶具有的區域必須與您的影片索引器帳戶相同。Your Media Services account must have the same region as your Video Indexer account.

      注意

      若要將索引編制持續時間和低輸送量降到最低,強烈建議將您媒體服務帳戶中的保留單元類型和數目調整為10 個 S3 保留單元To minimize indexing duration and low throughput, it's highly recommended to adjust the type and number of Reserved Units in your Media Services account to 10 S3 Reserved Units. 請參閱使用入口網站來變更保留單元See Use portal to change reserved units.

    • 若要手動設定您的連線,請選取 [切換為手動設定] 連結。To manually configure your connection, select the Switch to manual configuration link.

      如需詳細資訊,請參閱後續的手動連線到 Azure (進階選項) 一節。For detailed information, see the Connect to Azure manually (advanced option) section that follows.

  6. 完成之後,請選擇 [連線]****。When you're done, choose Connect. 完成此作業可能需要幾分鐘的時間。This operation might take up to a few minutes.

    連線至 Azure 之後,新的影片索引器帳戶會出現在帳戶清單中:After you're connected to Azure, your new Video Indexer account appears in the account list:

    新帳戶

  7. 流覽至您的新帳戶。Browse to your new account.

手動連線到 Azure (進階選項)Connect to Azure manually (advanced option)

如果連線到 Azure 失敗,您可嘗試手動連線來排解疑難問題。If the connection to Azure failed, you can attempt to troubleshoot the problem by connecting manually.

注意

強烈建議您在相同區域中有下列三個帳戶:您使用媒體服務帳戶連線的影片索引子帳戶,以及連接到相同媒體服務帳戶的 Azure 儲存體帳戶。It's highly recommended to have the following three accounts in the same region: the Video Indexer account that you're connecting with the Media Services account, as well as the Azure storage account connected to the same Media Services account.

建立及設定媒體服務帳戶Create and configure a Media Services account

  1. 使用 Azure 入口網站來建立 Azure 媒體服務帳戶,如建立帳戶所示。Use the Azure portal to create an Azure Media Services account, as described in Create an account.

    為您的媒體服務帳戶建立儲存體帳戶時,請針對 [帳戶種類] 選取 [ StorageV2 ],並針對 [複寫欄位] 選擇 [異地冗余(GRS) ]。When creating a storage account for your Media Services account, select StorageV2 for account kind and Geo-redundant (GRS) for replication fields.

    新的 AMS 帳戶

    注意

    請務必記下媒體服務資源和帳戶名稱。Make sure to write down the Media Services resource and account names. 在下一節中,您將需要這些步驟。You'll need them for the steps in the next section.

  2. 在您建立的媒體服務帳戶中,將保留單元的類型和數目調整為10 個 S3 保留單元Adjust the type and number of reserved units to 10 S3 Reserved Units in the Media Services account you created. 請參閱使用入口網站來變更保留單元See Use portal to change reserved units.

  3. 您必須先啟動新媒體服務帳戶的預設串流端點,才可以在影片索引子 web 應用程式中播放影片。Before you can play your videos in the Video Indexer web app, you must start the default Streaming Endpoint of the new Media Services account.

    在新的媒體服務帳戶中,選取 [串流端點]。In the new Media Services account, select Streaming endpoints. 然後選取串流端點,然後按 [啟動]。Then select the streaming endpoint and press start.

    新的 AMS 帳戶

  4. 若要使用媒體服務 API 來驗證影片索引子,必須建立 AD 應用程式。For Video Indexer to authenticate with Media Services API, an AD app needs to be created. 下列步驟會引導您完成利用 Azure 入口網站開始使用 Azure AD 驗證中所述的 Azure AD 驗證程序:The following steps guide you through the Azure AD authentication process described in Get started with Azure AD authentication by using the Azure portal:

    1. 在新的媒體服務帳戶中,選取 [API 存取]****。In the new Media Services account, select API access.

    2. 選取服務主體驗證方法Select Service principal authentication method.

    3. 取得用戶端識別碼和用戶端祕密Get the client ID and client secret

      在您選取 [設定] [ -> 金鑰] 之後,請新增 [描述],然後按 [儲存] 並填入金鑰值。After you select Settings->Keys, add Description, press Save, and the key value gets populated.

      如果金鑰過期,帳戶擁有者就必須聯絡影片索引子支援以更新金鑰。If the key expires, the account owner will have to contact Video Indexer support to renew the key.

      注意

      請務必記下金鑰值和應用程式識別碼。Make sure to write down the key value and the Application ID. 您在下一節的步驟中需要用到它。You'll need it for the steps in the next section.

手動連線Connect manually

Video Indexer 頁面的 [將 Video Indexer 連線到 Azure 訂用帳戶]**** 對話方塊中,選取 [切換為手動設定]**** 連結。In the Connect Video Indexer to an Azure subscription dialog of your Video Indexer page, select the Switch to manual configuration link.

在對話方塊中,提供下列資訊︰In the dialog, provide the following information:

設定Setting 說明Description
影片索引器帳戶區域Video Indexer account region 影片索引器帳戶區域的名稱。The name of the Video Indexer account region. 為了獲得更好的效能和較低的成本,強烈建議您指定 Azure 媒體服務資源和 Azure 儲存體帳戶所在區域的名稱。For better performance and lower costs, it's highly recommended to specify the name of the region where the Azure Media Services resource and Azure Storage account are located.
Azure AD 租用戶Azure AD tenant Azure AD 租用戶的名稱,例如 "contoso.onmicrosoft.com"。The name of the Azure AD tenant, for example "contoso.onmicrosoft.com". 租用戶資訊可從 Azure 入口網站擷取。The tenant information can be retrieved from the Azure portal. 將游標放在右上角登入的使用者名稱上方。Place your cursor over the name of the signed-in user in the top-right corner. 尋找網域右邊的名稱。Find the name to the right of Domain.
訂用帳戶識別碼Subscription ID 用來建立此連線的 Azure 訂用帳戶。The Azure subscription under which this connection should be created. 訂用帳戶識別碼可從 Azure 入口網站擷取。The subscription ID can be retrieved from the Azure portal. 選取左面板中的 [所有服務],然後搜尋 [訂用帳戶]。Select All services in the left panel, and search for "subscriptions". 選取 [訂用帳戶]****,並從訂用帳戶清單中選擇需要的識別碼。Select Subscriptions and choose the desired ID from the list of your subscriptions.
Azure 媒體服務資源群組名稱Azure Media Services resource group name 您在其中建立媒體服務帳戶的資源群組名稱。The name for the resource group in which you created the Media Services account.
媒體服務資源名稱Media service resource name 您在上一節中建立的 Azure 媒體服務帳戶名稱。The name of the Azure Media Services account that you created in the previous section.
應用程式識別碼Application ID 您在上一節中建立的 Azure AD 應用程式識別碼 (具有所指定媒體服務帳戶的權限)。The Azure AD application ID (with permissions for the specified Media Services account) that you created in the previous section.
應用程式金鑰Application key 您在上一節中建立的 Azure AD 應用程式金鑰。The Azure AD application key that you created in the previous section.

試用帳戶匯入您的內容Import your content from the trial account

建立新帳戶時,您可以選擇將您的內容從試用帳戶匯入到新帳戶。When creating a new account, you have an option to import your content from the trial account into the new account. 如果您核取 [在Azure 訂用帳戶上建立新帳戶] 對話方塊中的 [匯] 選項,將會從試用帳戶將所有媒體和內容模型自訂複製到新帳戶。If you check the import option in the Create a new account on an Azure subscription dialog, all media and content model customizations will be copied from the trial account into the new account.

匯入內容的功能對上述的自動化和手動方法有效。The ability to import the content is valid for both automated and manual approaches described above.

注意

內容只能從每個帳戶匯入一次。The content can only be imported once from each account.

考量Considerations

以下是 Azure 媒體服務的相關考量:The following Azure Media Services related considerations apply:

  • 如果您自動連線,您會在 Azure 訂用帳戶中看到新的資源群組、媒體服務帳戶和儲存體帳戶。If you connect automatically, you see a new Resource Group, Media Services account, and a Storage account in your Azure subscription.

  • 如果您自動連線,Video Indexer 會將媒體保留單元設為 10 個 S3 單元:If you connect automatically, Video Indexer sets the media Reserved Units to 10 S3 units:

    媒體服務保留單元

  • 如果您連接到現有的媒體服務帳戶,影片索引子不會變更現有的媒體保留單元設定。If you connect to an existing Media Services account, Video Indexer doesn't change the existing media Reserved Units configuration.

    您可能需要根據所規劃的負載,調整媒體保留單元的類型和數目。You might need to adjust the type and number of Media Reserved Units according to your planned load. 請記住,如果您的負載很高,卻沒有足夠的單元或速度,則影片處理會導致逾時錯誤。Keep in mind that if your load is high and you don't have enough units or speed, videos processing can result in timeout failures.

  • 如果您連線到新的媒體服務帳戶,Video Indexer 會自動啟動其中的預設串流端點If you connect to a new Media Services account, Video Indexer automatically starts the default Streaming Endpoint in it:

    媒體服務串流端點

    串流端點的啟動時間很長。Streaming endpoints have a considerable startup time. 因此,您可能需要幾分鐘的時間,從您將帳戶連線至 Azure,直到您的影片可以在影片索引子 web 應用程式中進行串流和監看為止。Therefore, it may take several minutes from the time you connected your account to Azure until your videos can be streamed and watched in the Video Indexer web app.

  • 如果您連接到現有的媒體服務帳戶,影片索引子不會變更預設的串流端點設定。If you connect to an existing Media Services account, Video Indexer doesn't change the default Streaming Endpoint configuration. 如果沒有執行中的串流端點,您就無法在此媒體服務帳戶或影片索引子中觀看影片。If there's no running Streaming Endpoint, you can't watch videos from this Media Services account or in Video Indexer.

後續步驟Next steps

您可以遵循:使用 api中的指示,以程式設計方式與您的試用帳戶和/或已連線到 Azure 的影片索引子帳戶進行互動。You can programmatically interact with your trial account and/or with your Video Indexer accounts that are connected to Azure by following the instructions in: Use APIs.

您應使用連線至 Azure 時使用的相同 Azure AD 使用者。You should use the same Azure AD user you used when connecting to Azure.