Asset Complex
Asset_complex is used for defining multi-part sources. These can include multiple video, audio, and subtitle files. The JSON example on the right shows stitching 10 seconds of one video with another video. In the example, you will see two arrays, one called "asset_versions" and one called "asset_components". These exist so that you can create much more complex operations. Each element of the "asset_versions" array specifies one source asset that will be used. Because a source may not actually be a single file but rather a collection of video tracks, audio tracks, and subtitle tracks, each element of the "asset_versions" array contains an "asset_components" array. The "asset_components" array is where you would specify the various components.
You will also notice that each element in the "asset_components" array has a "kind" value. In our previous example, we used "name" as the value for "kind". Other values include "list", "template", "image_sequence", "binary_sequence", and "asset_sequence". These are used when you have sources of different types. For example, if you had an asset that consisted of thousands of .png files, called "animation0001.png", "animation0002.png", etc. that you wanted to transcode into a single output, you could specify it as shown on the right.
For a more detailed overview of complex assets, please see: https://tutorials.hybrik.com/sources_asset_complex/
Name | Type | Description |
---|---|---|
storage_provider | enum s3 gs ftp sftp http swift swiftstack akamains relative | The type of file access. |
url | string | The complete URL for the file location. |
access | anyOf s3 gs ftp sftp http swift swiftstack akamains | This contains credentials granting access to the location. |
Asset Complex Example
{
"uid": "my_complex_source",
"kind": "source",
"payload": {
"kind": "asset_complex",
"payload": {
"kind": "sequence",
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_folder"
},
"asset_versions": [
{
"version_uid": "intro",
"asset_components": [
{
"kind": "name",
"component_uid": "file1",
"name": "intro_video.mp4",
"trim": {
"inpoint_sec": 0,
"duration_sec": 10
}
}
]
},
{
"version_uid": "main",
"asset_components": [
{
"kind": "name",
"component_uid": "file2",
"name": "main_video.mov"
}
]
}
]
}
}
}
Image Sequence Example
{
"uid": "source_file",
"kind": "source",
"payload": {
"kind": "asset_complex",
"payload": {
"asset_versions": [
{
"location": {
"storage_provider": "s3",
"path": "s3://my_bucket/my_folder"
},
"asset_components": [
{
"kind": "image_sequence",
"image_sequence": {
"base": "animation%04d.png"
}
}
]
}
]
}
}
}