Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Flow examples #7

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions api/TimeAddressableMediaStore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,24 @@ paths:
application/json:
schema:
$ref: schemas/flow.json
example:
$ref: examples/flow-get-200.json
examples:
video:
summary: Video Flow - H.264 Codec
value:
$ref: examples/flow-get-200-video-h264.json
audio:
summary: Audio Flow - AAC Codec
value:
$ref: examples/flow-get-200-audio-aac.json
rawvideo:
summary: Video Flow - Uncompressed (Quicktime)
value:
$ref: examples/flow-get-200-video-raw.json
ttml:
summary: Data Flow - TTML
description: TAMS can also be used for storing non-AV content such as subtitles or event data
value:
$ref: examples/flow-get-200-data-ttml.json
"404":
description: The requested flow does not exist.
"400":
Expand Down Expand Up @@ -545,8 +561,22 @@ paths:
type: boolean
content:
application/json:
example:
$ref: examples/flow-segments-get-200.json
schema:
type: array
items:
$ref: schemas/flow-segment.json
examples:
basic:
summary: Basic Example
value:
$ref: examples/flow-segments-get-200.json
sample_count:
summary: Partial Segment
description: |
This example takes part of an existing segment, offsets it with `ts_offset` and then selects a
subset of the samples within using `ts_offset` for the second segment in the sequence.
value:
$ref: examples/flow-segments-get-200-sample-offset.json
post:
description: |
Register a new flow segment, attaching the object id given to a point in the flow timeline.
Expand Down
24 changes: 24 additions & 0 deletions api/examples/flow-get-200-audio-aac.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"id": "6101df05-06bb-41b8-8af4-cf7cd33df209",
"source_id": "41d7f7eb-c48d-4513-9b37-17b418d26d7f",
"generation": 1,
"created": "2018-03-06T09:10:22Z",
"metadata_updated": "2018-03-06T09:12:22Z",
"segments_updated": "2018-03-06T11:14:32Z",
"description": "audio capture web",
"label": "capture_1",
"format": "urn:x-nmos:format:audio",
"created_by": "tams-dev",
"tags": {
"quality": "web",
"_tams_segmentation_rate": "375/8"
},
"codec": "audio/aac",
"container": "video/mp2t",
"avg_bit_rate": 128,
"sample_rate": 48000,
"channels": 2,
"bit_depth": 24,
"coded_frame_size": 1024,
"mp4_oti": 2
}
13 changes: 13 additions & 0 deletions api/examples/flow-get-200-data-ttml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"id": "e85efab4-993b-4ad6-9af3-4cd8d0d38860",
"source_id": "a77d0061-0878-4e8a-a114-772d03f952c1",
"format": "urn:x-nmos:format:data",
"generation": 0,
"created": "2023-12-14T16:34:58.131620",
"tags": {
"_tams_segmentation_rate": "200"
},
"codec": "application/ttml+xml",
"container": "application/ttml+xml",
"data_type": "urn:x-tams:data:subtitle"
}
41 changes: 41 additions & 0 deletions api/examples/flow-get-200-video-raw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"id": "0fde9c11-da9d-434a-a113-d3b20a2cf251",
"source_id": "2aa143ac-0ab7-4d75-bc32-5c00c13d186f",
"generation": 0,
"created": "2018-03-06T09:10:22Z",
"metadata_updated": "2018-03-06T09:12:22Z",
"segments_updated": "2018-03-06T11:14:32Z",
"description": "video capture",
"label": "capture_1",
"format": "urn:x-nmos:format:video",
"created_by": "tams-dev",
"tags": {
"quality": "full",
"_tams_segmentation_rate": "25"
},
"codec": "video/raw",
"container": "video/quicktime",
"avg_bit_rate": 1658880,
"frame_rate": {
"numerator": 50,
"denominator": 1
},
"frame_width": 1920,
"frame_height": 1080,
"bit_depth": 8,
"interlace_mode": "progressive",
"colorspace": "BT709",
"transfer_characteristic": "SDR",
"aspect_ratio": {
"numerator": 16,
"denominator": 9
},
"pixel_aspect_ratio": {
"numerator": 1,
"denominator": 1
},
"component_type": "YCbCr",
"unc_type": "UYVY",
"vert_chroma_subs": 1,
"horiz_chroma_subs": 2
}
27 changes: 27 additions & 0 deletions api/examples/flow-segments-get-200-sample-offset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[
{
"object_id": "tams-demo/tams-67cd7994-47d4-4e89-9e9f-5e548b7eb7dd.ts",
"range": "[0:0_10:0)",
"sample_count": 240,
"sample_offset": 0,
"get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-67cd7994-47d4-4e89-9e9f-5e548b7eb7dd.ts",
"key_frame_count": 10
},
{
"object_id": "tams-demo/tams-7dffa41c-9e12-4e7d-a269-0aae8351d806.ts",
"range": "[10:0_15:0)",
"ts_offset": "5:0",
"sample_count": 120,
"sample_offset": 60,
"get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-7dffa41c-9e12-4e7d-a269-0aae8351d806.ts",
"key_frame_count": 5
},
{
"object_id": "tams-demo/tams-bdfb03ae-25a5-4a72-9b9e-14c5119813c9.ts",
"range": "[15:0_25:0)",
"sample_count": 240,
"sample_offset": 0,
"get_url": "https://a4c52e22f45b4a0fa3ea3b9a42b35808-tams-demo.static.lon1.bbcis.uk/tams-bdfb03ae-25a5-4a72-9b9e-14c5119813c9.ts",
"key_frame_count": 10
}
]
Loading