Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: sixel thumbnails #1196

Closed
porterdcarnegie opened this issue May 11, 2022 · 1 comment
Closed

feature: sixel thumbnails #1196

porterdcarnegie opened this issue May 11, 2022 · 1 comment

Comments

@porterdcarnegie
Copy link

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

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

@iamtalhaasghar
Copy link
Contributor

iamtalhaasghar commented Mar 21, 2023

There are many hiccups involved in this.

  1. PySixel is not compatible with python >= 3.7 Python 3.7 build failure 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants