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

[Feature Request] Download Video File Size #894

Open Marshall-Brooks opened 9 years ago

Marshall-Brooks commented 9 years ago

I discovered YouTubeCenter after YouTubeOptions went support-based.

One nice thing with YTO was file size on the download menu - for instance - I might see:

MP4 1280x760 - 45M 640x480 - 24M FLV 320x240 - 5M

This made it easy to evaluate file size when selecting a download option.

With YTC, the only option I know is the start the download and then see how big the file is - then start a download at a different resolution and see how big that file is.

Yonezpt commented 9 years ago

I don't think this is possible anymore via javascript. From what I have seen in the other youtube download add-ons they no longer show the file-size, I suspect youtube changed the http settings to deny the access to the content-length (file size) header. The only way this can be achieved is by using a 3rd party access which can bypass that limitation and return the sizes, such as a php script.

Marshall-Brooks commented 9 years ago

Okay - that makes sense. It was a useful feature - thanks at least for looking into it and responding!!!

Yonezpt commented 9 years ago

@Tiger-Heli Just discovered a way that it can be done due to the freedom of the add-on itself (greasemonkey, for example) which allows a script to access the data the browser received and interpret it fully, in essence it bypasses cross-domain restrictions.

@YePpHa If you are interested and if you didn't know this already, the feature in greasemonkey that makes this possible is http://wiki.greasespot.net/GM_xmlhttpRequest So there's most likely also a feature in the firefox add-on interface that allows for the same objective.

Marshall-Brooks commented 9 years ago

I didn't follow any of that except that a future build of YTC "might" be able to re-enable this, but then, that's good enough for me.

Thanks!

Yonezpt commented 9 years ago

@Tiger-Heli It's totally doable, I have been testing it and works really well for what you requested. I am sure YePpHa will implement this, but not before having a stable version ready for release when the most important stuff is polished.