Mediaclip API

The Public Mediaclip API provides public access to media-clip (metadata) content in several ways:

JSON/JSONP

Full metadata and asset references export in JSON or JSONP format or a json formatted error response.

See chapter [[media_content_types]] for a full description of the formatted content. The optional url parameter [callback] can be used to format the result in a wrapper function (JSONP). The callback function will be named according to the contents of the [callback] url parameter.

Request
/json/mediaclip/{id}?[callback]

Parameter Type Description
Required parameters    
{id} int The id of the media-clip
Optional parameters    
[callback] string The desired name of the callback (JSONP).

Example
/json/mediaclip/1120920

[json]
{
    id: "1120920",
    type: "MediaClip",
    mediatype: "video",
    fitmode: "none",
    usetype: "editorial",
    sourcetype: "on_demand",
    originalfilename: "BBW_Final_H264_single_korter.mov",
    length: "285",
    sourceid: "",
    title: "Blue Billywig Strategic Online Video",
    description: "Net zo gemakkelijk video op een website zetten als een plaatje.",
    deeplink: "http://www.bluebillywig.com",
    gendeeplink: "",
    copyright: "Blue Billywig",
    author: "Blue Billywig",
    status: "published",
    publicationid: "1",
    createddate: "2011-03-02T16:24:29Z",
    updateddate: "2011-03-02T16:50:44Z",
    publisheddate: "2011-03-02T16:29:35Z",
    date: {
        created: "Wed, 02 Mar 2011 17:24:29 +0100",
        updated: "Wed, 02 Mar 2011 17:50:44 +0100",
        published: "Wed, 02 Mar 2011 17:29:35 +0100"
    },
    src: "/bb/media/2011/03/02/1120920.mov",
    cat: [
        "blue billywig",
        "online video platform",
        "vms",
        "video streaming"
    ],
    thumbnails: [
        {
            src: "/bb/media/2011/03/02/1299083083056283/1299083083056283_116.jpg",
            width: "640",
            height: "360",
            main: "false"
        }
    ],
    assets: [
        {
            mediatype: "MP4_MAIN",
            src: "/bb/media/2011/03/02/asset-1299083083421265.mp4",
            length: "285",
            width: "360",
            height: "200",
            bandwidth: "200"
        },
        {
            mediatype: "MP4_HD",
            src: "/bb/media/2011/03/02/asset-1299083192232962.mp4",
            length: "285",
            width: "1280",
            height: "720",
            bandwidth: "2000"
        }
    ],
    subtitles: null,
    nametags: null,
    exports: [
        {
            id: "65539",
            prio: "",
            createddate: "2012-12-04T13:07:43Z",
            updateddate: "2012-12-04T13:07:43Z",
            publisheddate: false,
            status: "exported",
            message: "",
            externalid: "",
            externalviews: "0",
            exportchannel: {
                id: "235",
                type: "ExportChannel",
                name: "BBFBpage",
                exportsystemid: "3",
                exportsystemname: "Facebook",
                authtokenid: "178",
                status: "active",
                fbpagename: "Blue Billywig",
                fbpageid: "266122176736872",
                playout: "VidCompare",
                config: {
                    fbpagename: "Blue Billywig",
                    fbpageid: "266122176736872",
                    playout: "VidCompare"
                }
            }
        }
    ],
    timelines: null
}

XML

Full metadata and asset references export in XML format.

See chapter [[media_content_types]] for a full description of the formatted content.
There are no required or optional parameters.

Request
/mediaclip/{id}.xml

Parameter Type Description
Required parameters    
{id} int The id of the media-clip

Direct call to asset

Redirect directly to one of the media-clips assets. A HTTP 302 response will take care of the actual redirect.

This uri should be called with a clip id and a mediatype which can be any one of: * MP4_IPOD : video format supported on iPhone (3g+), iPod Touch, iPad 1, most * MP4_MAIN: Standard Definition version (typically 720x400@1.2Mbps) * MP4_HD: High Definition version (typically 1280x720@2Mbps)
Note: {mediatype} is case sensitive

Request
/mediaclip/{id}/redirect/{mediatype}

Parameter Type Description
Required parameters    
{id} int The id of the media-clip
{mediatype} string MP4_IPOD, MP4_MAIN OR MP4_HD

Example

[CLI]
#!/bin/bash
     wget http://bb.bbvms.com/mediaclip/1114195/redirect/MP4_HD  
--2013-10-03 16:36:40--  http://bb.bbvms.com/mediaclip/1114195/redirect/MP4_HD
Resolving bb.bbvms.com (bb.bbvms.com)... 217.115.196.80
Connecting to bb.bbvms.com (bb.bbvms.com)|217.115.196.80|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://d2rvackbgybhru.cloudfront.net/bb/media/2013/07/24/asset-1374675163357241.mp4 [following]
--2013-10-03 16:36:41--  http://d2rvackbgybhru.cloudfront.net/bb/media/2013/07/24/asset-1374675163357241.mp4
Resolving d2rvackbgybhru.cloudfront.net (d2rvackbgybhru.cloudfront.net)... 54.230.128.15, 54.230.129.56, 54.230.129.101, ...
Connecting to d2rvackbgybhru.cloudfront.net (d2rvackbgybhru.cloudfront.net)|54.230.128.15|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43024619 (41M) [video/mp4]
Saving to: `MP4_HD'

Image resizer

The media-clip image resizer can be used to fetch an automatically resized main thumbnail image of the specified media-clip.
URI Structure: /mediaclip/{id}/pthumbnail/{width}/{height}.{extension} Where {id} is the id of a publicly available (i.e. the clip will need to be published) media-clip
and {width} is either default or the desired width in pixels. Both {width} and {height} can be set to default, which means the original size will be used.
For automatically generated thumbnails (through the VMS transcoding backend) the default resolution is 1920x1080. If the source video has a lower resolution than 1920x1080, thumbnails will use that resolution as a max. Aspect ratio is automatically calculated to fit the measurements of the source material. {extension} can be set to either jpg or png. If the original image is a png image with alpha channel transparency, the transparency layer is preserved in the resized result.

Request
/mediaclip/{id}/pthumbnail/{width}/{height}.{extension}?[playButton]

Parameter Type Description
Required parameters    
{id} int The id of the media-clip
{width} int Desired width in pixels or "default"
{height} int Desired height in pixels or "default"
{extension} string Desired file extension: png or jpg
optional parameters    
[playButton] boolean Show a play button on the thumbnail.

 

Example
http://bb.bbvms.com/mediaclip/2079210/pthumbnail/default/default.jpg

QR Code generator

The QR Code generator automatically generates a QR Code of the media-clip deeplink.

If the deeplink field is filled and starts with a valid http/https protocol identifier, the contents of this field are used. Otherwise, if a deeplink generator is configured (see VMS User Manual - Settings)., the generated deeplink url is used.

Request
/mediaclip/{id}-qrcode.png

Parameter Type Description
Required parameters    
{id} int The id of the media-clip

Example
http://bb.bbvms.com/mediaclip/1120920-qrcode.png