본문 바로가기

Story/html/css

유튜브(YouTube) 동영상에서 썸네일(Thumbnail) 이미지 가져오기

반응형

How To Get YouTube Thumbnail Images

How To Download A Thumbnail Image From YouTube

There are a few different ways that you can get thumbnails from a YouTube video, one of which is to use YouTube's Video API to extract the thumbnail. YouTube API responses may contain multiple thumbnail images for a video, each of which is identified by a <media:thumbnail> tag. Creating a call to YouTube to get the video and thumbnail information can take some time and when you are like me and don't know a think about writing code, then the API is relatively useless. For me, I needed a simple way to pull down a thumbnail and thankfully, there is a simple way to do this.




위 동영상 소스 는 다음과 같다. 여기서 진한 부분이 video_id

http://youtu.be/DVbfTjeIeIs 

또는

<object width="480" height="360"><param name="movie" value="http://www.youtube.com/v/DVbfTjeIeIs?version=3&amp;hl=ko_KR&amp;rel=0&amp;autoplay=1"><param name="allowFullScreen" value="true"><param name="allowscriptaccess" value="always"><embed height="360" type="application/x-shockwave-flash" width="480" src="http://www.youtube.com/v/DVbfTjeIeIs?version=3&amp;hl=ko_KR&amp;rel=0&amp;autoplay=1" allowscriptaccess="always" allowfullscreen="true"></object>

 

Here is the YouTube URL format that you will need in order to view and download a thumbnail from a YouTube video:

http://img.youtube.com/vi/VIDEO_ID/#.jpg

... where for the video example above, VIDEO_ID=bQVoAWSP7k4 and # (1,2, or 3) corresponds to one of the 3 thumbnails that YouTube automatically generates.

#2, is the default thumbnail, or the one that the owner ends up choosing for their video.

Using this convention, below are the URLs and the thumbnails that I was able to pull off of YouTube for the "wedding proposal" video from Jeremy's post.

1st Thumbnail Image, Small (120x90)

http://img.youtube.com/vi/DVbfTjeIeIs/1.jpg

1 Quick Tip: How To Get YouTube Thumbnail Images

3rd Thumbnail Image, Small (120x90)

http://img.youtube.com/vi/DVbfTjeIeIs/3.jpg

3 Quick Tip: How To Get YouTube Thumbnail Images

2nd | Default Thumbnail Image, Small (120x90)

http://img.youtube.com/vi/DVbfTjeIeIs/2.jpg

2 Quick Tip: How To Get YouTube Thumbnail Images

Default Thumbnail Image, Full-Size (480x360)

http://img.youtube.com/vi/DVbfTjeIeIs/0.jpg

0 Quick Tip: How To Get YouTube Thumbnail Images



asdasd

 

출처 : http://www.reelseo.com/youtube-thumbnail-image/

반응형