Skip to main content

Video

Serve a transcoded video over HTTPS, pull a poster frame or a named thumbnail out of it, retrieve its metadata, and generate the HTML needed to embed it in a page.

Base URL pattern

The parameters on this page are appended to a Dynamic Media image URL. For the URL pattern and how parameters chain together, see the Media Delivery API guide.

Video assets are accessed by including the transcode profile name in the URL path.

GET /v/{account}/{videoName}/{profile}
https://cdn.media.amplience.net/v/ampproduct/winter-coat/mp4_720p

Omitting the profile returns the poster frame (or first frame if no poster has been set):

https://cdn.media.amplience.net/v/ampproduct/winter-coat

Use multiple <source> tags to provide format fallbacks for different browsers:

<video controls>
<source src="https://cdn.media.amplience.net/v/ampproduct/winter-coat/webm720p" type="video/webm" codecs="vp8, vorbis">
<source src="https://cdn.media.amplience.net/v/ampproduct/winter-coat/mp4_720p" type="video/mp4" codecs="h264, aac">
<source src="https://cdn.media.amplience.net/v/ampproduct/winter-coat/mp4_480p" type="video/mp4" codecs="h264, aac">
</video>

Serving video over HTTPS
Link copied!

Add protocol=https to the video URL:

https://cdn.media.amplience.net/v/ampproduct/ski-collection/mp4_720p?protocol=https

protocol=https can also be set in your account root template.

Video thumbnails
Link copied!

When video is ingested to the Amplience DAM, 100 thumbnails are generated at regular intervals. Standard image manipulation parameters can be applied to thumbnails.

When video is ingested, 100 thumbnails are generated at evenly spaced intervals, indexed frame_0000 to frame_0099. The interval is the video duration divided by 100, so it depends on the length of the video - for a 9 minute video the thumbnails are roughly 5 seconds apart, for a 30 second video roughly 300ms apart. frame_0000 is the first frame and frame_0099 is at 99% of the duration, so there is no thumbnail of the final frame. Standard image manipulation parameters can be applied to thumbnails. The video metadata response lists every thumbnail with its exact time offset in milliseconds.

Return poster frame
Link copied!

GET /v/{account}/{videoName}

Returns the poster frame. If no poster frame has been set, returns the first generated thumbnail. Append an image extension (.png, .jpg) to set the output format, and apply image parameters as usual:

https://cdn.media.amplience.net/v/ampproduct/ski-collection.jpg?h=400
Try it...
400

Return specified thumbnail
Link copied!

GET /v/{account}/{videoName}/thumbs/{frame}

Returns a specific thumbnail by frame index.

The frame index is part of the URL path - in the URL bar below edit frame_0020 to any index from frame_0000 to frame_0099 to view generated thumbnails:

https://cdn.media.amplience.net/v/ampproduct/ski-collection/thumbs/frame_0020.jpg?h=400
Try it...
400

Video metadata
Link copied!

Returns metadata for all or a specific transcode profile. Common parameters for all metadata formats:

ParameterDescription
qualWhether video URLs in the response are fully qualified. Default: true
profileReturn metadata for the specified profile only

JSONP format
Link copied!

GET /v/{account}/{videoName}.js

Returns video metadata as JSON wrapped in a JSONP callback.

Additional parameters:

ParameterDescription
funcName of the JSONP callback function
argOptional argument passed to the callback function

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/ski-collection.js?profile=webm-720p

JSON format
Link copied!

GET /v/{account}/{videoName}.json

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/ski-collection.json?profile=webm-720p

XML format
Link copied!

GET /v/{account}/{videoName}.xml

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/ski-collection.xml?profile=webm-720p

Text format
Link copied!

GET /v/{account}/{videoName}.txt

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/ski-collection.txt?profile=webm-720p

Sitemap
Link copied!

GET /v/{account}/{videoName}.sitemap

Generates a sitemap from the video metadata.

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/ski-collection.sitemap

Generating HTML video embeds
Link copied!

Append .html to a video URL to return a complete HTML page containing <video> tags with <source> elements for each transcode profile.

GET /v/{account}/{videoName}.html

Example
Link copied!

https://cdn.media.amplience.net/v/ampproduct/winter-coat.html

The following query parameters customise the generated HTML:

ParameterTypeDefaultDescription
preloadauto | metadata | noneautoControls browser preload behaviour
loopbooleanfalseLoops the video continuously
controlsbooleantrueShows player controls
autoplaybooleanfalseStarts playback on page load
resizebooleantrueResizes the video to fit the screen
snippetbooleanfalseReturns only the <video> tag instead of a full HTML page
bitrateinteger-Selects the profile with the closest matching bitrate
widthinteger-Width of the video in pixels
heightinteger-Height of the video in pixels
cssstring-Style attributes applied to the <video> tag
bodyCSSstring-Style attributes applied to the <body> tag

Examples
Link copied!

https://cdn.media.amplience.net/v/ampproduct/winter-coat.html?loop=true
https://cdn.media.amplience.net/v/ampproduct/winter-coat.html?bitrate=400
https://cdn.media.amplience.net/v/ampproduct/winter-coat.html?css=background-color:red