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 Silver or higher subscription, depending on the service.
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 calls:
where you replace the values:
PUBLIC_KEY: your developer public key;
PRIVATE_KEY: your developer private key;
VIDEO_GUID: the video GUID;
S3_BUCKET: your Amazon S3 destination bucket;
S3_KEY: the unique name assigned to the object (video file) in the bucket;
BC_WRITETOKEN: your Brightcove API write token;
BC_TAG: tag added to each video for tagging (optional);
BC_REFID: unique reference ID for the video (optional, max 150 characters). If not unique, an error will be generated;
BC_NAME: video name (optional, max 255 characters). If not specified, file name used;
BC_DESC: video short description (optional, max 250 characters);
BC_FIELDS: custom fields in format "name1:value1;name2:value2" (optional, max 250 characters).
If the function is successfully completed, the updated video object is returned:
<?xml version="1.0" encoding="utf-8" ?>
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:
Make sure to replace BucketName
by the name of your Bucket.
By default, the Amazon ACL permissions on the object are set to public read. However, your user will not have access to change those permissions.
To give full permissions to your account, specify as a parameter your Amazon S3 login email address like this:
You will then be able to manage the permissions of the object. Note that this parameter is optional.
When using this parameter, your video will automatically have the public-read permission. If you would like to make this video accessible only to your account, you can also add the private parameter:
Note that if you use the private parameter, you must also specify the email parameter.
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.mp4" (where XXXXXXXXXX is the GUID of the video).
Two tags are added to the video : "guid_XXXXXXXXXX" (holding the guid of the video) and "nimbb.com". If you specify the bctag parameter, you will have its value as a third tag.
To easily identify your video on Brightcove, you can define a Brightcove Reference ID by setting a string value (maximum 150 chars) to the bcrefid parameter. Note that if the value is not unique, an error will be generated and the function will fail.
If you have defined Custom Fields on your videos into Brightcove (you can view if you have some by going into your Brightcove VideoCloud, click Account Settings, click Video Fields), then you can specify their name/value pairs using the bcfields parameter. For example, "bcfields=name1:value1;name2:value2;name3:value3".
Note that the names of the fields must match their "internal" name (for example, "programmetype" instead of "Programme Type"). Also, if the field is a list, make sure that the value you are specifying exists in the list.
It is possible to retrieve the Brightcove ID of the moved video file. For that, you need to use the callback parameter in your function call. See the Callback Notes below.
MP4 High-Quality Video Notes
Note: the quality parameter is no longer necessary (as of July 10th, 2014) since we improved the process to make the generation of the MP4 file faster. However, you can still use this parameter if you want an asynchrone execution.
In addition, this parameter ensures that the correct audio channels and audio sample rate are set into the final mp4 file. This might solve any issue of video playback without audio.
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:
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.
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:
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.
If you moved the file to Brightcove, an extra parameter is provided: brightcoveid. This is the ID of the moved video within Brightcove's platform so that you can refer to it easily.
Go back to Web Service documentation.