WordPress.org

Ready to get started?Download WordPress

Forums

Video Thumbnails
[resolved] Youtube Thumbnail Has Black Bars (9 posts)

  1. bsetter
    Member
    Posted 1 year ago #

    The auto generated thumbnails from youtube are being super weird.... they all have a the letterbox black bars at the top and bottom..... It's almost like the plugin is not detecting the native size of the video file when it generates the thumbnail... see image: http://dl.dropbox.com/u/100959/bon-iver-continues-making-beautiful-music.jpeg

    Am I doing something wrong?

    http://wordpress.org/extend/plugins/video-thumbnails/

  2. bsetter
    Member
    Posted 1 year ago #

    .....And it looks like the plugin is grabbing the 4:3 thumbnail rather than the 16:9 thumbnail.

  3. bsetter
    Member
    Posted 1 year ago #

    If I change this line of code in the plugin:
    $youtube_thumbnail = 'http://img.youtube.com/vi/' . $matches[1] . '/0.jpg';

    to:

    $youtube_thumbnail = 'http://img.youtube.com/vi/' . $matches[1] . '/maxresdefault.jpg';

    it fixes the problem but uses a HUGE image file. Is there any other way to maintain 16x9?

  4. bsetter
    Member
    Posted 1 year ago #

    Just discovered that this only kind of works..... some of the videos don't have this maxresdefault.jpg image..... what to do, what to do?

  5. bsetter
    Member
    Posted 1 year ago #

    One final thought.... would it be possible to alter the plugin so that if the maxresdefault.jpg does not exist then downgrade to the 0.jpg image file? I'm not sure how to write that php though....

  6. Sutherland Boswell
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, this is something mentioned in the FAQ because YouTube has seemed to slack on changing their thumbnail format. The maxresdefault.jpg must be a new addition, but I think there could be a check for it like you suggested, thanks for the discovery!

    As a side note, even if you look at YouTube.com's source you can see that they're just clipping the 4:3 images to 16:9. This is basically what I do to all thumbnails on my sites.

  7. bsetter
    Member
    Posted 1 year ago #

    Dumb youtube.... those lazies...

    Thanks for getting back to me.... and if you feel so inclined to writ a little check code for the maxredefault.jpg that'd be nifty!

  8. Sutherland Boswell
    Member
    Plugin Author

    Posted 1 year ago #

    Haven't tested it yet, but the code for this is now waiting in version 2.0.

  9. schwarzgrau
    Member
    Posted 1 year ago #

    I tried to fix that by using on wp_get_image_editor(); and resizing and cropping the image, but to be honest I'm just botching around and try alot of stuff but just getting errors.
    Nice to hear you already added code for this to the beta of 2.0 is there any way I could be beta-tester?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic