Use JavaScript to unlock high-res YouTube videos

March 29, 2008 by Dr. Macenstein
Filed under: Awesomeness, Tips/How To, video 


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!

Every time you submit our site, an Angel gets its wings.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Yahoo! Buzz
  • Fark
  • Spurl

Comments

18 Comments on Use JavaScript to unlock high-res YouTube videos

  1. Alan on Sat, 29th Mar 2008 1:16 pm
  2. This is no longer needed. There is a checkbox in your YouTube account settings to always view higher res videos when they are available.

  3. Dr. Macenstein on Sat, 29th Mar 2008 1:22 pm
  4. 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

  5. Alan on Sat, 29th Mar 2008 1:36 pm
  6. It certainly is the nerdier way, and I have total respect for that. :)

  7. jbelkin on Sat, 29th Mar 2008 2:39 pm
  8. 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.

  9. Artie on Sat, 29th Mar 2008 3:12 pm
  10. umm… wouldn’t it be a javascript bookmark, not an AppleScript bookmark?

    k.thx.bye.

  11. ryanm on Sat, 29th Mar 2008 5:55 pm
  12. 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.

  13. Dr. Macenstein on Sat, 29th Mar 2008 10:52 pm
  14. Alan, there still seems to be an improvement in quality even when the pref is set in YouTube’s prefs.

    -The Doc

  15. angstrid on Sun, 30th Mar 2008 12:29 am
  16. 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.

  17. odin on Sun, 30th Mar 2008 3:33 am
  18. Why discriminate against Camino and Opera!?

  19. Snorrblitz on Sun, 30th Mar 2008 12:20 pm
  20. I like this better because usually I watch the videos in low-res.

  21. john clark on Sun, 30th Mar 2008 12:25 pm
  22. 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?

  23. rocky on Sun, 30th Mar 2008 8:38 pm
  24. 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.

  25. stalkerX on Tue, 1st Apr 2008 3:00 am
  26. YouTubeHD-Bookmarklet: http://youtubehd.ebiene.de

  27. Ludor on Tue, 1st Apr 2008 5:43 am
  28. I’m also getting what john clark describes, the javascript gets warped. What’s wrong with me?

  29. Emiya Shiro on Thu, 10th Apr 2008 1:41 pm
  30. >>> 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.

  31. Emiya Shiro on Thu, 10th Apr 2008 1:42 pm
  32. This video quality checkbox doesent working :/

  33. Z120U on Tue, 22nd Apr 2008 7:34 am
  34. 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)

  35. Ludor on Mon, 5th May 2008 3:12 am
  36. Thanks Z120U (Zisou?)!

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

Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!





Contest

Advertisement

Product Reviews

  • IntelliSchool Free is released - Free open source school database system
  • Our Finest Moments

    Where are they now? Interview with Switcher Girl Ellen Feiss

    Review: The iCar by Corgi - Possibly the worst iPod accessory EVER

    Apple blames iPod nano screen defects on obese Americans/tight pants

    Using Safari can slow your system down as much as 76% vs Firefox

    Donate Now

    iPhone Feature Request

  • Categories:

  • Advertisement