Transcode
Transcode a video
POST
/
transcode
Authorization
Body
curl --request POST \
--url https://livepeer.studio/api/transcode \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"c2pa": true,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"input": {
"url": "https://s3.amazonaws.com/bucket/file.mp4"
},
"outputs": {
"fmp4": {
"path": "/samplevideo/fmp4"
},
"hls": {
"path": "/samplevideo/hls"
},
"mp4": {
"path": "/samplevideo/mp4"
}
},
"profiles": [
{
"bitrate": 401,
"encoder": "h264",
"fps": 123,
"fpsDen": 2,
"gop": "<string>",
"height": 129,
"name": "720p",
"profile": "H264Baseline",
"width": 129
}
],
"storage": {
"bucket": "outputbucket",
"credentials": {
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
},
"endpoint": "https://gateway.storjshare.io",
"type": "s3"
},
"targetSegmentSizeSecs": 123
}'
{
"createdAt": 1587667174725,
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"output": {
"export": {},
"exportData": {},
"upload": {}
},
"outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"params": {
"clip": {},
"export": {
"custom": {
"url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB"
}
},
"exportData": {
"content": {}
},
"transcode-file": {},
"upload": {}
},
"requesterId": "<string>",
"scheduledAt": 1587667174725,
"status": {
"errorMessage": "<string>",
"phase": "pending",
"progress": 123,
"retries": 123,
"updatedAt": 1587667174725
},
"type": "upload"
}
Authorizations
Authorization
string
headerrequiredBearer api-key
Body
application/json
c2pa
boolean
Decides if the output video should include C2PA signature
creatorId
input
object
requiredURL input video
Option 1
Option 2
outputs
object
requiredOutput formats
profiles
object[]
storage
object
requiredStorage for the output files
Option 1
Option 2
targetSegmentSizeSecs
number
How many seconds the duration of each output segment should be
Response
200 - application/json
createdAt
number
Timestamp (in milliseconds) at which task was created
id
string
Task ID
inputAssetId
string
ID of the input asset
output
object
Output of the task
outputAssetId
string
ID of the output asset
params
object
Parameters of the task
requesterId
string
ID of the requester hash(IP + SALT + PlaybackId)
scheduledAt
number
Timestamp (in milliseconds) at which the task was scheduled for execution (e.g. after file upload finished).
status
object
Status of the task
type
enum<string>
Type of the task
Available options:
upload
, export
, export-data
, transcode-file
, clip
Was this page helpful?
curl --request POST \
--url https://livepeer.studio/api/transcode \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"c2pa": true,
"creatorId": {
"type": "unverified",
"value": "<string>"
},
"input": {
"url": "https://s3.amazonaws.com/bucket/file.mp4"
},
"outputs": {
"fmp4": {
"path": "/samplevideo/fmp4"
},
"hls": {
"path": "/samplevideo/hls"
},
"mp4": {
"path": "/samplevideo/mp4"
}
},
"profiles": [
{
"bitrate": 401,
"encoder": "h264",
"fps": 123,
"fpsDen": 2,
"gop": "<string>",
"height": 129,
"name": "720p",
"profile": "H264Baseline",
"width": 129
}
],
"storage": {
"bucket": "outputbucket",
"credentials": {
"accessKeyId": "AKIAIOSFODNN7EXAMPLE",
"secretAccessKey": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
},
"endpoint": "https://gateway.storjshare.io",
"type": "s3"
},
"targetSegmentSizeSecs": 123
}'
{
"createdAt": 1587667174725,
"id": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"inputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"output": {
"export": {},
"exportData": {},
"upload": {}
},
"outputAssetId": "09F8B46C-61A0-4254-9875-F71F4C605BC7",
"params": {
"clip": {},
"export": {
"custom": {
"url": "https://s3.amazonaws.com/my-bucket/path/filename.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=LLMMB"
}
},
"exportData": {
"content": {}
},
"transcode-file": {},
"upload": {}
},
"requesterId": "<string>",
"scheduledAt": 1587667174725,
"status": {
"errorMessage": "<string>",
"phase": "pending",
"progress": 123,
"retries": 123,
"updatedAt": 1587667174725
},
"type": "upload"
}