Saturday, February 17, 2007

Got vlc_engine working with 1.4.5

Finally got amarok 1.4.5 to recognize vlc-engine plugin and play streams and files on Kubuntu Edgy x86_64.

  1. I started with the ver0.2 source files posted by Eric Alber on the amarok mailing list available here and extracted it under amarok/src/engine directory. I did not have to modify MODULE_SYMBOL as I have 'vlc 0.8.6 Janus' running on my system.
  2. The first step was to add vlc subdirectory to the Makefile.am
    if with_vlc
    VLC_ENGINE_SUBDIR = vlc
    endif
    SUBDIRS += $(VLC_ENGINE_SUBDIR)
  3. Then I needed to modify/correct the amarok_vlc-engine_plugin.desktop file.
    X-KDE-Library=libamarok_vlc-engine_plugin
    X-KDE-Amarok-framework-version=28
  4. Then modified VlcEngine.cpp to return true for http streams in canDecode() function and implement unpause() virtual function.
    if (url.protocol() == "http")
    // play http streams
    return true;
    ------------------------------------
    void VlcEngine::unpause()
    {
    pause();
    }
  5. Then modified configure.in.in file in amarok directory to include VLC into generated ./configure script.
    ###############################################################################
    # BEGIN VLC CHECK
    ###############################################################################

    AC_ARG_WITH(vlc,
    AC_HELP_STRING([--with-vlc],[build Amarok with vlc-engine]),
    [build_vlc=$withval],
    [build_vlc=no]
    )

    if test "$build_vlc" != "no"; then
    AC_PATH_PROG(VLC_CONFIG, vlc-config, no)

    if test $VLC_CONFIG = "no"
    then
    amarok_warning_vlc_notfound=yes
    echo "amarok_warning_vlc_notfound: $amarok_warning_vlc_notfound"
    build_vlc=no
    else
    AC_DEFINE(HAVE_VLC, 1, [have VLC])
    CFLAGS_VLC=[`$VLC_CONFIG --cflags`]
    LIBS_VLC=[`$VLC_CONFIG --libs`]
    build_vlc=yes
    fi
    fi

    AM_CONDITIONAL(with_vlc, test x$build_vlc = xyes)
    AC_SUBST(CFLAGS_VLC)
    AC_SUBST(LIBS_VLC)

    ###############################################################################
    # END VLC CHECK
    ###############################################################################
  6. Then modified configure.in.bot file in amarok directory to tell whether vlc is included/excluded in configure.
    if test x$build_vlc = xno; then
    echo " = - vlc-engine"
    fi
    if test x$build_vlc != xno; then
    echo " = + vlc-engine"
    fi
  7. Then run "make -f Makefile.cvs" to generate the proper configure script. Then the usual steps like ./configure, make, make install. (Make sure that ./configure step creates the Makefile in the vlc directory.)
  8. Then extract vlc-settings.xml file from here in ~/.kde/share/apps/amarok directory and modified it according to my requirement.
  9. Next after running amarok, VLC engine should come up as one of the options in configuration->engine options.
Here is my new version of file with all the above modifications - amarok-vlc-engine-0.3.tgz

Friday, February 9, 2007

Extended amarokFS to contextFS

Here is a program inspired by amarokFS to show the context browser in fullscreen mode.

Tuesday, February 6, 2007

Fullscreen mode of Amarok

Now that somebody has developed a script called amarokFS to display fullscreen version of the player, it can be made the foundation for some of the ideas. Discussion at http://amarok.kde.org/forum/index.php/topic,13637.0.html

Monday, February 5, 2007

Improvement ideas for Amarok 2.0

I had posted some improvement ideas for Amarok on the forums at http://amarok.kde.org/forum/index.php/topic,13537.0.html
The gist of it is that Amarok is the only music player which is different from most of the linux music players where it's primary display is not to show howto manage music collections but show what it is playing and it's associated information such as lyrics, artist info, listening habits and the artist's community.

MTP devices don't play nice with Amarok

Subsequent to my earlier post, I have come to know that MTP devices don't play very nice with Amarok. One of the main drawbacks is that one cannot play a track directly from the device. Instead he has to copy it to the collections db to play it. So that means I cannot preview the song before copying it to my main collection.
The reason for this is that the internal url for those tracks are kept as file://. and since technically it is not mounted on the root folder, amarok cannot find it at that location. Instead it should store something like mtp://., so that when amarok asks for it a proper handler for mtp:// can read the track and send it to amarok to play. See the discussion at http://amarok.kde.org/forum/index.php/topic,13614.0.html

Amarok and Nokia Nseries

Glorious day today (it was a few days back), finally got Amarok detect my Nokia N75 as a media/MTP device and I can browse the playlist. This site was really helpful. I suppose this can be applied to any Nokia S60 3rd generation phones. Next I have to make it play and transfer tracks.

Hindi module for wiki-lyrics script

I have added iTRANS/hindi as an extension to wiki_lyrics script available here. Now it has been folded into the main script and cleaned up. Make sure that the itrans executable is the one for your platform. The default script has i386 executable whereas the original has both i386 and x86_64 version of the itrans executable.

Only load scripts with .spec file

I have modified the scriptmanager to load only those scripts which have .spec files associated with them - here. This way it will avoid to load every executable scripts under the scripts directory and will load only those which have associated .spec file.

lyrics page has conditional 'Powered by' line

I have modified the lyrics viewer of contextbrowser not to show 'Powered by' line if site and site_url tags not present in .spec file (in cases where the scripts want to handle them selves) - here.

Hindi lyrics script for Amarok

Created a lyrics script to fetch lyrics of hindi songs from giitaayan.com and show them in devnagari script using iTRANS. It falls back on Lyrc or Astraweb for non-indian songs. The latest version can be downloaded from http://www.kde-apps.org/content/show.php?content=50890 or an earlier version here.