Transcoders
A transcoder reads media from a source bucket path and writes the converted
output (DASH and/or HLS, in SD, HD and/or FHD) to a destination bucket path.
Every transcoder belongs to a cloud_s3_transcoder subscription — the
subscriptionId comes from the Create Subscription response (see
Subscriptions). Source and destination buckets are
Storage buckets.
All requests go to the Transcoder gateway and need the authentication headers.
Only List Transcoders is called by the
app.web.cloud.sabay.com UI. Transcoders are created and edited in the Stream
console; the other operations exist in the gateway schema.
Create Transcoder
Mutation · s3_createTranscoder
Creates a transcoder.
Defined in the project (src/modules/storage/mutation/transcoder/useCreateTrascoder.ts)
but not called by the app.web.cloud.sabay.com UI; transcoders are created in
the Stream console. On success the hook evicts the cached s3_listTranscoder
field.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | The ID of the subscription, from the Create Subscription response |
input | s3_CreateTranscoderInput | Yes | The payload for creating a transcoder |
input
| Field | Type | Required | Description |
|---|---|---|---|
transcoderName | String | Yes | The name of the transcoder |
resolution | [s3_Resolution] | Yes | The output resolutions: SD | HD | FHD |
format | [s3_StreamFormat] | Yes | The output formats: DASH | HLS |
desBucketId | String | Yes | The destination bucket ID of the transcoder |
destination | String | Yes | The destination path of the transcoder |
callBackURL | String | No | The callback URL of the transcoder |
bucketId | String | Yes | The source bucket ID of the transcoder |
bucketSourcePath | [String] | Yes | The list of source paths in the bucket |
accessToken | String | No | The access token of the transcoder |
deleteSource | Boolean | No | Whether to delete the source file after transcoding |
The input field is spelled callBackURL, while the response field is
callbackURL.
Variables
{
"subscriptionId": "68e72a206055280790ae2b4d",
"input": {
"transcoderName": "transcoder-12",
"accessToken": null,
"callBackURL": null,
"bucketId": "68b9351d95147fc6a5d3c254",
"bucketSourcePath": ["/video"],
"destination": "/folder",
"resolution": ["HD"],
"format": ["DASH"],
"deleteSource": false,
"desBucketId": "68b9351d95147fc6a5d3c254"
}
}
Request
mutation S3_createTranscoder($subscriptionId: String!, $input: s3_CreateTranscoderInput!) {
s3_createTranscoder(subscriptionId: $subscriptionId, input: $input) {
id
subscriptionId
mysabayUserId
transcoderName
accessToken
callbackURL
destination
bucketSourcePath
format
resolution
deleteSource
createdAt
updatedAt
bucket {
id
name
}
}
}
Response
Captured sample; createdAt and updatedAt (Float, epoch ms) are not shown.
{
"data": {
"s3_createTranscoder": {
"id": "68e73aa0c2e8b3c3e2919f8f",
"subscriptionId": "68e72a206055280790ae2b4d",
"mysabayUserId": 39675494,
"transcoderName": "transcoder-12",
"accessToken": null,
"callbackURL": null,
"deleteSource": false,
"bucket": {
"id": "68b9351d95147fc6a5d3c254",
"name": "bucket-demo3",
"__typename": "s3_ShortBucketResponse"
},
"destination": "bucket-demo3/folder",
"format": ["DASH"],
"resolution": ["HD"],
"bucketSourcePath": ["/video"]
}
}
}
List Transcoders
Query · s3_listTranscoder
Returns the transcoders of a subscription, with pagination.
Called by the UI (src/modules/storage/query/transcoder/useListTrascoder.ts):
the Transcoder page sends pager: { limit: 1, page: 1 } and reads
pagination.total; subscription cards send pager: { page: 1, limit: 3 }.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | The ID of the subscription, from the Create Subscription response |
pager | s3_PagerInput | No | Pagination |
pager
| Field | Type | Required | Description |
|---|---|---|---|
page | Int | Yes | The current page number |
limit | Int | Yes | The number of transcoders per page |
Variables
{
"subscriptionId": "674eb7c68078d0a8fd80e8d3",
"pager": {
"page": 1,
"limit": 100
}
}
Request
query S3_listTranscoder($subscriptionId: String!, $pager: s3_PagerInput) {
s3_listTranscoder(subscriptionId: $subscriptionId, pager: $pager) {
transcoders {
id
subscriptionId
mysabayUserId
transcoderName
accessToken
callbackURL
destination
bucketSourcePath
format
resolution
deleteSource
createdAt
updatedAt
bucket {
id
name
}
}
pagination {
currentPage
lastPage
from
perPage
to
total
}
}
}
Response
Captured sample; createdAt / updatedAt (Float, epoch ms) and
pagination (s3_Pagination: currentPage, lastPage, from, perPage,
to, total — all Int) are not shown.
{
"data": {
"s3_listTranscoder": {
"transcoders": [
{
"id": "68e73aa0c2e8b3c3e2919f8f",
"subscriptionId": "68e72a206055280790ae2b4d",
"mysabayUserId": 39675494,
"transcoderName": "transcoder-12",
"accessToken": null,
"callbackURL": null,
"destination": "bucket-demo3/folder",
"bucketSourcePath": ["/video"],
"format": ["DASH"],
"resolution": ["HD"],
"deleteSource": false,
"bucket": {
"id": "68b9351d95147fc6a5d3c254",
"name": "bucket-demo3"
}
}
]
}
}
}
Get Transcoder
Query · s3_getTranscoderById
Returns a single transcoder.
Not called by the app.web.cloud.sabay.com UI; exists in the gateway schema.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
transcoderId | String | Yes | The ID of the transcoder |
Variables
{
"transcoderId": "68e73aa0c2e8b3c3e2919f8f"
}
Request
query S3_getTranscoderById($transcoderId: String!) {
s3_getTranscoderById(transcoderId: $transcoderId) {
id
subscriptionId
mysabayUserId
transcoderName
accessToken
callbackURL
destination
bucketSourcePath
format
resolution
deleteSource
bucket {
id
name
}
}
}
Response
{
"data": {
"s3_getTranscoderById": {
"id": "68e73aa0c2e8b3c3e2919f8f",
"subscriptionId": "68e72a206055280790ae2b4d",
"mysabayUserId": 39675494,
"transcoderName": "transcoder-12",
"accessToken": null,
"callbackURL": null,
"destination": "bucket-demo3/folder",
"bucketSourcePath": ["/video"],
"format": ["DASH"],
"resolution": ["HD"],
"deleteSource": false,
"bucket": {
"id": "68b9351d95147fc6a5d3c254",
"name": "bucket-demo3"
}
}
}
}
Get Transcoder by Bucket
Query · s3_getTranscoderByBucket
Returns the transcoder for a bucket.
Not called by the app.web.cloud.sabay.com UI; exists in the gateway schema.
The source document gives no field descriptions for this operation.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
bucketName | String | Yes | |
mysabayUserId | Int | Yes |
Variables
{
"bucketName": "string",
"mysabayUserId": 0
}
Request
query S3_getTranscoderByBucket($bucketName: String!, $mysabayUserId: Int!) {
s3_getTranscoderByBucket(bucketName: $bucketName, mysabayUserId: $mysabayUserId) {
id
subscriptionId
mysabayUserId
transcoderName
accessToken
callbackURL
destination
bucketSourcePath
format
resolution
deleteSource
createdAt
updatedAt
bucket {
id
name
}
}
}
Response
Response structure generated from the schema (values show field types), not a captured sample.
{
"data": {
"s3_getTranscoderByBucket": {
"id": "ID",
"subscriptionId": "String",
"mysabayUserId": "Float",
"transcoderName": "String",
"accessToken": "String",
"callbackURL": "String",
"destination": "String",
"bucketSourcePath": ["String"],
"format": ["DASH | HLS"],
"resolution": ["SD | HD | FHD"],
"deleteSource": "Boolean",
"createdAt": "Float",
"updatedAt": "Float",
"bucket": {
"id": "ID",
"name": "String"
}
}
}
}
Update Transcoder
Mutation · s3_updateTranscoder
Updates a transcoder.
Defined in the project (src/modules/storage/mutation/transcoder/useUpdateTrascoder.ts)
but the hook is not called by the UI; transcoders are edited in the Stream
console.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | The ID of the subscription, from the Create Subscription response |
input | s3_UpdateTranscoderInput | Yes | The updated transcoder |
input
| Field | Type | Required | Description |
|---|---|---|---|
transcoderId | String | Yes | The ID of the transcoder |
transcoderName | String | Yes | The name of the transcoder |
resolution | [s3_Resolution] | Yes | The output resolutions: SD | HD | FHD |
format | [s3_StreamFormat] | Yes | The output formats: DASH | HLS |
desBucketId | String | Yes | The destination bucket ID of the transcoder |
destination | String | Yes | The destination path of the transcoder |
callBackURL | String | No | The callback URL of the transcoder (response field is callbackURL) |
bucketSourcePath | [String] | Yes | The list of source paths in the bucket |
bucketId | String | Yes | The source bucket ID of the transcoder |
accessToken | String | No | The access token of the transcoder |
deleteSource | Boolean | No | Whether to delete the source file after transcoding |
Variables
{
"subscriptionId": "68e72a206055280790ae2b4d",
"input": {
"transcoderId": "68e73aa0c2e8b3c3e2919f8f",
"transcoderName": "transcoder-12",
"accessToken": null,
"callBackURL": null,
"bucketId": "68b9351d95147fc6a5d3c254",
"bucketSourcePath": ["/video"],
"destination": "/folder",
"resolution": ["HD"],
"format": ["DASH"],
"deleteSource": false,
"desBucketId": "68b9351d95147fc6a5d3c254"
}
}
Request
mutation S3_updateTranscoder($subscriptionId: String!, $input: s3_UpdateTranscoderInput!) {
s3_updateTranscoder(subscriptionId: $subscriptionId, input: $input) {
id
subscriptionId
mysabayUserId
transcoderName
accessToken
callbackURL
destination
bucketSourcePath
format
resolution
deleteSource
createdAt
updatedAt
bucket {
id
name
}
}
}
Response
{
"data": {
"s3_updateTranscoder": {
"id": "68e74001c2e8b3c3e291a206",
"subscriptionId": "68e72a206055280790ae2b4d",
"mysabayUserId": 39675494,
"transcoderName": "transcoder",
"accessToken": null,
"callbackURL": null,
"destination": "bucket-demo3/folder",
"bucketSourcePath": ["/"],
"format": ["DASH"],
"resolution": ["HD"],
"deleteSource": false,
"createdAt": 1759985665991,
"updatedAt": 1760413371529,
"bucket": {
"id": "68b9351d95147fc6a5d3c254",
"name": "bucket-demo3"
}
}
}
}
Remove Transcoder
Mutation · s3_deleteTranscoderById
Removes a transcoder.
Not called by the app.web.cloud.sabay.com UI; exists in the gateway schema.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
subscriptionId | String | Yes | The ID of the subscription, from the Create Subscription response |
input | s3_DeleteTranscoderInput | Yes | The transcoder to remove |
input
| Field | Type | Required | Description |
|---|---|---|---|
transcoderId | String | Yes | The ID of the transcoder |
Variables
{
"subscriptionId": "68e72a206055280790ae2b4d",
"input": {
"transcoderId": "68e74001c2e8b3c3e291a206"
}
}
Request
mutation s3DeleteTranscodeById($subscriptionId: String!, $input: s3_DeleteTranscoderInput!) {
s3_deleteTranscoderById(subscriptionId: $subscriptionId, input: $input) {
message
success
}
}
Response
{
"data": {
"s3_deleteTranscoderById": {
"message": "Transcoder delete successfully",
"success": true
}
}
}