New Dolby has launched a new integration with Box to provide access to automated audio enhancement Learn More
developer
media
Analyze and Learn More About Media
Jayson DeLancey

We’ve been speaking with a number of people about how they work with media. These folks have ranged in skill from beginner to advanced but share a common appreciation for good audio. The beginner may still be trying to get their head around what type of media formats they have. The more advanced may be trying to solve a very specific audio workflow problem that is tedious or difficult to pinpoint.

It is with these range of users and use cases in mind that the Media Analyze API exists.

What Does It Do?

The Analyze API accepts a media input file and tells you something you didn’t know about it. For example, sign up for a Dolby.io developer account to get your API Key and you can run something like this:

curl -X POST https://api.dolby.com/media/analyze \
  --header "x-api-key: $DOLBY_API_KEY" \
  --data '{
     "input": "https://archive.org/download/OrsonWellesMrBruns/381030_64kb.mp3"
  }'

You’ll get a response back with a job_id:

{"job_id":"b6ab4237-9109-4acb-82f4-5545ca8cd6fd"}

This is an asynchronous task meaning your audio is being analyzed in the cloud. When it’s ready, we’ll be able to pick up the results. You do that by passing the same job id back to the API.

curl -X GET https://api.dolby.com/media/analyze?job_id=$YOUR_JOB_ID \
  --header "x-api-key: $DOLBY_API_KEY"

We’ll get a JSON response to take a look at. What have we learned?

Check Basic Media Info

This section includes details about the container such as duration, kind, and size. Insight into the audio structure like bitrate, channels, codec, and sample rate. There are many tools that do this, but with the Analyze API you have a powerful option for mobile applications or platform integrations.

You get back a JSON response with audio and container attributes defined like the following:

    "media_info": {
      "audio": {
        "bitrate": 256001,
        "channel_order": "L R",
        "channels": 2,
        "codec": "aac",
        "duration": 97.685,
        "sample_rate": 48000
      },
      "container": {
        "bitrate": 1651700,
        "duration": 97.685,
        "kind": "mp4",
        "size": 20168287
      }
...

Review Loudness Profile

To deliver content that conforms with broadcasting standards like A/85 and R.128 you may need to do some analysis on your media or user-generated content. If you are delivering to popular media platforms like Amazon, Apple, SoundCloud, Spotify, Vimeo, and Youtube you can prepare your content for the best results and get a straightforward pass/fail validation test.

If you want to know if you audio is within range, the JSON response like this may be useful:

      "loudness": {
        "gating_mode": "speech",
        "measured": -20.55,
        "range": 5.85,
        "sample_peak": 0,
        "true_peak": 0.01
      }

Identify Noise or Silence

To understand how easy it is to listen to your content, it can be useful to understand the level of noise present. If you are mixing content from many sources it can be important to understand if there is silence as lead-in or at the end of a recording, or periodically placed markers throughout.

If there is a lot of silence you may need to make some audio cuts or run noise suppression if there is a lot of static background noise:

      "noise": {
        "level_average": -64.72,
        "snr_average": 41.99
      },
      "silence": {
        "end": 0,
        "num_sections": 0,
        "start": 0.02,
        "total": 0
      }

Is this API for You?

We certainly hope so and if there is more data you are looking to learn about your media let us know. Our Analyze API tells you much more about your audio than just the metadata.

If you are ready to include analysis as part of your quality control process in a media workflow, a gating step for user generated content, or to help search across an archive of media this API can help.

Pick your favorite client language and library and get started with the Analyze Media Quick Start guide which will walk you through the steps.

Tags: analyze
RELATED POSTS
DEVELOPER
INTERACTIVITY
How-to Livestream a Dolby.io Conference on YouTube

To reach more users, you can live stream a video conference with Dolby.io over RTMP to YouTube.

Fabien Lavocat
|
rtmp
INTERACTIVITY
MEDIA
PRODUCT
Dolby.io at SXSW

Get the latest scoop on what the Dolby.io team was up to at SXSW 2021.

Jessica Zhu
|
events
DEVELOPER
MEDIA
Recording Audio on Android with Examples

How-to get started recording audio on Android with the most common libraries compared.

Megan Ren
|
android
We're happy to chat about our APIs, SDKs...or magic.