Use JavaScript to unlock high-res YouTube videos
Above: You can see that especially on fast motion videos, the quality is noticeably better on the high-res video video (right) than the standard YouTube offering (left).
Faithful Macenstein reader brethil clued me into a cool YouTube trick that probably everyone besides me already knew about. Apparently if you open a YouTube url in your browser, then add “&fmt=18” (without the quotes) to the end, you will see a higher res version of whatever video you were watching.
Of course, with YouTube “high res” is a relative term, but the quality is noticeably better.
Try it yourself. Load this video:
and then load
You’ll notice the quality of the second clip is markedly less compressed looking, and you’ll also see a new link which says “Watch this video in lower quality for faster playback”, letting you know you indeed re watching the high-res version.
This tip is all well and good, but the boys over at macosxhints.com managed to come up with a couple easy ways to automate the process. First they created some AppleScripts to do the job, but then a reader came up with an even easier solution – just make a JavaScript bookmarklet!
To do this, just go into Safari (or Firefox) and make a blank bookmark, name it something like “High-Res” or something, and add the following to the “address” field:
javascript:window.location+=”&fmt=18″;
Now, all you have to do to watch a higher res version of any YouTube video is hit that button in your bookmarks bar. Sweet!
This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.
Um… yes, I suppose you could do that Alan…
… I guess….
seems like a lot of trouble though.
Don’t you think it’s much easier to write code and manual activate it each time you watch a video?
🙂
-The Doc
It certainly is the nerdier way, and I have total respect for that. 🙂
Still useful because I don’t always log in to YouTube to watch videos … though if you download the video, it’s in its “original” resolution.
umm… wouldn’t it be a javascript bookmark, not an AppleScript bookmark?
k.thx.bye.
What I want to know is if there is any way to access the h.264 version of clips from within the browser (or on the mac using some 3rd party software). I’m not sure where the iphone and apple tv get the content from.
Alan, there still seems to be an improvement in quality even when the pref is set in YouTube’s prefs.
-The Doc
setting the prefs in your youtube account to always view the high(er)-res version when available is the much easier way, i agree with alan. and when you download the .flv file, you get the high-res version you just viewed.
Why discriminate against Camino and Opera!?
I like this better because usually I watch the videos in low-res.
this : javascript:window.location+=â€&fmt=18″;
changes to:
javascript:window.location+=%E2%80%9D&fmt=18%E2%80%B3;
after I enter the javascript….
how do I fix?
hey guys, what are you changing in the account prefs to make quality better? when i change video playback quality under account to be hq, the quality does not seem to change at all and “Watch this video in lower quality for faster playback” does not appear either. Quality only changes when i add that javascript code.
YouTubeHD-Bookmarklet: http://youtubehd.ebiene.de
I’m also getting what john clark describes, the javascript gets warped. What’s wrong with me?
>>> AvatarAlan
Posted: Mar 29th, 2008 at 1:16 pm
1
This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.
This video quality checkbox doesent working :/
For those of you getting the:
javascript:window.location+=%E2%80%9D&fmt=18%E2%80%B3;
edit the bookmark, remove the %E2%80%9D and manually type the ” (double quote keystroke).
Note: you’ll have to do this twice (before and after the &fmt=18)
Thanks Z120U (Zisou?)!
That worked. Funny, those simple solutions, how hard they are to find..