Youtube not working

Help
2013-01-05
2013-04-10
  • When I double click on a youtube title the player screen stays blank and nothing happens , I do have the latest UMPlayer installed . Video and audio files play well. . Seems the program just keeps bufering , I have a high speed fibre optic broadband at 70MPS . Any youtube file will not play. Please help :-(

     
  • john fortelka
    john fortelka
    2013-01-06

    join the crowd!  according to the SMPlayer website, UMPlayer is no longer being developed.  Check out their website, especially the FAQ.  They claim to have fixed the Youtube problem with UMPlayer, though, and have a link to the corrected version of UMPlayer resolving the Youtube issue.  Haven't tried it yet.

     
  • Steven Hum
    Steven Hum
    2013-01-07

    Added this patch checking latest smplayer source to umplayer src/retrievevideourl.cpp and rebuilt umplayer

    -- retrievevideourl.cpp.original 2011-12-30 10:00:29.000000000 -0500
    +++ retrievevideourl.cpp 2013-01-05 21:33:58.587458000 -0500
    @@ -64,9 +64,43 @@
         QStringList::iterator stIt = codeList.begin();
         foreach(QString code, codeList)
         {
    -        code.remove(0, 4);
    -        QUrl url(code);
    -        urlMap = code.remove(QRegExp("&itag=\\d+$"));
    +        // code.remove(0, 4);
    +        // QUrl url(code);
    +        // urlMap = code.remove(QRegExp("&itag=\\d+$"));
    + // (2012-12-20) Youtube Fix by RVM for SMPlayer (http://smplayer.sourceforge.net)
    +
    + /* qDebug("RetrieveYoutubeUrl::parse: code: '%s'", code.toLatin1().constData()); */
    +
    + int itag = 0;
    + QString n_url;
    + QString url;
    + QString s_itag;
    +
    + QStringList par_list = code.split(QRegExp("&|\\?"));
    + foreach(QString par, par_list) {
    + /* qDebug("RetrieveYoutubeUrl::parse: par: %s", par.toLatin1().constData()); */
    +
    + if (par.startsWith("url=")) url = par.mid(4);
    + else
    + if (par.startsWith("itag=")) {
    + if (s_itag.isEmpty()) {
    + s_itag = par;
    + QRegExp rx("itag=(\\d+)");
    + if (rx.indexIn(s_itag) != -1) itag = rx.cap(1).toInt();
    + /* qDebug("RetrieveYoutubeUrl::parse: itag: %d", itag); */
    + }
    + }
    + else {
    + if (!n_url.isEmpty()) n_url += "&";
    + n_url += par;
    + }
    + }
    + n_url = url + "?" + s_itag + "&" + n_url;
    + n_url.replace("&sig=", "&signature=");
    +
    + /* qDebug("RetrieveYoutubeUrl::parse: n_url: '%s'", n_url.toLatin1().constData()); */
    +
    + urlMap = n_url;
         }
         /*regex.setPattern("\\\"t\\\"\\s*:\\s*\\\"(*)");
         regex.indexIn(replyString);

    Works for me.

    Steven

     
  • john fortelka
    john fortelka
    2013-01-08

    Hi, Steve

    Thanks for the info.  For us civilians, does that mean I can go back to SMPlayer's website and click on the link to what they claim is the corrected UMPlayer, and have your fix incorporated into it?  I tried their "fixed" program a few days ago, and when I tried to run Youtube, it still wouldn't do anything.

    Thanks!

     
  • Steven Hum
    Steven Hum
    2013-01-09

    To my knowledge the smplayer dev team stopped supporting umplayer (i.e. they generously created an earlier patch for umplayer, acknowledging it as a fork of smplayer, but have not continued to do so, understandably, when youtube once again mashed their site). As they have updated smplayer to work with youtube (though, like you, I couldn't get it to work either!), and I just happened to like umplayer for its eye candy and shoutcast, i simply updated the umplayer src/retrievevideourl.cpp source file with the smplayer code manually with an editor and recompiled it.

    In the src/retrievevideourl.cpp source, look for the "void RetrieveVideoUrl::gotVideoPage(QNetworkReply *reply)" function. In there you will find a loop to the effect (depending on which version of umplayer source you have):

        foreach(QString code, codeList)
        {
            code.remove(0, 4);
            QUrl url(code);
            urlMap = code.remove(QRegExp("&itag=\\d+$"));
        }

    Replace the body of the loop (which is from smplayer):

        foreach(QString code, codeList)
        {
            // (2012-12-20) Youtube Fix by RVM for SMPlayer (http://smplayer.sourceforge.net)

            /* qDebug("RetrieveYoutubeUrl::parse: code: '%s'", code.toLatin1().constData()); */

            int itag = 0;
            QString n_url;
            QString url;
            QString s_itag;

            QStringList par_list = code.split(QRegExp("&|\\?"));
            foreach(QString par, par_list) {
                /* qDebug("RetrieveYoutubeUrl::parse: par: %s", par.toLatin1().constData()); */

                if (par.startsWith("url=")) url = par.mid(4);
                else
                if (par.startsWith("itag=")) {
                    if (s_itag.isEmpty()) {
                        s_itag = par;
                        QRegExp rx("itag=(\\d+)");
                        if (rx.indexIn(s_itag) != -1) itag = rx.cap(1).toInt();
                        /* qDebug("RetrieveYoutubeUrl::parse: itag: %d", itag); */
                    }
                }
                else {
                    if (!n_url.isEmpty()) n_url += "&";
                    n_url += par;
                }
            }
            n_url = url + "?" + s_itag + "&" + n_url;
            n_url.replace("&sig=", "&signature=");

            /* qDebug("RetrieveYoutubeUrl::parse: n_url: '%s'", n_url.toLatin1().constData()); */

            urlMap = n_url;
        }

    Recompile umplayer. This is working for me on debian.

    Hope this helps,
    Steven

     
  • Steven Hum
    Steven Hum
    2013-01-09

    Oh.. as a side note, I contacted the dev of umplayer. Umplayer is not dead. The vagaries of life have delayed the next release of umplayer.. but with luck, we may see a new version this year.

     
  • john fortelka
    john fortelka
    2013-01-09

    Thanks again, Steve.

    I'll keep on the lookout for new versions of both.  There are some features of umplayer I like, which I think have been developed further at this point (such as the audio equalizer) which would be nice to see in smplayer. 

    On the other hand, why do we need 2 versions of what is essentially the same media player?  Do I sense some personal pique or disagreement which resulted in two different versions of development of this excellent media player?

    Thanks!