Christian Heilmann

Getting all the video thumbnails from a YouTube video

Wednesday, January 11th, 2023 at 9:16 pm

I just wrote myself a small tool to get all the thumbnail images available for a YouTube video.

Say you have a Youtube URL, the ID is the last part: https://www.youtube.com/watch?v=GDukVqBDd3Q, in this case “GDukVqBDd3Q”. Just copy this into the tool and you will get all the images available. You can choose to get JPG or WebP images and you can click each to see it or right-click to save it.

Result of the scraper showing all the thumbnails of a video

If you feel like doing this by hand, here are the different URLs:

  • Player Background Thumbnail (480×360):
    • https://i.ytimg.com/vi_webp/VIDEO_ID/0.webp
    • https://i.ytimg.com/vi/VIDEO_ID/0.jpg
  • Video frames thumbnails (120×90)
    • Start: https//i.ytimg.com/vi_webp/VIDEO_ID/1.webp
    • Middle: https://i.ytimg.com/vi_webp/VIDEO_ID/2.webp
    • End: https//i.ytimg.com/vi_webp/VIDEO_ID/3.webp
    • Start: https//i.ytimg.com/vi/VIDEO_ID/1.jpg
    • Middle: https://i.ytimg.com/vi/VIDEO_ID/2.jpg
    • End: https//i.ytimg.com/vi/VIDEO_ID/3.jpg
  • Lowest quality thumbnail (120×90)
    • https://i.ytimg.com/vi_webp/VIDEO_ID/default.webp
    • https://i.ytimg.com/vi/VIDEO_ID/default.jpg
  • Medium quality thumbnail (320×180)
    • https://i.ytimg.com/vi_webp/VIDEO_ID/mqdefault.webp
    • https://i.ytimg.com/vi/VIDEO_ID/mqdefault.jpg
  • High quality thumbnail (480×360)
    • https://i.ytimg.com/vi_webp/VIDEO_ID/hqdefault.webp
    • https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg
  • Standard quality thumbnail (640×480)
    • https://i.ytimg.com/vi_webp/VIDEO_ID/sddefault.webp
    • https//i.ytimg.com/vi/VIDEO_ID/sddefault.jpg
  • Unscaled thumbnail resolution
    • https://i.ytimg.com/vi_webp/VIDEO_ID/maxresdefault.webp
    • https://i.ytimg.com/vi/VIDEO_ID/maxresdefault.jpg

Share on Mastodon (needs instance)

Share on Twitter

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

160: Graphs and RAGs explained and VS Code extension hacks Graphs and RAG explained, how AI is reshaping UI and work, how to efficiently use Cursor, VS Code extensions security issues.
159: AI pipelines, 10x faster TypeScript, How to interview How to use LLMs to help you write code and how much electricity does that use? Is your API secure? 10x faster TypeScript thanks to Go!
158: 🕹️ Super Mario AI 🔑 API keys in LLMs 🤙🏾 Vibe Coding Why is AI playing Super Mario? How is hallucinating the least of our worries and what are rules for developing Safety Critical Code?
157: CUDA in Python, Gemini Code Assist and back-dooring LLMs We met with a CUDA expert from NVIDIA about the future of hardware, we look at how AI fails and how to play pong on 140 browser tabs.
156: Enterprise dead, all about Bluesky and React moves on! Learn about Bluesky as a platform, how to build a React App and how to speed up SQL. And play an impossible game in the browser.

My other work: