Problem/Motivation

This seems to be a problem in both versions.

Proposed resolution

Download a version of the thumbnail without black bars.

Remaining tasks

Patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sam152 created an issue. See original summary.

Sam152’s picture

The solution to this is http://i1.ytimg.com/vi/ID/maxresdefault.jpg, however this seems to work arbitrarily, not returning anything in some cases. The "mqdefault.jpg" seems to be the only one without the black bars, but isn't very high res.

Sam152’s picture

I've attached a simple table which compares the different thumbnails. mqdefault and maxresdefault are the only two that do not include black bars. maxresdefault also is not reliable, sometimes appearing, sometimes not. The issue with mqdefault is that it only appears at, 320x180, which is quite low resolution.

Possible solutions:

  • Only deal with smaller thumbs.
  • Allow some of the thumbs not to work.
  • Attempt to grab the high res thumb, then fall back to the smaller one.
Sam152’s picture

I couldn't see how, in this version of guzzle, to just get the headers instead of downloading the whole response.

Sam152’s picture

FileSize
50.69 KB
5.24 KB

In my test here are two of the thumbnails downloaded. One at the smaller size (where a large was not available) and one at the large size. Neither have black bars.

Status: Needs review » Needs work

The last submitted patch, 5: 2711323-download-multiple-youtube-sizes.patch, failed testing.

Sam152’s picture

There it is, example in install_check_localization_server. Doesn't hint for some reason.

Also, like this implementation better.

Status: Needs review » Needs work

The last submitted patch, 8: 2711323-download-multiple-youtube-sizes-7.patch, failed testing.

The last submitted patch, 8: 2711323-download-multiple-youtube-sizes-7.patch, failed testing.

The last submitted patch, 8: 2711323-download-multiple-youtube-sizes-7.patch, failed testing.

The last submitted patch, 8: 2711323-download-multiple-youtube-sizes-7.patch, failed testing.

The last submitted patch, 8: 2711323-download-multiple-youtube-sizes-7.patch, failed testing.

Sam152’s picture

  • Sam152 committed 4c01b41 on 8.x-1.x
    Issue #2711323 by Sam152: YouTube videos have black bars
    
Sam152’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

awm’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
FileSize
1.51 MB

I am getting black bars when using it but when I reference youtube maxresults directly I do not. See screenshot.

awm’s picture

nevermind I needed to remove the images from the files directory to have them re-generated.

hope this helps others .