All the videos in your account have a thumbnail associated with them.
The location of the thumbnail can be found by grabbing the metadata for a video. It should look something like this:
You can resize the returned thumbnail image by tacking on extra width and/or height parameters to this address. For example, this would force the width to 120 pixels:
If you provide only a width parameter or only a height parameter, the thumbnail will be scaled such that its aspect ratio is preserved. If you provide both, it will be "squished" to fit the sizes you provide.
In addition to resizing, you can also overlay an image on top of your thumbnail (for example, to add a play button or watermark) by specifying an overlay[src] parameter that contains the url to the overlay image. If you include this parameter in the url for the thumbnail, be sure to properly encode it!
For example, if your overlay image is located at http://mysite.com/overlay.png, you'd add it to your thumbnail like so:
This feature works with JPEG, GIF, and PNG images. PNGs are especially nice because they let you use alpha transparency.
You can also control where the overlay is positioned on the thumbnail, using the optional overlay[align] parameter. This can take the following values: center, top, bottom, left, right, topleft, topright, bottomleft, and bottomright (the default is center).
Since overlay images are not located on SesameVault servers, adding them to your thumbnails may significantly increase the time it takes to create and deliver the image (i.e. SesameVault has to grab the overlay image from the remote server before it can add it to the thumbnail).
Because of this, you have the option to tell SesameVault to cache your thumbnails after they are generated.
To do this, simply add the cache=1 parameter onto the thumbnail URL. This will ensure that the thumbnail will not be regenerated from scratch every time a request is made (unless you change one or more of the parameters such as height, width, overlay, etc). For this reason, we highly recommended that you use caching.
If you need to empty a video's thumbnail cache (for example, if you change the overlay image but don't want to change the url that points to it), call /video/empty_thumbnail_cache. For example:
By default, thumbnails are taken from a random frame of the video. You can explicitly set the thumbnail by calling /video/make_thumbnail with a timecode parameter (that represents the number of seconds into the video the thumbnail is pulled from). For example:
Which grabs the frame located 5 seconds into the video, generates a thumbnail from it, and returns the thumbnail profile information:
<thumbnail>
<video_track>true</video_track>
<audio_track>false</audio_track>
<size>32934304</size>
<uris>
<http>http://www.sesamevault.com/video/[VIDEO ID]/thumbnail/file</http>
</uris>
<success>true</success>
<ready>true</ready>
<height>144</height>
<width>240</width>
<duration>5.0</duration>
<md5>1052552c05ca4a3ac00b124c17ab82d3</md5>
<date_added>2007-10-08T16:24:35-04:00</date_added>
</thumbnail>