mps-youtube / yewtube

yewtube, forked from mps-youtube , is a Terminal based YouTube player and downloader. No Youtube API key required.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: sixel thumbnails

porterdcarnegie opened this issue · comments

I would like sixel video thumbnails in mps-youtube, wouldn't it be great?

Sixel: https://en.wikipedia.org/wiki/Sixel

There are many hiccups involved in this.

  1. PySixel is not compatible with python >= 3.7 saitoha/PySixel#4 and there is no other actively maintained python library to render sixel images in terminal.
  2. I've tried chafa (it doesn't uses sixel standard) and it works fine but the problem is yewtube will have to download thumbnails of all videos being shown in search result page (at least 10 videos on a single page). This will take time to render the results as downloading a single thumbnail takes around 20 secs (see output below). We can use async / await may be.
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: thumbnail.png.webp
[dashsegments] Total fragments: 2
[download] Destination: thumbnail.png.f247.webm
[download] 100% of   11.89MiB in 00:00:19 at 624.12KiB/s
[dashsegments] Total fragments: 1
[download] Destination: thumbnail.png.f251.webm
[download] 100% of    4.34MiB in 00:00:07 at 597.26KiB/s
[Merger] Merging formats into "thumbnail.png.webm"
Deleting original file thumbnail.png.f251.webm (pass -k to keep)
  1. With youtube-dl / yt-dlp you can only download thumbnails in .webp format (correct me if i am wrong). So, we need to convert .webp to either .png or .jpeg if you want them to use in terminal. This will take even more time and eventually affecting user experience.

Closing issue for now so that i can focus on other issues. If somebody comes up with a good solution we can rethink about this.

Cheers!

Edit: typos