POST /transcode transcodes a video file and uploads the results to the
specified storage service.
Transcoding is asynchronous so you will need to check the status of the
task in order to determine when transcoding is complete. The id field
in the response is the unique ID for the transcoding Task. The task
status can be queried using the GET tasks
endpoint:
When status.phase is completed, transcoding will be complete and
the results will be stored in the storage service and the specified
output location.
The results will be available under params.outputs.hls.path and
params.outputs.mp4.path in the specified storage service.
This endpoint currently supports the following inputs:
{
"url": "https://www.example.com/video.mp4"
}
| Name | Type | Description |
|---|---|---|
| url | string | A public HTTP URL for the video file. |
Note: For IPFS HTTP gateway URLs, the API currently only supports “path
style” URLs and does not support “subdomain style” URLs. The API will
support both styles of URLs in a future update.
S3 API Compatible Service
S3 credentials can be used to authenticate with a S3 API compatible
service to read a video file.
{
"type": "s3",
"endpoint": "https://gateway.storjshare.io",
"credentials": {
"accessKeyId": "$ACCESS_KEY_ID",
"secretAccessKey": "$SECRET_ACCESS_KEY"
},
"bucket": "inbucket",
"path": "/video/source.mp4"
}
This endpoint currently supports the following storage services:
{
"type": "s3",
"endpoint": "https://gateway.storjshare.io",
"credentials": {
"accessKeyId": "$ACCESS_KEY_ID",
"secretAccessKey": "$SECRET_ACCESS_KEY"
},
"bucket": "mybucket"
}
Web3 Storage
{
"type": "web3.storage",
"credentials": {
"proof": "$UCAN_DELEGATION_PROOF",
}
}
This endpoint currently supports the following output types:
HLS
{
"hls": {
"path": "/samplevideo/hls"
}
}
MP4
{
"mp4": {
"path": "/samplevideo/mp4"
}
}
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
URL input video
Storage for the output files
Output formats
How many seconds the duration of each output segment should be
Decides if the output video should include C2PA signature
Success
Task ID
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Type of the task
upload, export, export-data, transcode-file, clip "upload"
Timestamp (in milliseconds) at which task was created
1587667174725
Timestamp (in milliseconds) at which the task was scheduled for execution (e.g. after file upload finished).
1587667174725
ID of the input asset
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the output asset
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the project
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
ID of the requester hash(IP + SALT + PlaybackId)
"09F8B46C-61A0-4254-9875-F71F4C605BC7"
Parameters of the task
Status of the task
Output of the task