Kethsar / ytarchive

Garbage Youtube livestream downloader
MIT License
1.04k stars 86 forks source link

WebP format thumbnail support #129

Closed dreammu closed 10 months ago

dreammu commented 1 year ago

Hi! I've been using this great tool for a while. I'm here for a feature request. There are two formats of thumbnails on YouTube's server, one is jpg and one is webp. Compared to jpg, webp generally provides better photo qualities along with smaller sizes. Could you provide an option to download webp thumbnail instead of jpg thumbnail? Further more, it would be nicer if you provide an option like yt-dlp's --convert-thumbnails FORMAT to convert it to png. I'm a code idiot. I would appreciate it if you can support it in your spare time. Thank you for your great work!

Kethsar commented 1 year ago

Could you provide an option to download webp thumbnail instead of jpg thumbnail?

Should be doable. Worst case mp4 doesn't support webp for embedded thumbnails and I have to force mkv when set.

Further more, it would be nicer if you provide an option like yt-dlp's --convert-thumbnails FORMAT to convert it to png.

This one I am more against. Why? Converting lossy to lossless is never a good idea. At best the image stays the same size but now might be confused for a lossless image. At worst it bloats the file size for absolutely 0 gain. I checked to make sure and the webp thumbnails are still lossy, if a much better quality than the jpg ones. But converting them to png still doesn't make sense.

dreammu commented 1 year ago

In yt-dlp, webp thumbnail will be converted to png to make it embedded in mp4. Forcing mkv when set may be a good choice, but I think mp4 is more compatible. So I'd be more than happy to see that there is an option to convert it to png and embed it in mp4. But if you don't think it makes sense, you can choose not to support it, just merging the output files as mkv is enough. Thank you for your replying!