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.

Toon

About these ads

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

    regards
    Toon


  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: http://turanct.wordpress.com/2010/02/25/gnash-youtube/ The only tiny drawback is that the videos load in pause mode. For now, everything else seems to […]

  5. Emanuele Says:

    Thanks!!! :D

  6. Stanislav Says:

    Hello.

    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://*.youtube.com/watch?v=*
    // @description Enables Gnash Playback On YouTube
    // @include http://*.youtube.com/watch?v=*
    // ==/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 = “http://www.youtube.com/v/”+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
    Stanislav

  7. kajdo Says:

    Hi,

    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 http://www.phoronix.com/scan.php?page=news_item&px=NzU1MA 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

    kajdo

  8. Johann Says:

    Hi,
    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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: