Michael Sheldon's Stuff

Michael Sheldon (mike at mikeasoft dot com)

November 24, 2006

Playing YouTube videos without Flash
Mike @ 10:32 pm

After a brief chat with mattl in #jokosher I decided to hack together a little Grease Monkey script to find the FLV URL for a YouTube video (like extensions such as Fast Video Download do) then strip out the flash player and replace it with an <embed> tag, so a player like mozilla-mplayer can display the video instead.

No more audio syncing problems, no more jerky playback and most importantly no more non-free flash plugin :). The only downside is that it has to buffer the entire file before it’ll play correctly.

Here’s a pretty screenshot of it playing a video about the One Laptop Per Child project.

FLV Player

And here’s the actual script if you want to give it a go:

FLV Player

When I get around to it I’ll see about adding support for more sites (google video, daily motion, etc.).


36 Comments »

  1. Flash, youtube et moi…

    Il y a quelques temps, j’avais palié au manque de flash sur ma machine en utilisant une combinaison de 3 choses intéressantes : DownloadWith, youtube-dl et mplayer. Tout cela est explicité dans 2 billets :

    Comment j’ai vaincu Flash et Youtube….

    Trackback by La vie rêvée de Jules — November 26, 2006 @ 3:54 pm

  2. Hi,

    As I’m using seamonkey and can’t install greasemonkey, I’ve made a bookmarklet version of your script.
    You can find it here :
    http://mjules.free.fr/divers/flvplayer.user.bookmarklet.js

    Just put the content of the file into the “Location” field of bookmark and launch it when you’re on a youtube page.

    thank you for this script.

    Comment by Mjules — November 26, 2006 @ 4:03 pm

  3. It’s an awesome idea ! Thank you for it !

    Is it possible to build a firefox extension with it ? It would be easier to use I guess.

    Thank you again !

    Rno

    Comment by Rno — December 1, 2006 @ 2:53 pm

  4. [...] A Greasemonkey script for playing YouTube videos without Flash [...]

    Pingback by Matt Lee » Blog Archive » Playing YouTube videos without Flash — December 12, 2006 @ 11:34 am

  5. hmm. my script is shorter, only 3 lines:

    errordiv = document.getElementById(“playerDiv”);
    url=errordiv.parentNode.getElementsByTagName(‘script’)[0].innerHTML.match(‘\\?([^"]+)’)[1];
    errordiv.innerHTML = ”;

    Comment by carmen — December 19, 2006 @ 3:11 am

  6. mangled by the blog.. oh well, i’ll try yours if mine ever breaks :)

    why is it so hard for GooTube (and everyone else) to do a browser / plugin / OS check and do this for us? i guess they really couldnt give a shit about people who dont run windows.. i mean, we’re smart enough to run linux. we surely don’t click on ads..

    Comment by carmen — December 19, 2006 @ 3:12 am

  7. AWESOME. For the first time I can play youtube videos without using non-free crap *and* without random idiotic crashes. Thank you.

    Btw, I requested its addition to Debian as a default setting: http://bugs.debian.org/411574

    Comment by Robert Millan — February 19, 2007 @ 9:51 pm

  8. Hi Rob, thanks for pushing to get this included in Debian. As soon as things get a little less busy with some other projects I’m working on I’m intending to extend this script to handle other online video sites. Might be a good idea to keep an eye on swfdec too, from what I’ve seen FLV support is just about working there (although apparently not enough action script is supported yet for any online player applications). Also, seeing aybabtu.com again brings back many fond (if odd) memories ;) .

    Comment by Mike — February 19, 2007 @ 10:26 pm

  9. [ING] Cómo ver vídeos de Youtube en Firefox sin tener flash…

    Script de greasemonkey que destripa la URL del vídeo de youtube y lo muestra con mplayer embebido en Firefox, sin usar flash. Puede resultar útil para los que quieran tenrr un sistema de 64 bits "puro", ya que Macromedia sólo ofrece la ver…

    Trackback by meneame.net — March 11, 2007 @ 12:13 am

  10. [...] http://blog.mikeasoft.com/2006/11/24/playing-youtube-videos-without-flash/ [...]

    Pingback by NosedeQue » Blog Archive » Cómo ver vídeos de Youtube en Firefox sin tener flash — March 11, 2007 @ 8:18 pm

  11. [...] Me agrada bastante comprobar que poco a poco los usuarios de sistemas operativos libres vamos liberándonos del uso de herramientas cerradas que no tenían alternativa libre. Este es el caso del script para la poderosa extensión de Mozilla Firefox, Greasemonkey, que nos permitirá ver vídeos de YouTube sin la necesidad de tener el famoso plugin de Flash. Su funcionamiento se basa en descubrir la URL del vídeo, reproduciéndolo por otro sistema alternativo al reproductor hecho en Flash de este sitio. Muchas personas comentaban la necesidad de Flash para ver los vídeos de estos servicios sociales y aunque de momento sólo funciona para YouTube, a buen seguro que pronto tendremos una versión para muchos otros, de manera que ya no tengamos la necesidad de instalar este plugin sólo para este propósito. PDF [...]

    Pingback by Kernel Source » Viendo vídeos de YouTube sin Flash instalado — March 12, 2007 @ 10:53 am

  12. the only thing I’m smart about scripts is reading the blogs.
    Would the bookmarklet work on a cell phone or does it have to be firefox? I have a Walkman phone using J2me and I have both the NetFront browser as well as Opera mini. If Firefox had a mobile browser I would use it! Anyway I think Cingular has messed around with the phone so that my video player only works with their pay content. I apologize if this is a stupid question.

    Comment by Liz Lee — March 15, 2007 @ 1:26 pm

  13. hi and thanks mike,

    could you pleae tell me why when i rt click your Flyplayer user and left click Open with command prompt does my command prompt indeed open and then CLOSE UP AND DISSAPEAR quickly.

    this is probably a stupid question and I apoligize but I inherited this machine and have sort of ‘fixed it up’ myself.

    thanks, Karen

    Comment by karen — March 21, 2007 @ 3:19 pm

  14. [...] » noticia original [...]

    Pingback by Navegabilidad » Blog Archive » [ING] Cómo ver vídeos de Youtube en Firefox sin tener flash — March 23, 2007 @ 1:41 pm

  15. Hi Karen,

    This is a greasemonkey script, not a shell script, as such you need the Firefox greasemonkey extension to make use of it. You can find out more about greasemonkey at http://www.greasespot.net/

    Comment by Mike — March 23, 2007 @ 1:48 pm

  16. Way cool! Thanks.

    Comment by Ian — March 29, 2007 @ 4:50 pm

  17. your thing is awsome you are awsome as well.

    Comment by kenneth bidlen — March 30, 2007 @ 12:38 am

  18. I was amazed that this worked on Windows, but it does, using the VLC multimedia plugin (I guess it comes with the player: http://www.videolan.org). It’s great for people with slower PCs like me, now I can even view the videos full screen without any stuttering!

    The only downside is there are no controls to pause/rewind/fast-forward or change the volume.

    Comment by Louis — March 31, 2007 @ 4:43 pm

  19. [...] YouTube via VLC! Published March 31st, 2007 VLC , GreaseMonkey , Hacks , Flash , Firefox I stumbled upon Mike Sheldon’s GreaseMonkey script that allows people to watch YouTube videos without Flash, and was excited when I found out it also works on Windows. It’s not supposed to, because it depends on mplayerplug-in, which is only available for Linux, but VLC’s multimedia plugin took care of that problem and played it for me on my Windows system! [...]

    Pingback by YouTube via VLC! « SharcBlog 2.0 — March 31, 2007 @ 10:59 pm

  20. Well, in reply to myself in comment #18, I extended your script and made it render some buttons to control the video if it detects that VLC is being used to display the embedded content. See the link in comment #19 for details :)

    Comment by Louis — March 31, 2007 @ 11:03 pm

  21. Thanks — this is fantastic, the first time I can use a 64-bit browser for flash sites. It would be great if you could extend the functionality to handle other sites.

    Cheers,
    Dave

    Comment by David — April 11, 2007 @ 2:41 am

  22. Thanks Mike. Keep up the good work.

    Comment by James — April 24, 2007 @ 3:04 pm

  23. Obviously I’m the idiot here. I cannot get Greasemonkey to do anything. There seems no control to add this script, or at least nothing I do will cause the script to be added.

    I have the text of the script, how in blue blazes (or red swirls) do i load it into greasemonkey?

    Comment by Curt Howland — May 12, 2007 @ 5:02 pm

  24. [...] Adobe Flash Player en un AMD64 Después de llevarme una desagradable sorpresa al ver que Adobe tenía soporte para su plugin en mi sistema operativo y agobiado por la idea de no poder ver el video de Edgar. Me ví obligado a buscar una alternativa para solucionar mi gran drama. Como siempre, confié esta tarea a mi buen amigo Google, quien me ayudó a encontrar unas cuantas alternativas. La primera de estas proponía instalar una versión de Firefox 32bit e instalar, como se hace normalemente, un plugin compatible para esta versión. No me gustó esta idea, simplemente porque yo quería sólo un plugin de Flash y no instalar otro Firefox. La segunda alternativa, algo más extrema no instalaba el plugin, ya que en su lugar proponía reproducir los videos directamente con mplayer. Esta alternativa me gustó un poco más, pero lamentablemente solo servía para los videos de YouTube. ¿Y qué pasaba si quería ver videos en Metacafe?. La deseché, porque era muy limitada. Una tercera opción, la que más me gustó, consistía en instalar el plugin usando NSPluginWrapper, una aplicación que permite la compatibilidad de algunos plugins con equipos de otras plataformas. Me quedo con esta. [...]

    Pingback by Adobe Flash Player en un AMD64 « Mario — May 21, 2007 @ 2:30 am

  25. I’ve installed greasemonkey and the flv script, but I always get this on an amd64 linux box:

    Hello, you either have JavaScript turned off or an old version of Macromedia’s Flash Player. Get the latest Flash player.

    Comment by godzirra — September 27, 2007 @ 4:51 pm

  26. hi all guys … im an Opera user , an i have VLC installed in my computer … i seen this blog but im a noob and i don’t know what to do with that script , and “greesemonkey” thing its not familiar with me … so pls who can help with that will be most appreciate…. thks

    Comment by n3rdAi — September 28, 2007 @ 10:14 am

  27. Doesn’t seem to do anything in Mac OS X. Not on my computer anyway. I wish it would though, youtube videos always stutter and everything plays smooth as a baby’s bottom in VLC. :P If anyone has any ideas to make it work with VLC in OS X..

    Comment by collinhead — November 19, 2007 @ 12:31 am

  28. Grease monkey have conflicts with Seamonkey.. I installed seamonkey!!

    Comment by Carlos Arreola Guerrero — December 20, 2007 @ 4:50 am

  29. Ok so i have a phone with j2me with opera mini …how would i be able to install greasemonkey and this script

    Comment by Dylan — March 8, 2008 @ 6:41 am

  30. Hey, a couple of notes:

    Firstly, being in the UK I needed to explicitly add http://uk.youtube.com to the include list before greasemonkey would attempt to use this script.

    Secondly, I promptly uninstalled flash since it wasn’t playing well with youtube anyway, only to find that this means that the player div never gets inserted and the script fails. If I can figure it out I’ll get back to you.

    Thanks for this handy script!

    Comment by Eddie — March 15, 2008 @ 6:50 pm

  31. [...] HTML changes from time to time and the script might break. There are actually older similar scripts that no longer [...]

    Pingback by Greasemonkey Script: YouTube without Flash « Vasilis Papavasileiou — July 27, 2008 @ 12:53 am

  32. [...] de Youtube en Firefox sin Flash Por Nico. 12 comentarios. Guardado en Greasemonkey, Tutoriales Michael Sheldon ha publicado en su web un interesante script para Greasemonkey que nos permite ver videos en [...]

    Pingback by Como ver videos de Youtube en Firefox sin Flash | Zona Firefox — September 1, 2008 @ 3:54 am

  33. heyy
    verry nice wrk ;)

    Comment by ccccchhhhheeeeeeeeelllllllssssssiiiiiieeeeee — March 16, 2009 @ 5:48 am

  34. can I use this

    Comment by avikashnay — August 7, 2009 @ 11:21 pm

  35. It doesn’t work for me. It tries to detect a flash player (which i obviously don’t have) and refuses to send the tags your script uses :-(

    Any workaround for that ?

    Comment by NoTube — August 18, 2009 @ 4:43 pm

  36. It’s fantastic that you are getting thoughts from this piece of writing
    as well as from our argument made at this place.

    Comment by www.eclipse.org — September 16, 2014 @ 3:56 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress