Transcode API

From DocuWiki
Revision as of 15:39, 25 February 2014 by 0oqb9d (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The Transcode section of the API is used to convert your uploaded videos into different formats, you get charged for transcodes so please make sure when transcoding that you pass the correct information across, failure to do so could result in you being charged for transcodes which you did not require.



Queue

Returns information about your transcoding queue items, if no video id is specified then you will get your last 50 queue items

Request URL

http://console.247platform.com/api/transcoding/queue/[videoId]?sessionId=[Session ID]&userId=[Client ID]

Params

  • `videoId` (optional) Int - Video Id from the platform

Response

"response":{
 "queue":{
  "1418":{
   "jobId":"1418", 
   "videoId":"11", 
   "queueId":"815", 
   "jobStatus":"COMPLETED", 
   "hasFailed":"0"
  },
  "1419":{
   "jobId":"1419", 
   "videoId":"11", 
   "queueId":"815", 
   "jobStatus":"COMPLETED", 
   "hasFailed":"0"
  }
  },
 "code":"200",
 "isOk":true
},
"code":"200"

Errors

  • AuthenticationRequired (code 400), Authentication is required but not provided.


Presets

Returns a list of transcoding presets which are to be used in the transcoding a video call.

Request URL

http://console.247platform.com/api/transcoding/presets/?sessionId=[Session ID]&userId=[Client ID]

Response

"response":{
 "presets":{
  "5":{
   "smilId":"5", 
   "height":"576", 
   "width":"1024", 
   "bitrate":"3500", 
  },
  "6":{
   "smilId":"6", 
   "height":"720", 
   "width":"1280", 
   "bitrate":"5000", 
  }
 },
 "code":"200",
 "isOk":true
},
"code":"200"

Errors

  • AuthenticationRequired (code 400), Authentication is required but not provided.


Transcode

Makes a request to transcode a video into different formats.

Request URL

http://console.247platform.com/api/transcoding/transcode/[videoId]?sessionId=[Session ID]&userId=[Client ID]&transcoderProfiles=1-3-5-6-7&lengthInMinutes=10&source=4d-895.mp4

Params

  • `videoId` (reqired) Int - Video Id from the platform
  • `transcoderProfiles` (required) String - The presets call above will give you the smilid's to use in this paramater. Seperate each smilid with a dash (faiure to do so will result in your transcode job being rejected)
  • lengthInMinutes (required) Float - this is the total length of the video to transcode, this needs to be correct otherwise it will affect account actions and video output. Do not enter a number shorter than the number of minutes of the source video.

source (required) String - this is the filename of the video to be transcoded, filenames must be without spaces or your transcode will fail.

Response

{
  "response":{
     "jobsCreated": 5
  },
  "code":"200",
  "isOk":true
 },
 "code":"200"
}

Errors

  • AuthenticationRequired (code 400), Authentication is required but not provided.
  • MissingRequiredQueryParameter (code 400), One or more of the required params where not passed.
  • ResourceNotFound (code 404), Resource does not exist.
  • InsufficientBallance (code 400), Your account balance is insufficient to be able to perform the transcode, a minimum of $15 is required.