Overview of Labelbox computed media attributes.
Labelbox automatically computes media attributes when you create new data rows in the platform. If the data is not accessible when you create the data rows, the media attributes will not be computed for those data rows.
Below is a list of the available media attributes.
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. |
Use this sample script to retrieve the media attributes for a data row.
datarow = client.get_data_row(data_row.uid)
print(datarow.media_attributes)
Below are some sample responses by asset type.
{
"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"
}
}
}