Gnash Youtube

February 25, 2010

I love to test new GNU/Linux distributions. Some time ago i was playing around with Trisquel GNU/Linux, a very nice linux distro. The main goal of that distribution is to have ONLY free software in there, and to have a complete and good OS at the same time.

Now, as we all know, flash is a big issue on Linux systems. The complete open solution to play flash videos is Gnash, the GNU flash player. That is also the flash player you can install on Trisquel. I had some problems viewing youtube videos though, but i found out that the embed player did work! So i made a greasemonkey script to replace the default youtube video player by the ’embed’ player. here it is:

click here for the script (version1)
click here for the script (version2)
click here for the git repository

You’ll need Firefox, IceCat or IceWeasel (completely free versions of Firefox) or Abrowser (UI-stripped and completely Free Software version of Firefox) with the add-on ‘GreaseMonkey‘ for this to work.



12 Responses to “Gnash Youtube”

  1. Rickard Says:

    I’m having the same problem. But I can’t get your script to work. I think the problem might be that youtube updated the interface. Are you still using this?

  2. turanct Says:

    you’re welcome


  3. Hi! I recently installed Ubuntu 10.04 on an old iBook G4 of a friend of mine. With your script I was able to view Youtube videos using Gnash but they are really slow. Have anyone had a similar issue?

    The computer is old but not as that old to not properly display Youtube videos. It works without problem in Mac OS.

    I also tried to locate the video to play it with a external player. In my Ubuntu 10.04 64bits running with Flash the video is saved in the /tmp but apparently the same does not happen with Gnash. Does anyone knows where Gnash saves the videos?

    Thanks, Rodrigo.

  4. […] support is brought by a Greasemonkey user script available at: The only tiny drawback is that the videos load in pause mode. For now, everything else seems to […]

  5. Emanuele Says:

    Thanks!!! 😀

  6. Stanislav Says:


    I’ve slightly modified your script and added the support of system’s locale. Now the player, for example, shows the button “Replay” at the end of the video in your locale’s language.

    // ==UserScript==
    // @name YouTube Gnash Script
    // @namespace http://**
    // @description Enables Gnash Playback On YouTube
    // @include http://**
    // ==/UserScript==

    var goodlink, goodlink2;
    var player_language;

    if ( navigator ) {
    if ( navigator.language ) {
    player_language = navigator.language;
    else if ( navigator.browserLanguage ) {
    player_language = navigator.browserLanguage;
    else if ( navigator.systemLanguage ) {
    player_language = navigator.systemLanguage;
    else if ( navigator.userLanguage ) {
    player_language = navigator.userLanguage;

    goodlink = document.getElementsByTagName(“link”).item(4).href;
    goodlink2 = goodlink.replace(/.*watch\?v=(.*)/i, “$1”);
    goodlink2 = “”+goodlink2;

    goodlink2 = “”;

    document.getElementById(“watch-video”).innerHTML = goodlink2;

    I’m sorry, but I’m too lazy to describe the modifications made. It’s really easy to see, and even easier if you compare the old and the new versions using ‘diff’ on a *nix system.

    I am very grateful to you for your script, it really helped me to get rid of the problem which plagued me about a month or so! Thank you, thank you, thank you!

    Best regards

  7. kajdo Says:


    I do have a lot of troubles using youtube on linux (currently using ubuntu 10.04) on my eeepc (1201n). The reason is pretty simple, (adobe’s) flash for linux does not support GPUs at all.

    because of this article I found out that gnash now supports VA API and I will give it a try today or tomorrow using your script.

    I hope it works, because I’m kind of youtube adicted 😉 and that keeps me using windows 7 which … nja

    Thx for the script in advance


  8. Johann Says:

    Stucked in the same kind of problem I tried to get your script instead I received an 404 error?
    Would you mind to actualize the link once again, it should help many people around! trying to get out of Flash player and their so many update.
    HTML5 will clean all this mess :o))

  9. […] you could already read in the past, I’ve been experimenting with Flash Player and YouTube for some time now. The conclusion is: […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: