Media attributes

Media attributes are calculated by Labelbox for data rows when they are first imported to the platform. If the data are not accessible when they are first created, the calculation will not be performed.

Parameter

Asset type

Description

mimeType

Video
Image
Text
Tiled imagery

Media type. Will be one of the following:

  • video/mp4

  • image/jpeg

  • text/plain

  • application/x-tms-geo (tiled imagery: EPSG3857)

  • application/x-tms-simple (tiled imagery: Simple)

  • application/json (other)

width

Video
Image

Image or frame width in pixels.

height

Video
Image

Image or frame height in pixels.

codec

Video

Indicates the video compression standard.

duration

Video

Duration of the video in seconds.

frameRate

Video

Frame rate per second.

frameCount

Video

Number of frames in the video.

datarow = client.get_data_row(data_row.uid)
print(datarow.media_attributes)
{
  "data": {
    "dataRow": {
      "mediaAttributes": {
        "width": 3872,
        "height": 2592,
        "mimeType": "image/jpeg"
      }
   }
}
{
  "data": {
    "dataRow": {
      "mediaAttributes": {
        "codec": "avc1",
        "width": 1920,
        "height": 1080,
        "duration": 10,
        "mimeType": "video/mp4",
        "frameRate": 10,
        "frameCount": 100
      }
   }
}
{
  "data": {
    "dataRow": {
      "mediaAttributes": {
        "mimeType": "text/plain"
      }
   }
}
{
  "data": {
    "dataRow": {
      "mediaAttributes": {
        "mimeType": "application/x-tms-geo"
      }
   }
}

Did this page help you?