YePpHa / YouTubeCenter

YouTube Center is a userscript designed to expand the functionality of YouTube. It includes the ability to download the video you're watching, auto selecting your preferred video quality and much more.
MIT License
2.89k stars 520 forks source link

YouTube Center identifies some videos as "470p" #877

Open seagull opened 10 years ago

seagull commented 10 years ago

Hi; Sorry if I'm missing something, but I wasn't aware 470p was an established resolution, let alone one that YouTube supports (576p anyone?)

Some videos from here are identifying as such.

Screenshot for verification.

YTC version: Dev v378 Windows 8.1, Chrome v37

Yonezpt commented 10 years ago

YePpHa is currently updating the add-on due to the recent youtube changes which are incompatible with some of the YTC features. As far as I know youtube does not support 576p or 470p so this is most likely a bug caused by the new changes.

I suspect that the 576p that you are mentioning is related to the recorded video being displayed in those videos, not related to a quality option in the player.

YePpHa commented 10 years ago

@seagull @Yonezpt YouTube Center loads the original width and height of the video from YouTube and sometimes YouTube reports that the highest quality is 576p or 470p.

If I remember correctly when I read the source code of YouTube's HTML5 player they were actually rounding the quality to the nearest quality standard (240p, 360p, 480p, 720p and 1080p). I could try to do the same to prevent this from happening, but I'm not quite sure if whether the quality is 576p or 470p in some cases.

I could make an option to round the quality to the nearest quality standard.

Yonezpt commented 10 years ago

@YePpHa A simple logic table just for the 480p and 720p return values should patch that issue then

(if quality == 470p)quality = 480p; (if quality == 576p)quality = 720p;