Large

YouTube HD Ultimate

By Avindra V.G. Last update Dec 10, 2010 — Installed 420,875 times.

Development "builds" now available

in
Subscribe to Development "builds" now available 10 posts, 2 voices



Avindra V.G. Script's Author
FirefoxWindows

You can bookmark this page:

http://code.google.com/p/youtubehd/source/list

And stay on the bleeding edge of this script. Work since v.1.1.9 starts at r5.

If you want to contribute to the script, e-mail me and I'll add you to the project.

If you've already contributed code and I haven't already added you, please let me know here, with a link to a page showing your contribution.

 
sizzlemctwizzle Scriptwright
FirefoxWindows

Sweet. I'll try to contribute more.

I realize its rather large, but how would you feel about using GM_config for the script settings? We could definitely tear out most of the element creation code that we don't need and that would greatly reduce the size. I could probably get it down to three hundred lines, and if we trade that for the settings manager code that you already have there shouldn't be much of an increase. It's completely cross-browser now, and you can even get it to use the DOM for the settings window instead of an iframe. I, of course, would be willing to do the majority of this work myself since I'm familiar with the code base.

 
Avindra V.G. Script's Author
FirefoxWindows

sizzlemctwizzle wrote:
using GM_config for the script settings

As long as it doesn't differ much in look or feel, I wouldn't mind using GM_config. The biggest concern I have for the config block is the speed, since it's overlayed over the flash player. It can be extremely slow if you don't keep it simple.

 
sizzlemctwizzle Scriptwright
FirefoxMacintosh

Avindra V.G. wrote:
As long as it doesn't differ much in look or feel
I think I could make it look nearly the same.
Avindra V.G. wrote:
I wouldn't mind using GM_config.
Okay, I'll get started on it soon :)
Avindra V.G. wrote:
The biggest concern I have for the config block is the speed
I'll give it a shot and see how much I can trim down the code. It shouldn't be too difficult since the code is already heavily modularized.
Avindra V.G. wrote:
since it's overlayed over the flash player. It can be extremely slow if you don't keep it simple.
Hmmm... that's weird. I wonder why the flash player slows it down.

 
Avindra V.G. Script's Author
FirefoxWindows

sizzlemctwizzle wrote:
why the flash player slows it down

I'm using wmode=transparent, which lets you do things like overlay HTML elements over flash, scroll the page when the mouse is over the flash player, etc.

Two drawbacks of this are:

1) It's a little slow when you've got big blocks of HTML over the video.
2) The browser does not correctly redraw the elements, and you need to force the browser to redraw. Search for instances of the refresh function in the code to see when the page needs to be redrawn.

On second thought, redraw is probably a better name. Changed in this revision.


You think there's a better way of doing this? I used to just throw the player out of the way, but it doesn't look as sexy, although it is faster and doesn't require these refresh/redraw calls.

 
sizzlemctwizzle Scriptwright
FirefoxMacintosh

Avindra V.G. wrote:
I'm using wmode=transparent
Can't you use wmode=opaque? That's what Facebook uses on their video pages and overlaying HTML works fine there. It might be faster since whatever is behind the player doesn't get rendered. Adobe says transparent slows down preformance.
Avindra V.G. wrote:
The browser does not correctly redraw the elements
What exactly do you mean by this? Do you mean everytime the settings window is opened it has to be redrawn? GM_config does exactly the same thing. People rarely open up the settings so I've always thought this was the most efficient method.

Perhaps using an iframe might make this faster since it gets its own separate page. We could also just shove the settings under the player rather then overlaying it.

 
Avindra V.G. Script's Author
FirefoxWindows

sizzlemctwizzle wrote:
wmode=opaque

I used that a while ago, and I encountered too many problems with it I can't remember. I haven't tried it in Flash 10.1 yet, and 10.1 is heaps better than 9.

sizzlemctwizzle wrote:
What exactly do you mean by this

