Use JavaScript to unlock high-res YouTube videos - Macenstein

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:

http://www.youtube.com/watch?v=OIc4VHxU7iM

and then load

http://www.youtube.com/watch?v=OIc4VHxU7iM&fmt=18

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!

Comments
18 Responses to “Use JavaScript to unlock high-res YouTube videos”
  1. Alan says:

    This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.

  2. 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

  3. Alan says:

    It certainly is the nerdier way, and I have total respect for that. 🙂

  4. jbelkin says:

    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.

  5. Artie says:

    umm… wouldn’t it be a javascript bookmark, not an AppleScript bookmark?

    k.thx.bye.

  6. ryanm says:

    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.

  7. Alan, there still seems to be an improvement in quality even when the pref is set in YouTube’s prefs.

    -The Doc

  8. angstrid says:

    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.

  9. odin says:

    Why discriminate against Camino and Opera!?

  10. Snorrblitz says:

    I like this better because usually I watch the videos in low-res.

  11. john clark says:

    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?

  12. rocky says:

    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.

  13. stalkerX says:

    YouTubeHD-Bookmarklet: http://youtubehd.ebiene.de

  14. Ludor says:

    I’m also getting what john clark describes, the javascript gets warped. What’s wrong with me?

  15. Emiya Shiro says:

    >>> 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.

  16. Emiya Shiro says:

    This video quality checkbox doesent working :/

  17. Z120U says:

    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)

  18. Ludor says:

    Thanks Z120U (Zisou?)!

    That worked. Funny, those simple solutions, how hard they are to find..

Leave A Comment

ADVERTISE ON MACENSTEIN

Click here to inquire about making a fortune by advertising your game, gadget, or site on Macenstein.