Assets are a core object in MediaSilo. An asset can be any file type, including video, audio, graphic, document, and archive. The asset object contains detailed information about the assets, including file metadata, pointers to derived version of the file (i.e. encoded version), and their strategies.
[
{
"approvalStatus": "pending",
"archiveStatus": "n/a",
"averageRating": null,
"commentCount": 2,
"dateCreated": 1410902367000,
"dateModified": 1412880990000,
"derivatives": [
{
"duration": 21890,
"fileSize": 4977,
"height": 1080,
"type": "source",
"url": "https://d123mqjywc428u.cloudfront.net/...",
"width": 1920
},
{
"duration": 21890,
"fileSize": 4977,
"height": 1080,
"posterFrame": "https://s3.amazonaws.com/...",
"strategies": [
{
"streamer": "rtmp://s37758y8jcblwg.cloudfront.net/cfx/st",
"type": "rtmp",
"url": "709352581VSEJ/..."
},
{
"streamer": "rtmpt://s37758y8jcblwg.cloudfront.net/cfx/st",
"type": "rtmpt",
"url": "709352581VSEJ..."
}
],
"thumbnail": "https://s3.amazonaws.com...",
"type": "proxy",
"url": "https://d123mqjywc428u.cloudfront.net/...",
"width": 1920
}
],
"description": "",
"duration": 21890,
"external": false,
"fileName": "A033_C381_0705QE_4K169.mp4",
"folderId": null,
"id": "80559D7F-F3B5-06D6-78A4434B69BAA8FF",
"myRating": null,
"permissions": [
"collaboration.requestapproval",
"collaboration.comment",
"collaboration.rate",
"asset.create",
"asset.update",
"asset.delete",
"asset.read",
"asset.source",
"sharing.internal",
"sharing.external",
"service.transcript",
"reporting.export"
],
"posterFrame": "https://s3.amazonaws.com...",
"private": false,
"progress": 100,
"projectId": "A3C149F7-C48A-F55F-A5060AAFDE60233D",
"tags": [
],
"title": "A033_C381_0705QE_4K169.mp4",
"transcriptStatus": "N/A",
"type": "video",
"uploadedBy": "demo"
}
]
Data point | Description |
---|---|
approvalStatus | Possible values: pending, rejected, approved. Get set when a user requests approval. Only one approval request can be pending at any one time. |
archiveStatus | Currently not supported. |
averageRating | Average rating on a scale of 1-5 where 1 is the lowest rating and 5 is the highest. |
commentCount | Number of comments made directly on this asset. |
dateCreated | Timestamp of when the file was uploaded. |
dateModified | Timestamp of the last modification. An asset is modified when changes are made to its metadata, comments, description, title, or tags. |
derivatives | An array of objects that describe the specific derivative. Derivatives are copies of the source, usually for the purpose of providing compatibility with different devices. MediaSilo creates webm and H.264 video proxies, as well as sprite and waveform derivatives. |
derivatives->duration | If media is time based, the duration of in milliseconds. |
derivatives->fileSize | The size if the derivative in bytes. |
derivatives->height | The physical height of the proxy. MediaSilo scales derivatives at specific sizes, so this may not be the same as source. |
derivaties->width | The physical width of a proxy. See above. |
derivatives->type | The specific type of a derivative: can be source, proxy, waveform, or audio waveform. |
derivatives->url | The URL of the source file. Optionally requires signed token. |
derivatives->posterframe | Usually a JPEG image representing the poster frame of a video asset. |
derivatives->strategies | Derivatives can be delivered using different strategies. It is possible to extend the delivery strategies to support video playback via custom playout servers or CDNs--for example as HLS or MPEG-DASH. |
derivatives->strategies->streamer | The address of the RTMP streamer used by the strategy. |
derivatives->strategies->stream | The URL of the stream to be delivered via RTMP or RTMPT. |
derivatives->strategies->type | Currently supported are: rtmp, rtmpt, and proxy. |
description | Text description, limited to 255 characters. |
duration | Duration of the source file in miliseconds. |
external | Boolean indicating if this is an external assets. Support for external assets has changed starting with API 3.0. |
fileName | The file name of the original uploaded file. |
folderId | The id of the folder this asset is contained in. |
id | The asset uuid; unique in MediaSilo. |
myRating | The current users' rating on a scale of 1-5 where 1 is the lowest and 5 is the highest rating. |
permissions | A permission string in the form of a comma separated list of permission. See Permission and ACL for more information. |
posterFrame | An image representing the poster frame of a video asset, usually a JPEG. |
private | Indicates whether this asset requires a signed token before it can be retrieved. |
progress | Indicates the encoding progress of the H.264 derivative which is required for initial playback. Scale is 1-100. -1 Indicates an asset is pending in queue. |
projectId | The id of the project an asset is contained in. |
tags | An comma-separated list of tag names. |
title | The title of the asset, which may be different from the file name. |
transcriptStatus | Indicates if a transcript has been ordered. |
uploadedBy | Username of the user who uploaded the asset. |
type | Video, Image, Audio, Archive, or Document |
Derivatives
Each asset may contain one or several derivatives representing different proxies or related media, such as sprites (small thumbnails taken at set intervals of an asset) and and audio waveform. Using derivatives, it is possible to anticipate platform differences and serve the correct media type. For example, webm derivatives are served when using native video playback in Firefox browsers.
Derivative Type | Description |
---|---|
proxy | Encoded proxy used for playback across devices. Examples include webm and H.264. |
source | The source of the file, including its file size and dimensions. |
sprites | A set of images containing sprites that show a thumbnail of every video in 1 second increments. |
waveform | An image and csv data set for rendering an audio waveform of the video. |
Strategies
Derivatives can use delivery strategies, such as http, rmtp, or hls. MediaSilo automatically creates progressive and rtmp derivatives of all assets using H.264 as a codec. Client applications can look for available derivatives and strategies to tailor playback to a specific user experience.
Time Limited URLS
Your account may be configured to make use of signed URLS. Instead of a direct link to an asset, the url contains a unique signature as well as expiration indicator in epoch time. Signed urls expire automatically after a few minutes which means as a developer you have to inspect the expiration time every time a user requests an asset.
URLS with signature
A typical scenario is listing the contents of a project:
GET /projects/$projectid$/assets
Once the page is rendered, the end user may click on an asset to view the detail after the temporary URL to the proxy has expired. Reloading the asset will ensure you have a fresh signature with a new expiration date.
The same strategy should be used in a media playback scenario where it's possible that a video clip is longer than the signature is valid for. All popular video players provide an error handler which could be used to trigger the asset refresh.
Using Sprites (webvtt)
Documentation pending.
Using Waveform
Documentation pending.