Windows adventures

Once upon a time Stefan Brück built Minitube with Visual C++ and the DirectShow Phonon backend. Alas the DirectShow backend had problems streaming YouTube videos. Then came Marco di Antonio and built Minitube with the Mplayer backend, he did a great work but mplayer was incredibly unstable and crashed all the time. Weeks passed and still no Minitube for Windows.

I spent the last few nights setting up a virtualized Windows XP and trying to finally get a working Minitube on Windows. First of all, Windows sucks, as you may already know. By contrast Qt 4.6 is so awesome that it can build cleanly with Mingw, the Windows GCC port, and this gave me hope. The DirectShow Phonon Backend used to require Visual C++, fortunately this is no longer the case. So it is very easy to have Minitube use DirectShow. It has problems with YouTube video streams. Maybe they can be worked around but, even if that was the case, users would have to install codecs separately. I tried to install FFDShow, ffmpeg ported as DirectShow codecs, but miserably failed both on XP and Vista. I can barely imagine what would happen if I release Minitube that way. Thousands of angry Windows users, with zero respect and knowledge of what Free Software is, would flood with the comments, emails and negative reviews.

Plan B: the Phonon VLC Backend. Lucky enough KDE people are actively working on a VLC backend for Phonon. I spent a few days trying to compile it using their CMake-based build system. I may be an idiot, a Windows noob or a KDE noob or the three together, but I couldn’t build that DLL. So I decided to replace the build system altogether and use QMake. Ten minutes and I had my phonon_vlc.dll.

So does this mean Minitube for Windows is ready? No way. From what I can understand VLC has problems decoding the video stream, especially the AAC audio. It stops playing the video, not even randomly but always in the same place. Sometimes it recovers, sometimes it skips to the next video. But in general VLC feels like the more solid solution. I’ll try to get in touch with VLC people and get help.

To be continued…

  1. Marco Di Antonio says:

    Ciao Flavio, riscarica la build che ti diedi tempo fa e sostituisci mplayer.exe con questo nuovo compilato in Novembre 2009 con gcc 4.2 :
    http://sourceforge.net/projects/mplayer-win32/files/MPlayer%20and%20MEncoder/revision%2029851/MPlayer-rtm-svn-29851.7z/download

    Fammi sapere se mplayer crasha di meno :)

  2. Flavio, I nearly did get Minitube to compile with Qt 4.6 on Windows with MinGW. There was a single error blocking it.

    “C:\projects\minitube\src\main.cpp:28 – ‘PKGDATADIR’ was not declared in this scope”

    There was a warning too: “C:\projects\minitube\src\\Constants.h:12 – ‘Constants::EMAIL’ defined but not used”

    Maybe you can fix these real quick? I did this with the latest Minitube release, Minitube 0.8.1…

  3. Flavio says:

    Sir Gallantmon: Compiling with Mingw is not a problem since Qt 4.6. What’s blocking Minitube for Windows is a VLC bug, maybe this one: https://trac.videolan.org/vlc/ticket/2969 I’m testing VLC nightly builds every once in a while. When VLC trunk is be able to play YT videos, we’ll be ready to go.

    Marco, proverò al più presto, ma in generale penso che il backend VLC sia la scelta migliore.

  4. Ummm… I am using Qt 4.6. Specifically, I’m using Nokia’s Qt SDK 2009.05 package, which includes Qt Creator 1.3, Qt 4.6, and MinGW 4.4.

    That error occurs WHILE compiling with Qt 4.6… Also, that bug is marked closed and fixed. The trunk can currently play YouTube videos fine. Heck VLC 1.0.3 has been playing videos fine for me as well.

  5. Flavio says:

    That build error is very simple to fix, I wasn’t even considering it. Just replace PKGDATADIR with “” for now…

    Yeah I know that bug it’s marked as closed. I contacted a VLC dev in IRC, he told me that Windows libraries in the nightly builds needed an update to see the fix or something like that. I may be wrong of course, feel free to prove me wrong by building a working Minitube ;)

  6. Hans says:

    Dear Flavio,
    I just compiled Minitube for WindowsXP.
    But as you said before, I could not see any video screen in minitube.
    So have you finished your job about porting phonon-VLC ?
    If you have any idea, could you tell us how to build phonon-VLC?

    Thanks,
    Hans

  7. Flavio says:

    Hans, KDE people are working on VLC Phonon. I just had to compile it. It works fine with VLC 1.0. In order to use it with VLC 1.1 a few fixes are needed due to API changes. I built Phonon-VLC using qmake. just go on the root dir and type qmake -project. Then build using the generated Makefile

  8. Chaz6 says:

    I would very much like to try the version you compiled for Windows with Directshow. I have ffdshow-tryout installed so it should be capable of playing youtube videos. I am curious what trouble you had, since I have not encountered problems installing any build. The latest I can find as of 2009-02-01 is http://www.mirrorservice.org/sites/download.sourceforge.net/pub/sourceforge/f/project/ff/ffdshow-tryout/SVN%20builds%20by%20albain/generic%20builds/ffdshow_rev3251_20100131_dbt_.exe.

  9. Flavio says:

    Looks like the VLC bug blocking Minitube has been reopened. https://trac.videolan.org/vlc/ticket/2969
    Also a guy in the #videolan IRC channel told me he’s going to fix phonon-vlc compilation issues with VLC 1.1. The pieces of the puzzle are falling into place…

  10. ale5000 says:

    [quote]
    [17:52] good news on the Phonon-VLC front: After some more bug fixing it mostly works now with Amarok :)
    [17:52] a few days more polish, and we’re there
    [/quote]

  11. Flavio says:

    @ale5000 ci riprovo appena avrò la forza di rilanciare Windows dentro il VmWare. Grazie della segnalazione

  12. Dan Lennoski says:

    Dude, seriously, forget about Windows. Put your focus on Mac and Linux. Windows already has too many programs. Makes your life and the life of the Free Software easier. :)

  13. Jack Leath says:

    No, don’t forget about Windows. The vast majority of Flash users run Windows, so to provide a non-flash alternative for YouTube streaming – and an open source one at that – is, well, a step in the right direction. The Linux and Open Source communities cannot ignore Windows if they expect to make any real inevitable impact in the world. It’s the Open Source people who are providing creative solutions for Windows users that are making all the converts.

    If you aren’t clued in to the Open Source scene because you are convinced Open Source is the way to go, then you are here because you are convinced it is the “cool” way to go. And that makes you a poser. And by definition, posers don’t want the populace to hold the same social ranking they do. Bam. I want some chocolate.

  14. linuxluver says:

    Perhaps you could check out VLC’s play video stream option and maybe try to build the gui around that…
    I’m no programmer(not yet at least) but its an idea.