Upload a original video

  • First of all, upload a original video to request SR(super-resolution).

request a uploading video#

bash
curl -X POST \
"https://develop.kokoon.cloud/kokoon/api/sr/v3/video" \
-H 'Authorization:eyJraWQiOiJPMGs5...eyJzdWIiOiIzN2U3NzYxM' \
-F "file=@original.mp4"

request body parameter#

  • body format : multipart/form-data
fieldtype
file original binary file to upload.

response#

json
{
"uid": "539e3480-929a-11ee-ada2-51e4bfe11414",
"vid": "de5e9990-c0fb-11ee-961f-d12490e606ad",
"pid": "00000000-0000-0000-0000-000000000000",
"tid": "00000000-0000-0000-0000-000000000000",
"created_time": "2024-02-01T12:17:32.699Z",
"filename": "original.mp4",
"size": 939073,
"codec_name": "h264",
"fps": "30/1",
"duration": "10.000000",
"nb_frames": "300",
"bitrate": "739484",
"width": 640,
"height": 360,
"download_cnt": 0,
"expired_time": "2024-02-15T12:17:32.699Z",
"state": "completed",
"url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/...",
"thumb_url": "https://sr-inner-api-storage-local.s3.amazonaws.com/video/539e3480-929a-11ee-ada2-51e4bfe11414/...",
"is_rotated": false,
"is_interlaced": false
}

response body field#

field type description
uidstringuser's unique id
vidstringvideo unique id
pidstringparent_id :
  • if video file is original, parent_id is '00000000-0000-0000-0000-000000000000'.
  • if video file is SR result, parent_id is original file's vid used when SR is requested.
tidstringSR task_id :
  • if video file is original, task_id is '00000000-0000-0000-0000-000000000000'.
  • if video file is SR result, task_id is a unique task-id recevied when SR is requested.
created_timestringoriginal video's uploading completion time.
filenamestringoriginal video's filename.
sizeintoriginal video's filesize.
codec_namestringoriginal video's codec_name.
fpsstringoriginal video's fps(frame per second).
durationstringoriginal video's duration.(seconds)
nb_framesstringoriginal video's number of total frames.
bitratestringoriginal video's bitrate.(bits per second)
widthintoriginal video's width.
heightintoriginal video's height.
download_cntintoriginal video's downloding count.
  • We cannot figure out that a user really downloaded a original file with url. But we can provide a download-inc-count API. After a user really download a file with url, if call download-inc-count API, download_cnt will be increased.
expired_timestringoriginal videos' expired time. original video will be expired after 14day later from created_time.
statestringoriginal videos' state. In case of original file, state is always 'completed'.
  • state :
    • pending : SR video creation is requested.
    • processing : SR video creation is in processing.
    • completed : SR video creation is completed.
    • error : SR video creation is failed.
urlurloriginal video's url.
thumb_urlurloriginal video's thumbnail url.
is_rotatedbooleanwhen true, it indicates that original video is rotated with +90 degree or -90 degree.
is_interlacedbooleanwhen true, it indicates that original video is interlaced.

error response#

  • timeout error