FREE BURMA!

( ? , qUeStIoNMaRk )

Seeking for a sustainable amount of chaos. AKA an electronic stream of consciousness about software engineering, open source, life. By Marco Fabbri.

SeekTube is a Greasemonkey user script to enable the same "link within a video" feature provided by Google Video also on YouTube videos.

Link within a video is presented as:

Has this ever happened to you? You're watching this documentary on monkeys and then halfway through, this monkey does the funniest thing ever. So of course, you want nothing more than to share this hilarious monkey moment with your friends. Now, on Google Video, doing just that is easier than ever. Now you can email links to specific points inside a video! All you have to do is add the time you'd like to share to the end of a video's URL. We support hours (h), minutes (m), and seconds (s). For example, Invisible Board is a 1 min 46 sec long video but I believe the coolest part is at 1 min 26 sec, so all I have to do is add #1m26s to the link I'm going to send to my friends! Just like this: http://video.google.com/videoplay?docid=6396990712930217422#1m26s.

Well, SeekTube enables the same functionality: i.e. you can specify a permalink to a precise time in the video by appending an "#" followed by the time formatted as HhMmSs to the video url, where H, M, S are sequence of digits indicating hours, minutes and seconds respectively (none of them is mandatory); e.g. you can take a look at the BeOS nice long degradation curve under heavy load(multiple multimedia streams and 3D graphics, half computing power down), happening at 7 minutes and 50 seconds (http://www.youtube.com/watch?v=6VDYdaXApNk#7m50s) from the beginning of the video.

This solution shows some nice side effects.

You can download SeekTube from userscripts.org. DISCLAIMER. The script is quite alpha-quality and as it works, it doesn't load as smoothly as I envisioned: there is some going back and forth before the video starts playing.

As SeekTube is a Greasemonkey script you need to install the Greasemonkey Firefox extension first; then installing a greasemonkey script is pretty straight-forward.

SeekTube originated from a long standing (mind pecking) personal need, during the time others have expressed the same (or a rather similar) need revamping my interest in this "issue":

SeekTube is made possible from the YouTube JavaScript API, especially from the seekTo function.

Here comes a video demo.

This is the script source code for the so-inclined.

// ==UserScript==
// @name           SeekTube
// @namespace      http://questionmark.blogsome.com
// @description    Enable a seek time anchor (#1h3m20s) ala Google Video in YouTube urls
// @include        http://youtube.com/*
// @include        http://*.youtube.com/*
// ==/UserScript==*
location.href = "javascript:(" + encodeURI(uneval(function() 
{ window.onYouTubePlayerReady = function(playerId)
{ 
matches = String(window.location).match(/#((\d)*h)?((\d)*m)?((\d)*s)?/); 
seekTime = 0; 
if(matches){ 
seekTime += (matches[1] ? matches[1].replace(/h/,"") : 0) * 3600; 
seekTime += (matches[3] ? matches[3].replace(/m/,"") : 0) * 60; 
seekTime += (matches[5] ? matches[5].replace(/s/,"") : 0) * 1; 
document.getElementById("movie_player").seekTo(seekTime,true); } 
} 
})) + ")();";

Safely store your passwords on

Clipperz - online password manager