Watch YouTube videos with QuickTime embedded player

Apr 24, '08 07:30:03AM

Contributed by: robotdestroy

Many (but not yet all) YouTube videos are available in higher-quality QuickTime versions, and many sites have published methods of downloading those higher quality versions. However, this blog post contains a slick bookmarklet that actually replaces the YouTube Flash video player with the embedded QuickTime player, then plays the high quality video in the QuickTime player.

[robg adds: To use the bookmarklet, just drag it from the linked page to your bookmarks toolbar. Load a video in YouTube, then click the link in your toolbar. The page will then reload with the QuickTime player in place of the Flash player. (If you see the QuickTime logo with a question mark, this means that video isn't available in a high quality version.) The linked blog post has an easy-to-use drag-to-the-toolbar version of the bookmarklet; I'm going to reproduce the source here in the second part of this hint, in case the original post goes away at some point -- but using the linked blog post is by far the easiest way to add this to your bookmarks bar.]

Here's the source:

javascript:(function%20()%20{var%20video_id%20=%20null;var%20video_hash%20=%20null;var%20video_player%20=%20document.getElementById(%27movie_player%27);if%20(video_player)%20{var%20flash_variables=video_player.attributes.getNamedItem(%27flashvars%27);if%20(flash_variables)%20{var%20flash_values=flash_variables.value;if%20(flash_values)%20{var%20video_id_match=flash_values.match(/video_id=([^(\&|$)]*)/);if%20(video_id_match!=null)%20video_id=video_id_match[1];var%20video_hash_match=flash_values.match(/t=([^(\&|$)]*)/);if%20(video_hash_match!=null)%20video_hash=video_hash_match[1];}}}if%20(video_id==null%20||%20video_hash==null)%20{var%20args=unsafeWindow.swfArgs;if%20(args)%20{video_id=args[%27video_id%27];video_hash=args[%27t%27];}}if%20(video_id==null%20||%20video_hash==null)%20return;var%20yt_mp4_path%20=%27http://www.youtube.com/get_video?fmt=18&video_id=%27+video_id+%27&t=%27+video_hash;var%20div_embed=document.getElementById(%27watch-player-div%27);if%20(div_embed)%20{div_embed.innerHTML=%27<embed%20src=\%27%27+yt_mp4_path+%27\%27%20type=%22video/mp4%22%20width=480%20height=400%20scale=\%27aspect\%27></embed>%27;}})();

Comments (9)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20080421213854552