Extra caution is recommended when installing recently uploaded/updated scripts (read more)
Be sure you trust any scripts you install

YouTotem

Watch YouTube videos with embedded <strong>totem</strong>, <strong>mplayer</strong> or <strong>vlc</strong> player.

YouTotem allows you to watch YouTube videos with totem, mplayer or vlc. This script is for Linux users.

The requirements are:

totem + totem-mozilla
or:
mplayer + mplayerplug-in (a.k.a. mozilla-mplayer)
or:
vlc + mozilla-plugin-vlc

For totem, you may also need to install some extra codecs.

If you are running a recent Ubuntu distro then you already have totem and totem-mozilla installed, and if you are missing some codecs just right-click in the video window and select "Open with Movie Player", totem player will launch and guide you through the installation of the missing codecs.

If you have more than one of these plugins installed, and you want to force the browser to use a specific plugin then you have to modify the mimetype variable at the beginning of the script.

Many videos on YouTube are available in different formats. By default YouTotem is set to request the high quality MP4 version. If the MP4 version of the video is not available or if you are having bandwidth problems, you can change the requested version with the Firefox Menu: Tools → Greasemonkey → User Script Commands.

If you have got the Adobe flashplugin installed it's best to also install the Adblock Plus add-on for Firefox and add the following filter:

http://*youtube.*/*.swf*

For turning embedded YouTube videos into clickable images check out my YouTubeImageLink script.




Jun 26, 2008
sark User

I don't know about making scripts. How easy would this be to get it to work with other common video sites like google video, metacafe etc. Or even just those two. I did a quick search for metacafe, and it seems the ones supporting it are downloaders and not embedded players.

Treviño, what benefit does the resolution detection offer? Is it because the video not playing with correct ar if someone is running a non 4:3 resolution?

 
Apr 25, 2008
Treviño User

Good... The auto-size code is really good!

BTW, I was so stupid: thinking to compatibility I posted a code with iexplore checks... LOL :P

Well, I was not thinking that those are just local scripts :P

 
Apr 25, 2008
raaf Script's author

Thanks for the suggestion. I modified the script to take the browser size in to account.

 
Apr 24, 2008
Treviño User

In the previous code commit there was a typo, btw I've changed the code to adapt the player size not to the screen resolution, but to the browser size (btw it isn't totally proportional yet):

var width = 450;
var height = 358;

if (parseInt(navigator.appVersion)>3) {
	if (navigator.appName=="Netscape") {
		windowWidth = window.innerWidth;
		windiwHeight = window.innerHeight;
	}
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		windowWidth = document.body.offsetWidth;
		windiwHeight = document.body.offsetHeight;
	}
}

if (windowWidth >= 1024 && windowWidth < 1280) {
	width = 556;
	height = 435;
}

if (windowWidth >= 1280 && windowWidth < 1680) {
	width = 885;
	height = 683;
}

if (windowWidth >= 1680) {
	width = 930;
	height = 715;
}

http://paste.ubuntu-nl.org/64228/

 
Apr 24, 2008
Treviño User

What about adding an automatic resolution checker like:

var width = 885;
var height = 358;

if (screen.width >= 1024 && screen.width < 1280) {
	width = 556;
	height = 435;
}

if (screen.width >= 1280 && screen.width < 1680) {
	width = 885;
	height = 683;
}

if (screen.width >= 1680) {
	width = 930;
	height = 715;
}

It could be better if there's a way to calculate the video width for each resolution (based on the right youtube sidebar width).

Then I've ported many of your cool features (mp4 and other formats playback and resized-player) back to Youtube Alternate Player: http://paste.ubuntu-nl.org/64223/

You could comment on this script if you were logged in.