Like, put a return; as the first line in the refresh/redraw function. Then play around with the configuration dialog. It's very messed up, doesn't redraw properly.


Ok, I just tried opaque. It doesn't seem to be as buggy as it was in 9. But it still requires redrawing. I'll play around with it more to see which is better than the other.

Like srsly dude, if you scroll down on the page w/ opaque back in the day, the mouse position was like 30 pixels off in the flash player. It was so frustrating.

But it seems ok now. I'm gonna try both on a crap computer (which I don't have access to now, lol). I used to have a shit computer, but I finally built my dream computer.


Ok, this page:

http://www.adamia.com/blog/visualizing-flash-wm...

Is very helpful. Clearly, I should definitely be using opaque at least. Transparent is not necessary for this script, and opaque no longer has those disgusting bugs from Flash 9.

I'll play around with opaque, direct, and gpu. Opaque is the new default now for sure though.

Edit: I've tried it out a bit more, and oddly, gpu doesn't produce a higher fps than opaque. I'll just stick with opaque I guess.


I've made another revision:

http://code.google.com/p/youtubehd/source/detai...

Switched to opaque, and skipped the redraw for the As3 (ActionScript 3) player. It seems the redrawing hacks are only needed for the old player.

 
sizzlemctwizzle Scriptwright
FirefoxMacintosh

Avindra V.G. wrote:
Like, put a return; as the first line in the refresh/redraw function. Then play around with the configuration dialog. It's very messed up, doesn't redraw properly.
Nope, nothing like this happens to me. Deactivating the refresh/redraw function doesn't have any noticeable effect for me.
Avindra V.G. wrote:
but I finally built my dream computer.
My dream computer is still in pieces cause I'm a lazy mutha fucka. I've really got to put that thing together before all the hardware becomes outdated lol.
Avindra V.G. wrote:
10.1 is heaps better than 9.
Man I remember using Flash Player 5... You ever read this(that guy is so smart)?
Avindra V.G. wrote:
http://www.adamia.com/blog/visualizing-flash-wm...
Jeez those are all so fucking slow on my computer. But I have an older MacBook from when Apple still used Intel GPUs. Intel cannot make a decent graphics card.

 
Avindra V.G. Script's Author
FirefoxWindows

sizzlemctwizzle wrote:
Intel cannot make a decent graphics card.

This is true.

sizzlemctwizzle wrote:
Deactivating the refresh/redraw function doesn't have any noticeable effect

It is only needed for old videos (non-As3) like this one:

http://www.youtube.com/watch?v=XFkzRNyygfk&feat...

For any of the videos that use the new player, the redraw isn't needed, which is why I just recently made it break out of that function in r63, if the player is actionscript 3.

sizzlemctwizzle wrote:
You ever read this(that guy is so smart)?

Just reading it now, but I agree with it. I hate Flash so much (especially sites that use it entirely). I'll definitely force this script to use YouTube's HTML5 player when Firefox 4 goes stable.

With the new releases of browsers supporting HTML5 and GPU-accelerated HTML5, hopefully we'll see Flash use die out.


EDIT: Ok, even with the old player, it seems the redraw isn't needed. Sometimes it's needed, sometimes it isn't. I'll play around with it a bit more to try and figure out what the hell is going on.

I removed all the redrawing code. I think that the switch from transparent to opaque fixed it. Either that, or I'm going crazy and it wasn't needed at all.

Additionally, I'm forcing the AS3 player from now on, so redrawing isn't an issue at all.

 
sizzlemctwizzle Scriptwright
FirefoxWindows

Avindra V.G. wrote:
Either that, or I'm going crazy and it wasn't needed at all.
I'm sure it was needed at some point. Probs due to some shitty build of Flash.
Avindra V.G. wrote:
I'll definitely force this script to use YouTube's HTML5 player when Firefox 4 goes stable.
I'm really looking forward to this.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel