Wednesday, January 4, 2012

[YouTube-API] Re: Youtube thumbnail is stretched

Hello Noppanit,

There's no way to specify the desired aspect ratio that you want for
a YouTube thumbnail. They're all generated in a fixed 4:3 aspect ratio
at this time.

If you need to display the thumbnail in a different aspect ratio,
like 16:9, you could use CSS to position the thumbnail within a parent
container on your web page so that the top and bottom are cropped.
This is what's done on the YouTube home page, for instance.

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Jan 1, 9:42 am, Noppanit Charassinvichai <noppani...@gmail.com>
wrote:
> I'm using this URL to get the thumbnail for youtube video. <img
> src="http://img.youtube.com/vi/KCm27AQwcCo/2.jpg">
>
> But It's fixed in size and if I specify the width and height, the image
> it's a stretched out a bit. It's there a better way to get thumbnail image
> from youtube video?
>
> Thanks a lot.

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment