You are not logged in.

#1 2007-07-10 13:29:12

sjmorgan
Member
Registered: 2007-01-26
Posts: 27

YouTube with mplayer-plugin

Has anyone managed to get any of those Greasemonkey scripts that allow you to use mplayer-plugin to play YouTube videos to work? I must have tried about 3 of them and none of them work, I just get that "you either have JavaScript turned off or an old version of Macromedia's Flash Player" message. When I do "Install Missing Plugins" it's Flash that appears in the list so it's not a case of mplayer-plugin not working; it also shows up in about:config. I've also tried creating a fresh profile with only the Greasemonkey add-on installed but it made no difference.

Anybody got any ideas?

Offline

#2 2007-07-10 18:35:46

sjmorgan
Member
Registered: 2007-01-26
Posts: 27

Re: YouTube with mplayer-plugin

As they say, if you want something doing properly, do it yourself. So, I wrote my own Greasemonkey script and it's now embedding mplayer-plugin and seems to be attempting to play the video. The problem is that it doesn't seem to be doing much beyond freezing or crashing Firefox (If my aim was to emulate the Adobe Flash plugin I would consider this a resounding success). However, the problem seems to lie with mplayer as if I try to "play" the FLV URL, it completely craps out.

Offline

#3 2007-07-11 00:58:09

mitsoko
Banned
From: In the Coal Chamber
Registered: 2007-05-08
Posts: 143

Re: YouTube with mplayer-plugin

are you sure you're usign the correct url? i.e the one to download the .flv

Offline

#4 2007-07-11 12:37:01

sjmorgan
Member
Registered: 2007-01-26
Posts: 27

Re: YouTube with mplayer-plugin

Tried it again and it just "decided" to work. It plays some videos fine, while others it buffers to 99% and then stops, Here's the code for anyone who wants to try it out and/or offer comments:

// ==UserScript==
// @name        FLV Player
// @namespace        http://www.example.net/
// @description        Blah blah blah.
// @include        http://www.youtube.com/*
// @include        http://youtube.com/*
// ==/UserScript==

function gup(name) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

var videoID = gup("v");
var flashplayer = document.getElementById("playerDiv");
flvURL = 'http://209.85.239.88/get_video?video_id=' + videoID;
flashplayer.innerHTML = "<embed id='player' name='player' src='" + flvURL + "' type='application/x-mplayer2' width='455' height='340' pluginspage='http://mplayerplug-in.sourceforge.net/'></embed>";

Offline

#5 2007-07-12 13:46:48

brjoon1021
Member
Registered: 2006-11-15
Posts: 9

Re: YouTube with mplayer-plugin

I am curious as to why you guys don't use the Flash plugin.

Offline

#6 2007-07-12 13:49:17

sjmorgan
Member
Registered: 2007-01-26
Posts: 27

Re: YouTube with mplayer-plugin

brjoon1021 wrote:

I am curious as to why you guys don't use the Flash plugin.

http://episteme.arstechnica.com/eve/for … 6006505831

Offline

#7 2007-07-12 17:27:31

PenguinFlavored
Member
From: Chicago, IL, USA
Registered: 2006-06-06
Posts: 66
Website

Re: YouTube with mplayer-plugin

brjoon1021 wrote:

I am curious as to why you guys don't use the Flash plugin.

Running flash plugins always sends my cpu usage way up. Using mplayer keeps it down beacuse resizing and rendering is done using the hardware's XVideo extentions, unlike flash where it's done in software.

Offline

#8 2007-07-14 02:13:39

Skatox
Member
From: Venezuela
Registered: 2006-08-25
Posts: 64
Website

Re: YouTube with mplayer-plugin

Awesome, I'd like to see how to use mplayer  for it with great stabilty


https://www.skatox.com/blog -> Visit my blog about (Linux, Hacking, Open Source, Web Development,  Windows, Mac Os X, Internet and more......)

Offline

#9 2007-07-14 08:15:24

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Re: YouTube with mplayer-plugin

All we need now is a Pandora version wink

Offline

#10 2007-07-14 09:23:29

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: YouTube with mplayer-plugin

The greasemonkey script doesn't work at all here. Is there anything special I have to do.

BTW, I want to use it because gnash sucks, and flash is not available for Linux x86_64.

Offline

#11 2007-07-17 13:58:56

sjmorgan
Member
Registered: 2007-01-26
Posts: 27

Re: YouTube with mplayer-plugin

brain0 wrote:

The greasemonkey script doesn't work at all here. Is there anything special I have to do.

BTW, I want to use it because gnash sucks, and flash is not available for Linux x86_64.

Apart from the obvious (have mplayer(-plugin), Greasemonkey and the script installed), no. It uses a hardcoded URL to (attempt to) fetch the FLV from, which I'm pretty sure is completely wrong and probably the source of your problem. Ideally the script would locate the actual location of the FLV but I don't have the inclination to do that, especially seeing as my knowledge of JavaScript sucks and I have since switched back to Opera as I got sick of Firefox crashing every 10 minutes. Feel free to make these modifications yourself though.

I noticed there's a new version of the Flash plugin out, maybe that fixes all of the bugs people have been experiencing (lol).

Offline

#12 2008-10-27 15:29:21

vaquerito
Member
Registered: 2008-04-09
Posts: 32

Re: YouTube with mplayer-plugin

When I search somethin strange, as the lightest and fastest geekway of doing something be sure archlinux forum is one of firsts results big_smile

Anyway, as of 27/10/2008 this two scripts:

http://userscripts.org/scripts/show/24999
http://userscripts.org/scripts/show/6011

works with youtube and let you use mplayer-plugin (but even vlc or xine for the 24999)instead of hungry flash

Offline

#13 2008-10-27 15:38:15

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: YouTube with mplayer-plugin

firefox + greasemonkey + HQtube  ftw!!!11 <3

Offline

#14 2008-10-27 16:17:37

chris89
Member
From: Austria
Registered: 2008-03-18
Posts: 48

Re: YouTube with mplayer-plugin

I used the HQTube Script for Greasemonkey and it worked very well...

Last edited by chris89 (2008-10-27 16:18:03)

Offline

#15 2008-10-27 16:31:11

tonyisnt
Member
Registered: 2008-03-18
Posts: 158

Re: YouTube with mplayer-plugin

I'm interested in the idea, but I can't get it to work either.

Offline

#16 2008-10-27 16:35:59

venky80
Member
Registered: 2007-05-13
Posts: 1,002

Re: YouTube with mplayer-plugin

Can this be done for HULU?


Acer Aspire V5-573P Antergos KDE

Offline

#17 2008-11-03 16:21:53

vaquerito
Member
Registered: 2008-04-09
Posts: 32

Re: YouTube with mplayer-plugin

Actually HQtube is the 24999 I was talkin about, confirm that is probably the best option...

For those who can't get it to work it's just a matter of:

1 - sudo pacman -S mplayer-plugin or sudo pacman -S vlc-plugin
2 - In firefox, search google for "firefox greasemonkey" and install the greasemonkey extension, restart firefox
3-  In firefox, search "greasemonky hqtube" or follow this link http://userscripts.org/scripts/show/24999 and use the "install the script" button (if you search just for hqtube you may see many other options, don't let the m overwhelm you big_smile)

There should be no need to restart again just go to youtube and wait for the page to load, mplayer plugin should load inside the box

Last edited by vaquerito (2008-11-03 16:26:53)

Offline

Board footer

Powered by FluxBB