Video/Move
Description: Move the video file to another online service and delete it from Nimbb's server.
We support the following services: Amazon S3, Brightcove.
This method requires a Gold or higher subscription, depending on the service.
Warning
This function moves your file to another online service. Once the video file is successfully copied, the file is deleted from the Nimbb server
and can't be played by the Nimbb Player. Use this function only if you don't need to play the video file using the Nimbb Player.
Example of function call:
http://api.nimbb.com/Video/Move.aspx?key=PUBLIC_KEY&code=PRIVATE_KEY&guid=VIDEO_GUID&dest=DEST_TYPE
&s3bucket=S3_BUCKET&s3key=S3_KEY&bcwritetoken=BC_WRITETOKEN&bctag=BC_TAG
where you replace the values:
PUBLIC_KEY: your developer public key;
PRIVATE_KEY: your developer private key;
VIDEO_GUID: the video GUID;
DEST_TYPE: destination type ("s3" for Amazon S3, "bc" for Brightcove);
Amazon S3:
S3_BUCKET: your Amazon S3 destination bucket;
S3_KEY: the unique name assigned to the object (video file) in the bucket;
Brightcove:
BC_WRITETOKEN: your Brightcove API write token;
BC_TAG: tag added to each video for tagging (optional).
If the function is successfully completed, the updated video object is returned:
<?xml version="1.0" encoding="utf-8" ?>
<nimbb version="1">
<video>
<guid>XXXXXXXXXX</guid>
<length>4.103</length>
<fileSize>52748</fileSize>
<dateCreated>2009-05-22T19:35:29.617-04:00</dateCreated>
<dateExpires>2009-06-23T17:51:56-04:00</dateExpires>
<totalViews>18</totalViews>
<dateLastView>2009-05-25T11:58:34.54-04:00</dateLastView>
<dateMoved>2009-06-10T11:58:34.54-04:00</dateMoved>
<site>blog.d2soft.com</site>
</video>
</nimbb>
Amazon S3 Notes (requires Gold or higher subscription)
When moving the video file to Amazon S3, the following meta-tags are added to the object:
- nimbb_guid: GUID of the video;
- nimbb_fileformat: file format (flv, mp4).
Also, the Content-Type is specified as "video/x-flv" for FLV and "video/mp4" for MP4.
Note that you need to give permission to our AWS account to write to your bucket. To do so, go to your bucket's properties in the
AWS Management Console, then click Add bucket policy under the Permissions and paste the following code:
{
"Version":"2008-10-17",
"Id":"PolicyForNimbbWriteContent",
"Statement":[{
"Sid":"AllowNimbbPutObject",
"Effect":"Allow",
"Principal":{"CanonicalUser":"18cd66bbf307f5d6d5af814d81e29698f6072c892f4d18203a94bb6b8d1f44f6"},
"Action":["s3:PutObject","s3:PutObjectAcl"],
"Resource":"arn:aws:s3:::BucketName/*"
}]
}
Make sure to replace
BucketName by the name of your Bucket.
Brightcove Notes (requires Corporate or higher subscription)
To find your Brightcove write token, go to your Brightcove Account Settings, then click API Management.
In the list, look for the token of type write. A token is a string of caracters that usually finishes with two dots (".."). This token allows our server to upload to your account.
If you need help with token, refer to the Brightcove documentation.
Once you move a Nimbb video to Brightcove, you will find your video under the file name "XXXXXXXXXX.f4v" for FLV and "XXXXXXXXXX.mp4" for MP4 (where XXXXXXXXXX is the GUID of the video).
MP4 High-Quality Video Notes
If you recorded a video in High-Quality with the Nimbb Player 2, you are moving the file in MP4 format. To move the MP4 in real-time, we have to lower the quality of the resulting file.
If you don't require that your file is moved in real-time and you can wait a few minutes for the file to be in the highest quality level, then you can set a special parameter "quality" with
value "high". Simply add this parameter to the function call:
&quality=high
On success, the function will return the same result as usual, except that the "dateMoved" value will be "0001-01-01T05:00:00-05:00" (undefined). Your file will be added to a queue
for processing. Once completed, you can receive an optional callback to know when your file was moved (see below). This parameter has no effect if you are moving standard FLV video files.
Callback Notes
It's possible to specify a "callback" parameter in the function call. You can set an URL that our server will call once the video file has been moved successfully. This is useful when
using the "quality" parameter to receive a notification once your file has been processed. Simply add the parameter to the function call like this:
&callback=yoursite/yourpage.html
Make sure to URLencode the value. When the callback is done, it will add two parameters to your URL: type with value "video_moved" and guid with the GUID value of the moved video.
Go back to Web Service documentation.