Skip to main contentIBM Video Streaming Developers

Upload videos (via FTP)

IMPORTANT: Please note that this upload method is deprecated and will be discontinued later this year. We encourage yout to switch over to our new upload method found here: https://developers.video.ibm.com/channel-api-video-management/upload-videos-new

Videos can be uploaded by FTP. To upload a file you must do the following steps:

  1. Initiate an upload process by an API call. In the response you can find the details needed to connect through FTP.
  2. Upload the video.
  3. When the upload is finished, send a “file in place” signal, which tells the IBM server that it can start to process the file.
  4. Call the API to check the status of processing the video.

Initialize an upload

Initiate the upload process.

POST https://api.video.ibm.com/channels/{channel_id}/uploads.json?type=videoupload-ftp

Parameters

The parameters for the POST request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
titlestringOPTIONALVideo title
descriptionstringOPTIONALVideo description
protectstringOPTIONALVideo protection level. Supported values: public, private

Success response

Upon success a response with HTTP status “200 OK” is returned with the key-value pairs containing the details of the FTP access.

Example of a success response:

{
"protocol": "ftp",
"host": "red44.ustream.tv",
"port": 21,
"path": "/1_12345_12345678901234",
"user": "1_12345_1234567890",
"password": "ftppw",
"videoId": "52177361",
"url": "ftp://1_1234_1234567890:ftppw@red44.ustream.tv/1_12345_12345678901234"

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
400 Bad Requestprotect_level_invalidInvalid protect level has been sent
401 Unauthorizedinvalid_tokenThe provided access token is missing, revoked, expired or malformed
403 Forbiddenlack_of_ownershipThe API user is not allowed to manage the given channel
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Upload the video file

Use the credentials you received in the response when you initialized the process to upload your video file to IBM servers. Once you log in to the FTP server, you should put your file to the root, under a name that matches with the path value of the response, followed by the extension.

The url part of the response makes it easier to transfer files, with a single FTP command. For example, if you have a file called test.mov, you can use the following FTP command to upload it:

ftp -u
ftp://1_1234_1234567890:ftppw@red44.ustream.tv/1_12345_12345678901234.mov
test.mov

Or using the cURL command:

curl \
ftp://1_1234_1234567890:ftppw@sjc03-vod-upload02.services.video.ibm.com/1_12345_12345678901234 \
-v -T test.mov

Supported file extensions are: mp4, mov, flv.

Don’t forget to set your FTP client to binary file transfer mode, before uploading the video file.

Send “file in place” signal

A “file in place” signal tells to our server that it can start to process the file.

PUT https://api.video.ibm.com/channels/{channel_id}/uploads/{video_id}.json

Parameters

The parameters for the PUT request:

PARAMETERTYPEIMPORTANCEDESCRIPTION
statusstringREQUIREDUpload status (the value should be ready)

Success response

Upon success, a response with HTTP status “202 Accepted” is returned.

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundChannel or video was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request

Check status of processing

Returns the status of processing the specific video.

GET https://api.video.ibm.com/channels/{channel_id}/uploads/{video_id}.json

Parameters

This request has no parameters.

Success response

Upon success a response with HTTP status “200 OK” is returned with a key-value pair.

KEYTYPEDESCRIPTION
statusstringThe current status. Possible values: initiated, transferred, queued, pending, transcoding, complete, error

Error responses

Possible error responses:

HTTP RESPONSE CODEERROR VALUEERROR CONDITIONS
401 UnauthorizedThe provided access token is missing, revoked, expired or malformed
404 Not Foundnot_foundChannel was not found
503 Service UnavailableThere is a temporary error on the server which makes it impossible to serve the request