Use textual summarization

This article shows you how to use textual summarization with Azure AI Video Indexer. This example uses Azure OpenAI deployments.

Note

This feature only works with a standard account. Create a standard account.

Prerequisites

  • Review the overview of texual summarization.

  • An Azure OpenAI gpt-35-turbo or gpt-4 deployment.

  • Content filters at or above Medium set on the deployment. For more information about to use content filters, see Content filtering.

    Important

    For summaries, including text based summaries and keyframes, it is mandatory that content filters you set “Violence”, “Hate”, “Sexual” and “Self-harm” to at least Medium level (which means everything with harmfulness of at least medium level is blocked. You can set it to be even more strict if you want) and save the content filter.

    For summaries based on keyframes it is also mandatory that you create a jailbreak filter.

    To benefit from keyframes based summaries you must select an Azure Open AI model that accepts visual input.

  • An Azure AI Video Indexer account connected to an Azure OpenAI account.

  • Access granted to Azure OpenAI in the desired Azure subscription. Currently, access to this service is granted only by application. You can apply for access to Azure OpenAI by completing the form.

  • A video uploaded to your Azure AI Video Indexer library.

Note

Azure AI Video Indexer is unable to connect to fine-tuned models.

Open web pages in your browser

It's easier to follow these instructions if you already have the needed web pages open. Copy and paste the following parameters to your favorite text editor. Here's a list to get you started:

  • VI account ID:
  • video file ID:
  • deployment name:
  • access token:
  1. Open the Azure portal in one tab or window, and sign in.
    1. Navigate to the Azure AI Video Indexer account page for the account ID.
    2. Navigate to the Azure OpenAI account page
      1. From the menu, select Model deployments, then select Manage deployments. The Azure OpenAI Studio opens. Copy the Deployment Name you want to use.
  2. Open the Azure AI Video Indexer web portal in another tab or window and sign in.
    1. Navigate to the library page, choose a video, then right-click on it for the video file ID.
  3. Open the Azure AI Video Indexer API in another tab or window and sign in.

Generate a text summary

You can use the Azure AI Video Indexer web portal to summarize text.

  1. If you don't have the web portal open already, open the Azure AI Video Indexer web portal.
  2. Upload a file and wait for it to index.
  3. Select the video to navigate to the media page.
  4. Select Generate summary. The textual summary is generated.

Note

If you aren't seeing the Generate summary button, you may be using a trial account. Create a standard account to use this feature.

Summary customizations

Once the summary is generated, you can make adjustments to it by customizing the summary style or changing the model deployment.

Customize summary style

You can also customize the summary by selecting the Customize summary icon. You can choose from Short, **Medium, or Long summary lengths, and you can choose Neutral, Casual, or Formal as a summary style. Once you make your choices, select Generate again.

Change model deployment

  1. Select the Customize summary icon.
  2. Select the model deployment you want to use from the Model deployment dropdown list.
  3. Select Generate again.

Note

Remember that the model deployment is a combination of the model and the filters. Additionally, every time you customize the text summary it represents an API PUT request.

Troubleshooting

Before looking for specific solutions, be sure that you created the resources in the Prerequisites section of the document.

Generate summary doesn't appear

You might not have connected your Azure OpenAI account to the Azure AI Video Indexer account correctly.

Couldn't generate summary

  • You need to add content filters to the deployment to avoid showing harmful content. Go back to the Azure OpenAI studio and add filters to your deployment.
  • You might have created a permissive content filter for content that has sensitive or harmful content. The content filter needs to be at least Medium. If you set the content filter to Medium AND harmful content remains in the video, the filter is triggered. In this case, there's no solution.
  • You might not have asked for a transcript or there might not be enough information generated during the indexing process.
  • You might be using an advanced preset.
  • The video might not have enough audio in it to create a transform.

Unable to use a model deployment or deployment missing

  • You might not have created a deployment.
  • Someone might have changed or deleted the deployed model.

Throttling

There might be too many requests being sent to VI. Wait for a few minutes and try again.

You receive the error "filter not found"

If you get a filter not found error, you'll get a detailed error describing what is missing. The error looks similar to this, but might have details about other missing things:

ErrorType":"SUMMARY_FILTERS_NOT_FOUND","Message":"Couldn't generate a summary because the model needs to be set with the right content filters to avoid showing harmful content. Input filter 'Jailbreak' must be enabled with action set to 'Annotate and block'. Trace id: '00000000-0000-0000-0000-000000000000'.

Note

The jailbreak filter is only required when using a keyframes based summary or a regular summary, as of November 1st, 2024.

To resolve the jailbreak issue:

  1. Select Go to Azure Open AI studio.
  2. Select Deployments.
  3. Select the deployment you're working with.
  4. Select Edit.
  5. Configure the filters to have at least Medium level for each category.
  6. Apply prompt shields for jailbreak attacks.
  7. Select Create filter.

Other considerations

It's recommended to create the Azure AI Video Indexer and Azure OpenAI accounts in the same region or you might experience performance issues.