Video Analyzer ウィジェットと API を使用する

完了

Azure Video Indexer ポータルですべての動画分析タスクを実行できますが、サービスをカスタム アプリケーションに組み込むこともできます。 これを実現するには 2 つの方法があります。

Azure Video Indexer のウィジェット

Azure Video Indexer ポータルで動画を再生、分析、編集するために使用されるウィジェットは、独自のカスタム HTML インターフェイスに埋め込むことができます。 この手法を使用すると、Azure Video Indexer ポータルで自分のアカウントへのフル アクセスを許可しなくても、特定の動画の分析情報を他のユーザーと共有できます。

Video Analyzer widgets in a custom web page

Azure Video Indexer API

Azure Video Indexer は、アクセス トークンなど、アカウントに関する情報を取得するために使用できる REST API を提供します。

https://api.videoindexer.ai/Auth/<location>/Accounts/<accountId>/AccessToken

そして、トークンを使用して REST API を使用し、ビデオ インデックスの作成タスク、プロジェクトの作成、分析情報の取得、カスタム モデルの作成または削除を自動化できます。

たとえば、https://api.videoindexer.ai/<location>/Accounts/<accountId>/Customization/CustomLogos/Logos/<logoId>?<accessToken> REST エンドポイントへの GET 呼び出しは、指定されたロゴを返します。 別の例として、次の JSON の例のように、アカウント内のビデオの詳細を返す GET 要求を https://api.videoindexer.ai/<location>/Accounts/<accountId>/Videos?<accessToken> に送信できます。

{
    "accountId": "SampleAccountId",
    "id": "30e66ec1b1",
    "partition": null,
    "externalId": null,
    "metadata": null,
    "name": "test3",
    "description": null,
    "created": "2018-04-25T16=50=00.967+00=00",
    "lastModified": "2018-04-25T16=58=13.409+00=00",
    "lastIndexed": "2018-04-25T16=50=12.991+00=00",
    "privacyMode": "Private",
    "userName": "SampleUserName",
    "isOwned": true,
    "isBase": true,
    "state": "Processing",
    "processingProgress": "",
    "durationInSeconds": 13,
    "thumbnailVideoId": "30e66ec1b1",
    "thumbnailId": "55848b7b-8be7-4285-893e-cdc366e09133",
    "social": {
        "likedByUser": false,
        "likes": 0,
        "views": 0
    },
    "searchMatches": [],
    "indexingPreset": "Default",
    "streamingPreset": "Default",
    "sourceLanguage": "en-US"
}

ARM テンプレートを使用してデプロイする

Azure Resource Manager (ARM) テンプレートは、テンプレート ファイル内で指定したパラメーターに基づいて、サブスクリプションに Azure AI Video Indexer リソースを作成するために使用できます。

利用可能な API の完全な一覧については、Video Indexer 開発者ポータルを確認してください。