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.
Omitting the profile returns the poster frame (or first frame if no poster has been set):
Use multiple <source> tags to provide format fallbacks for different browsers:
Serving video over HTTPSLink copied!
Add protocol=https to the video URL:
protocol=https can also be set in your account root template.
Video thumbnailsLink 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 frameLink copied!
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:
Return specified thumbnailLink copied!
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:
Video metadataLink copied!
Returns metadata for all or a specific transcode profile. Common parameters for all metadata formats:
| Parameter | Description |
|---|---|
qual | Whether video URLs in the response are fully qualified. Default: true |
profile | Return metadata for the specified profile only |
JSONP formatLink copied!
Returns video metadata as JSON wrapped in a JSONP callback.
Additional parameters:
| Parameter | Description |
|---|---|
func | Name of the JSONP callback function |
arg | Optional argument passed to the callback function |
ExampleLink copied!
JSON formatLink copied!
ExampleLink copied!
XML formatLink copied!
ExampleLink copied!
Text formatLink copied!
ExampleLink copied!
SitemapLink copied!
Generates a sitemap from the video metadata.
ExampleLink copied!
Generating HTML video embedsLink copied!
Append .html to a video URL to return a complete HTML page containing <video> tags with <source> elements for each transcode profile.
ExampleLink copied!
The following query parameters customise the generated HTML:
| Parameter | Type | Default | Description |
|---|---|---|---|
preload | auto | metadata | none | auto | Controls browser preload behaviour |
loop | boolean | false | Loops the video continuously |
controls | boolean | true | Shows player controls |
autoplay | boolean | false | Starts playback on page load |
resize | boolean | true | Resizes the video to fit the screen |
snippet | boolean | false | Returns only the <video> tag instead of a full HTML page |
bitrate | integer | - | Selects the profile with the closest matching bitrate |
width | integer | - | Width of the video in pixels |
height | integer | - | Height of the video in pixels |
css | string | - | Style attributes applied to the <video> tag |
bodyCSS | string | - | Style attributes applied to the <body> tag |