In a previous article, I showed you how to upload an asset to an Azure Media Services (AMS) account. In this article, you will learn how to use Azure Media Services to analyze a video.
Navigate to the Azure Portal and to your Azure Media Services account, as shown in Fig. 1.
Then, select "Assets" from the left menu to open the "Assets" blade, as shown in Fig. 2.
Select the Input Asset you uploaded to display the Asset details page, as shown in Fig. 3.
Click the [Add job] button (Fig. 4) to display the "Create a job" dialog, as shown in Fig. 5.
At the "Transform" field, select the "Create new" radio button.
At the "Transform name" textbox, enter a name to help you identify this Transform.
At the "Description" field, you may optionally enter some text to describe what this transform will do.
At the "Transform type" field, select the "Video and audio analyzer" radio button.
At the "Analysis type" field, select the "Video and audio" radio button.
The "Automatic language detection" section allows you to either specify the audio language or allow AMS to figure this out. If you know the language, select the "No" radio button and select the language from the dropdown list. If you are unsure of the language, select the "Yes" radio button to allow AMS to infer it.
The "Configure Output" section allows you to specify where the generated output assets will be stored.
At the "Output asset name" field, enter a descriptive name for the output asset. AMS will suggest a name, but I prefer the name of the Input Asset, followed by "_Analysis" or something more descriptive.
At the "Asset storage account" dropdown, select the Azure Storage Account in which to save a container and the blob files associated with the output asset.
At the job name, enter a descriptive name for this job. A descriptive name is helpful if you have many jobs running and want to identify this one.
At the "Job priority" dropdown, select the priority in which this job should run. The options are "High", "Low", and "Normal". I generally leave this as "Normal" unless I have a reason to change it. A High priority job will run before a Normal priority job, which will run before a Low priority job.
Click the [Create] button to create the job and queue it to be run.
You can check the status of the job by selecting "Transforms + jobs" from the left menu to open the "Transforms + jobs" blade (Fig. 6) and expanding the job you just created (FIg. 7).
The state column tells you whether the job is queued, running, or finished.
Click the name of the job to display details about the job, as shown in Fig. 8.
After the job finishes, when you return to the "Assets" blade, you will see the new output Asset listed, as shown in Fig. 9.
Click on the link in the "Storage link" column to view the files in Blob storage, as shown in Fig. 10.
AMS Analytics produces the following text files:
File Name | Contents |
---|---|
annotations.json | A set of tags identifying objects and actions at various poinst throughout the video |
contentmoderation.json | Information at time points throughout the video, indicating if the video contains racy and/or adult content and should be reviewed. |
emotions.json | An analysis of emotions displayed on the faces in the video |
faces.json | Details of each face detected in the video at various time points |
insights.json | A file containing information on faces, OCR, and transcriptions at time points throughout the video |
lid.json | Spoken languages detected at various time points throughout the video |
metadata.json | Data about the video and audio tracks, such as format and size |
ocr.json | The text of any words displayed on screen |
rollingcredits.json | Information about rolling credits displayed, if any |
transcript.ttml | A transcription of any spoken text in the video, in Timed Text Markup Language (TTML) format |
transcript.vtt | A transcription of any spoken text in the video, in WebVTT format |
In addition, you will find thumbnail images taken from the video as JPG files or as a ZIP file containing multiple JPG files.
In this article, you learned how to use Azure Media Services to analyze an Audio / Video file