• I’m currently working on my portfoliosite, but for some reason I can not get vimeo-thumbnails to work with Vimeo.
    I’m not very advanced in php or other scripting languages so it’s hard for me to find out what’s going wrong here. What I do know is that more plugins that try to pull information from vimeo are having problems.
    Youtube is no problem, but I really want to use vimeo on this site.

    Can somebody maybe have a look and help me solve this problem!

    Here you can see the post with vimeo-embed getting the default thumbnail image and the post with the youtube embed not having trouble at all. http://test.berendvaneerde.nl/archives/category/geen-categorie”

Viewing 15 replies - 1 through 15 (of 31 total)
  • Checked the link, didn’t see anything wrong in there. I don’t use Vimeo on any site at the moment, but if you have a clear example case I can look into it for you.

    Thread Starter berendvaneerde

    (@berendvaneerde)

    Sorry,
    I updated the page with manual thumbnails already. An automatic call of thumbnails with video-thumbnails would absolutely be the best though.

    I changed it again for example.

    Now you can see the first two posts calling the default-image and the bottom one (being a youtube-post) getting the thumbnail from youtube.

    Thanks for looking into it!

    Which version of Video Thumbnails and which method of displaying the thumbs are you using? And which method of embedding the video? Did the plugin save the thumbnail and is only not able to show it, or is there a problem fetching the thumbnail from Vimeo?

    The newest Video Thumbnails 1.7.6 embeds Vimeo thumbnails on my site when I use the copy-paste embedding offered Vimeo, in the format

    <iframe src="http://player.vimeo.com/video/34134308?portrait=0&color=ff9933" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>

    This is matched by the plugin code on lines 160-163:

    // Find Vimeo embedded with iframe code
    			if(!isset($matches[1])) {
    				preg_match('#http://player.vimeo.com/video/([0-9]+)#s', $markup, $matches);
    			}

    There’s only one function that mentions the default.jpg at all, so I’m suspecting you might be using it to display the thumbs. The trick is I don’t see the code itself call it any time, so you’d be calling it straight from your own code. So far all plugins I’ve used to display Video Thumbnails’ images have done it succesfully through other methods. The code for this particular function starts from line 303:

    // Echo thumbnail
    function video_thumbnail($post_id=null) {
    	if( ( $video_thumbnail = get_video_thumbnail($post_id) ) == null ) { echo plugins_url() . "/video-thumbnails/default.jpg"; }
    	else { echo $video_thumbnail; }
    };

    The other plugins I mentioned, Better Related and Top 10 both check for the featured image of the post. Do you have that option set on your Video Thumbnails options? After checking and saving it, you might have to re-generate your thumbs to get the featured image set for each post.

    Thread Starter berendvaneerde

    (@berendvaneerde)

    According to the plugin it can not find the thumbnail as it says in the post-edit section after searching for a few seconds: “(We didn’t find a video thumbnail for this post. (be sure you have saved changes first)”

    So it is not saved as a featured image I guess.

    I’m embedding vimeo in my post like this:
    <iframe src="http://www.youtube.com/embed/9csYeNfHPx0?rel=0&hd=1" frameborder="0" width="560" height="315"></iframe>

    The link to the post (including the thumbnail that I’m calling as a background-image for a div) is written like this in the loop-category.php file with:

    <?php else : ?>
    			<a>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark" class="excerpt"><div id="portfolio"><div id="thumbnail" style="background-image:url('<?php video_thumbnail(); ?>')">
    </div><div id="thumbnailmeta"><h3 class="posttitle_category"><?php the_title(); ?></h3><?php the_excerpt(); ?></div></div></a>

    Now this seems to work for the posts where i’m embedding youtube but not for the ones with vimeo.

    The featured image should automatically be the thumbnail called from vimeo or youtube, right? As it is not finding the thumbnails from Vimeo those plugins are probably not the solution I think?

    It seems you accidentally pasted your Youtube embedding link instead of the appropriate Vimeo one πŸ˜‰

    Thread Starter berendvaneerde

    (@berendvaneerde)

    Ah… that was rather stupid.
    This is how it’s posted.

    <iframe src="http://player.vimeo.com/video/20639284?title=0&byline=0&portrait=0&color=a34700" frameborder="0" width="560" height="315"></iframe>

    Video Thumbnails sets the thumbnail it finds as the featured image of the post if this is chosen in the plugin settings. If you don’t see a Featured Image widget on your Edit Post page, that’s because your theme’s functions.php is missing something that luckily is easy to add: https://codex.wordpress.org/Post_Thumbnails

    With that you can see if the featured image is set or not. Even without that you already saw that something was wrong with getting the video thumbnail itself. If you post a Vimeo embed link that your Video Thumbnails 1.7.6 can’t get the link to I’ll give it a shot at my side. You have 1.7.6, right?

    Writing simultaneously πŸ™‚ My Video Thumbnails 1.7.6 got the thumbnail for that one correctly.

    Thread Starter berendvaneerde

    (@berendvaneerde)

    I indeed have Video Thumbnails 1.7.6 installed
    I also have the option to set a featured image on my Edit Post page.
    There are two sections on that page.

    Video Thumbnail:
    With the video thumbnail found from the embedded clip. Or in my case for post with Vimeoclips a link that tries to search for it but gives my the response that it couldn’t find one.

    Featured Image:
    Where the same thumbnail as under the Video Thumbnail section automatically comes up if it’s is found or (in my case for posts with vimeoclips) where I can manually select a featured image.

    When I embed a youtube in my post it will get the thumbnail from youtube and set it as a featured image as it should.

    Strange that the same embed gets the thumbnail on my blog but not on yours. Something in the blogs must be different, such as another plugin or theme, although it seems a bit far-fetched. Equally distant possibility would be something in the hosting environment blocking specifically Vimeo thumbnails – doesn’t sound likely. If possible, try with a different, preferably clean WordPress install in a different environment, or in your own blog with all other modules turned off and with the default theme.

    Thread Starter berendvaneerde

    (@berendvaneerde)

    I tried out the plugin on several (clean) sites with the same host. All fail in getting the thumbnails from vimeo. Also other plugins that try to pull information from vimeo (more than just an embed) are failing. What could be the problem here you think? Is it a permission thing? I just set up a localhost on my computer and when I try the plugin there it get’s a video-thumbnail! Good news for my theme, I guess that is allright.

    Still hope it’s fixable though… You think I should contact my hosters to see if they know what’s going on or do you have a solution?

    EDIT: For some reason this message got posted twice.

    So far the only common denominator for the failing seems to be the connection from your host to Vimeo. It could be something either at your host’s side, Vimeo’s side or in between. Do the embedded videos from Vimeo work so that the only thing failing is getting a thumbnail from them?

    The Vimeo API part is documented at http://vimeo.com/api/docs/simple-api under Making a Video Request. Video Thumbnails connects with the code line curl_setopt($ch, CURLOPT_URL, "http://vimeo.com/api/v2/video/$id.php"); that matches Vimeo’s http://vimeo.com/api/v2/video/video_id.output where “output” can be “json”, “php” or “xml”. From there it finds the contents of the field thumbnail_large.

    You can try making a request on your host’s command line to the same URL and see what happens. You can use wget, curl, lynx/links/elinks browser, PHP or anything you like. Just get a video id, for example use the one you pasted above: 20639284.

    For example on my host the command wget http://vimeo.com/api/v2/video/20639284.php got a HTTP response 200 (= file found, everything fine) and saved a file 20639284.php. You can use a text editor or grep to seek inside that file. grep thumbnail_large 20639284.php found a long line that includes the string s:15:"thumbnail_large";s:50:"http://b.vimeocdn.com/ts/132/102/132102854_640.jpg"; pointing to the URL of the thumbnail.

    wget --spider http://b.vimeocdn.com/ts/132/102/132102854_640.jpg on my host got a HTTP 200 OK response, so it finds the file no problem (–spider makes it not save the file, just get the response).

    If a connection to either server doesn’t work, you can try traceroute vimeo.com or traceroute b.vimeocdn.com (on Windows tracert instead of traceroute) to see the where the connection to that server fails. If you need to contact your system admin, these results can save him time in solving the situation – or you might found out it’s something you should ask in Vimeo API Forum instead.

    In case you want to use wget, grep and so forth on a Windows machine, get http://sourceforge.net/projects/unxutils/, unpack the archive to a folder and add that folder to your %PATH% environment variable in Control Panel > System > Additional Settings (or whatever it was in English) > Environment variables (or something like that) > System variables > Path where you find a semicolon (;) separated list of file system paths whose executable files are used everywhere on the command line (Start Menu -> Run -> cmd or hold Windows key and press R).

    This has saved me tons of time in web development. Writing this I also took the trouble of finding a list of all Windows key shortucts (and a more complete list of all Windows keyboard shortcuts that’s gonna save me even more time. For example I didn’t know before there’s a keyboard shortcut to show the desktop or bring up the Control Panel > System Properties window that is needed to visit every so often.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘[Plugin: Video Thumbnails] Vimeo thumbnails not found’ is closed to new replies.