Downloading a thumbnail of a Youtube video on Linux is very easy. This can be done using the youtube-dl script.
Use this youtube-dl command to list all thumbnails for this video.
┌─[jason@jason-desktop]─[~/Pictures] └──╼ $youtube-dl https://www.youtube.com/watch?v=0ttKUEI3rtM --list-thumbnails [youtube] 0ttKUEI3rtM: Downloading webpage [info] Thumbnails for 0ttKUEI3rtM: ID width height URL 0 168 94 https://i.ytimg.com/vi/0ttKUEI3rtM/hqdefault.jpg?sqp=-oaymwEYCKgBEF5IVfKriqkDCwgBFQAAiEIYAXAB&rs=AOn4CLCtzil9D33ps4rh6SWgoECSwl7PZg 1 196 110 https://i.ytimg.com/vi/0ttKUEI3rtM/hqdefault.jpg?sqp=-oaymwEYCMQBEG5IVfKriqkDCwgBFQAAiEIYAXAB&rs=AOn4CLCPj_d1h_7bs8azJXFn90vSxtoyyA 2 246 138 https://i.ytimg.com/vi/0ttKUEI3rtM/hqdefault.jpg?sqp=-oaymwEZCPYBEIoBSFXyq4qpAwsIARUAAIhCGAFwAQ==&rs=AOn4CLBJ0XW0EGdmNdPyjzK8qSnJ7_hMKA 3 336 188 https://i.ytimg.com/vi/0ttKUEI3rtM/hqdefault.jpg?sqp=-oaymwEZCNACELwBSFXyq4qpAwsIARUAAIhCGAFwAQ==&rs=AOn4CLDfWC_JQ_2d_EO4BH0eN7EVEL5Jaw 4 1920 1080 https://i.ytimg.com/vi_webp/0ttKUEI3rtM/maxresdefault.webp |
Then use wget to download the thumbnail URL you wish to use. Or use this example below and do it all in one go.
┌─[jason@jason-desktop]─[~/Pictures] └──╼ $youtube-dl -i --no-warnings --get-thumbnail https://www.youtube.com/watch?v=0ttKUEI3rtM | wget -i - --2020-10-05 09:19:05-- https://i.ytimg.com/vi_webp/0ttKUEI3rtM/maxresdefault.webp Resolving i.ytimg.com (i.ytimg.com)... 142.250.71.86, 2404:6800:4006:80a::2016 Connecting to i.ytimg.com (i.ytimg.com)|142.250.71.86|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 106208 (104K) [image/webp] Saving to: 'maxresdefault.webp.1’ maxresdefault.webp.1 100%[==========================================================================================================================>] 103.72K --.-KB/s in 0.05s 2020-10-05 09:19:05 (2.06 MB/s) - 'maxresdefault.webp.1’ saved [106208/106208] FINISHED --2020-10-05 09:19:05-- Total wall clock time: 1.8s Downloaded: 1 files, 104K in 0.05s (2.06 MB/s) |
Then use this command to convert the webp image to png.
┌─[jason@jason-desktop]─[~/Pictures] └──╼ $convert maxresdefault.webp maxresdefault.png |
This is very easy to do and makes downloading Youtube thumbnails very simple.