Media Samples

sample

Represents a video, audio or subtitle media sample. Media samples support the following properties:

Property

Type

Description

duration

integer

Sample duration expressed in media timescale ticks.

data

object

References the sample data.

properties

object

Sample specific properties.

metadata

array

Lists each type of metadata attached to the sample.

analysis

array

Lists each type of analysis performed on the sample.

The following properties are specific to video samples:

Property

Type

Description

type

enum

Indicates whether the picture represents an I, P or B frame.

structure

enum

Indicates whether the picture is frame or a field (upper, lower, top or bottom).

offset

integer

Composition offset expressed in media timescale ticks.

{
  "audio": [
    {
      "format": "sowt",
      "sample_rate": {
        "numerator": 48000,
        "denominator": 1
      },
      "duration": 6471336,
      "bit_rate": 1536000,
      "language": "eng",
      "channels": 2,
      "label": [
        "L",
        "R"
      ],
      "bits_per_sample": 16,
      "properties": {
        "Mpeg2TransportStreamPid": 102,
        "PrimingSamples": 240
      },
      "extension": [
        {
          "type": "mp2l",
          "language": [
            {
              "language_code": "eng",
              "audio_type": 0
            }
          ],
          "$annotation": {
            "type": "MPEG-2 Language Descriptor (ISO 13818-1)"
          }
        }
      ],
      "sample": [
        {
          "duration": 4800,
          "data": {
            "type": "byte",
            "length": 19200
          },
          "analysis": [
            {
              "type": "loud",
              "momentary_loudness": -18.147150,
              "short_term_loudness": -21.153015,
              "ungated_loudness": -24.851980,
              "level_gated_loudness": -22.105360,
              "speech_gated_loudness": -24.799536,
              "speech_percentage": 93.170006,
              "loudness_range": 6.500000,
              "sample_peak": -9.692958,
              "true_peak": -9.668571,
              "$annotation": {
                "type": "EBU R 128 Audio Loudness"
              }
            }
          ]
        }
      ],
      "$annotation": {
        "format": "PCM, 16-Bit Little-Endian Signed Integer",
        "sample_rate": "48.0 kHz",
        "duration": "134.820 seconds",
        "bit_rate": "1.536 Mbit/s"
      }
    }
  ]
}

data

References data within a media container. The data reference describes the location of the data and the method used to retrieve the data.

Property

Type

Description

type

string

Four character code that identifies the type of data reference.

length

integer

Data length in bytes.

position

integer

Data position within the container.

metadata

Represents a specific type of metadata attached to a media sample.

Property

Type

Description

type

string

Four character code that identifies the metadata.

data

object

References the sample metadata.

analysis

Represents a specific type of analysis performed on a media sample.

Property

Type

Description

type

string

Four character code that identifies the analysis results.


Did this page help you?