fdrdmg
Last Updated: July 17, 2017
·
59.53K
· citizenk

Get a thumbnail from a Vimeo video

Are you looking for a way of doing this with YouTube? Have a look over there: http://coderwall.com/p/nihgwq

Let's say you need an image preview of a Vimeo video., this one for instance: http://vimeo.com/9696328...

How do you proceed? Contrary to YouTube, Vimeo does not let you simply type an URL with some video ID string inserted in it and get an image out of it. Well, not really: there is a way...

The gritty details

Their Simple API will be your friend: http://developer.vimeo.com/apis/simple

More precisely, you will need to make a call like this:

http://vimeo.com/api/v2/video/VIDEOID.OUTPUT

VIDEOID is a string of numbers identifying the video you're interested in. You will simply find it in that video URL.

As for OUTPUT, you need to replace it with the file format you'd like to obtain. According to Vimeo's documentation, currently they support JSON, PHP and XML.

XML is quite interesting for our purpose (simply obtaining a thumbnail), since your browser will render it as text. What you want to do here, is put this in your address bar:

http://vimeo.com/api/v2/video/VIDEOID.xml

With the proper value for VIDEOID, you will obtain the information you're looking for.

So, for our example, if you type this into your address bar:

http://vimeo.com/api/v2/video/9696328.xml

you will get this in return:

<videos>
    <video>
        <id>9696328</id>
        [snip]
        <thumbnail_small>http://b.vimeocdn.com/ts/487/543/48754357_100.jpg</thumbnail_small>
        <thumbnail_medium>http://b.vimeocdn.com/ts/487/543/48754357_200.jpg</thumbnail_medium>
        <thumbnail_large>http://b.vimeocdn.com/ts/487/543/48754357_640.jpg</thumbnail_large>

And right there you have three thumbnails/preview images you can now download!

thumbnail_small will give you a 100x75 thumbnail:

Picture

thumbnail_medium will give you a slightly bigger 200x150 one:

Picture

And thumbnail_large goes to 11 by giving you a humongous 640x476 preview image:

Picture

Bringing it further

How best you could use Vimeo's Simple API to automate this process will be left as an exercise to the reader. For our initial purposes (obtaining a video preview image you can use), this will do.

This is nothing revolutionary for most of you, but that question seemed to pop up from time to time in our activities. So, here it is for our reference, and if this can also help one of you, then all the better!

Have fun!