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

[YouTube] Return mqdefault thumbnails in fast feed #927

Merged
merged 1 commit into from
Sep 19, 2022

Conversation

Stypox
Copy link
Member

@Stypox Stypox commented Sep 13, 2022

The hqdefault thumbnails, which are returned by default by the fast feed extractor, have black bars at the top and at the bottom, and are thus not optimal. So this PR just replaces hqdefault with mqdefault: it seems to work well without issues after some testing, and unlike highresdefault the mqdefault thumbnail always exists according to this SO. This fixes the problem with black bands in NewPipe: TeamNewPipe/NewPipe#8890 (comment)

Debug apk: app-debug.zip
Both me (Stypox) and a user tested the apk and it works. All thumbnails load.

@Stypox Stypox changed the title [YouTube] Return maxresdefault thumbnails in feed [YouTube] Return mqdefault thumbnails in feed Sep 13, 2022
The hqdefault thumbnails, which are used by default, have black bars at the top and at the bottom, and are thus not optimal.
@Stypox Stypox changed the title [YouTube] Return mqdefault thumbnails in feed [YouTube] Return mqdefault thumbnails in fast feed Sep 13, 2022
@opusforlife2
Copy link
Collaborator

"mq" sounds like "medium quality". Is that the case? If so, do we want to lower the resolution like that? Also, will this still be needed after Audric's image PR?

@Stypox
Copy link
Member Author

Stypox commented Sep 17, 2022

See the discussion on IRC. The answers are: yes, yes and yes. It is better to have a medium quality thumbnail without black bars than a high quality one with black bars. Also, this is a change just to the fast feed extractor, for which it is expected that some information might be missing, so we should try our best to get the most out of the information we can (the black bars look very ugly). This will still be needed after AudricV's PR since this PR does not extract a new type of image URL, but rather generates such URL (which is something AudricV's PR doesn't do with youtube (and it is the right thing to do, generally)).

@Stypox
Copy link
Member Author

Stypox commented Sep 19, 2022

I'm merging this for now. If there are better solutions in the future, it's not difficult to revert this small PR.

@Stypox Stypox merged commit a99af9b into TeamNewPipe:dev Sep 19, 2022
@TobiGr TobiGr added the youtube service, https://www.youtube.com/ label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants