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

Get highest resolution possible thumbnail #1

Open
Iwaslazkis opened this issue Nov 21, 2021 · 2 comments
Open

Get highest resolution possible thumbnail #1

Iwaslazkis opened this issue Nov 21, 2021 · 2 comments

Comments

@Iwaslazkis
Copy link
Owner

Currently, the extension only looks for the HQ quality thumbnail:

"mpris:artUrl": `https://i.ytimg.com/vi/${id}/hqdefault.jpg`,

Some videos don't have a thumbnail at that quality, and others have better quality thumbnails. It'd be nice to pick out the highest quality one possible.

@Iwaslazkis
Copy link
Owner Author

It seems that i.ytimg.com returns a 404 status code along with a grey box image when the corresponding thumbnail resolution doesn't exist; perhaps we can have the browser query the each possible resolution in descending order and take whichever one return a 200 status code first?

@Iwaslazkis
Copy link
Owner Author

From this short article, it seems that these are all the available resoltutions for the thumbnail:

  1. https://i.ytimg.com/vi/<video_id>/default.jpg
    Dimensions: 120x90
    This is the default resolution (lowest available).

  2. https://i.ytimg.com/vi/<video_id>/mqdefault.jpg
    Dimensions: 320x180
    This is called a medium size thumbnail.

  3. https://i.ytimg.com/vi/<video_id>/hqdefault.jpg
    Dimensions: 480x360
    This is called a high size thumbnail.

  4. https://i.ytimg.com/vi/<video_id>/sddefault.jpg
    Dimensions: 640x480
    This is called a standard size thumbnail.

  5. https://i.ytimg.com/vi/<video_id>/maxresdefault.jpg
    Dimensions: 1280x720
    This is the maximum resolution available.

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

1 participant