Showing posts with label amarok. Show all posts
Showing posts with label amarok. Show all posts

Saturday, March 13, 2010

"Can Windows do this? " Part I

I've decided to write an ongoing blog that revolves around things I do that Windows, consequently, does not do. This may apply to OS-X as well.

Moving Files that are in Use:

As I'm listening to music in AmaroK, I tend to move the actual audio files into folders as to separate the good from the bad.
As long as the audio file is playing, I can move the physical file anywhere on disc without interrupting playback; I'm guessing the entire file is either loaded into ram or the filesystem points to references, not literal file locations.

Windows, however, will give a "File is in use" error whenever you try to move an audio file that is being played. Meaning that you can only move it after playback has ended. Now, it's no 'killer reason' to stop using Windows, but it's one thing I do that Windows doesn't support.
Needless to say, I love having the ability to move my files when I say it's okay.
Attempting to play the file after moving it will result in an error. Obviously.

Saturday, October 24, 2009

Installing Amaork 1.4 in KDE 4 (Kubuntu 9.10)

As per my previous post, playlist functionality was disappointing in amarok 2.x, so here's a brief tutorial on how to get it working in 9.10 (could work in 9.04 and others I'm assuming too). I am using the command line only, so a user should be somewhat familiar with using it, and installing packages via apt with it, as well as compiling sources.

(Please note, this may break your amarok 2.x application:
amarok: symbol lookup error: /usr/lib/libamaroklib.so.1: undefined symbol: _ZTIN6TagLib3MP44FileE , and I can no longer import a collection into amarok 1.4. LastFM does not seem to work.)

Amarok 1.4 source: http://openports.se/audio/amarok

1. Install.
You will need -dev packages for compiling. Some of these include: kdelibs-dev, kde-devel, xorg-dev, qt3 and qt4 -dev packages, build-essentials, gcc 4.3 or 4.4 (I'm also assuming you have g++ 4.3 or 4.4), and others that may crop up. There are forums that contain the packages you need to install.

(http://ubuntuforums.org/showthread.php?t=1263514 mentions the following packages to install)

sudo apt-get install cdbs comerr-dev diffstat fdupes gawk gettext-kde kdelibs4-dev kdesdk-scripts libaa1-dev libacl1-dev libart-2.0-dev libasound2-dev libaspell-dev libattr1-dev libaudio-dev libaudiofile-dev libavahi-client-dev libavahi-common-dev libavahi-qt3-dev libbz2-dev libcaca-dev libcucul-dev libcups2-dev libcupsys2-dev libcurl4-gnutls-dev libdbus-qt-1-dev libdirectfb-dev libdirectfb-extra libesd0-dev libfftw3-dev libflac-dev libgcrypt11-dev libgl1-mesa-dev libglu1-mesa-dev libgnutls-dev libgpg-error-dev libidn11-dev libifp-dev libilmbase-dev libjasper-dev libjpeg62-dev libkadm55 libkrb5-dev liblcms1-dev libldap2-dev liblua50-dev liblualib50-dev libmad0-dev libmng-dev libmpcdec-dev libmtp-dev libmusicbrainz4-dev libmysqlclient15-dev libncurses5-dev libnjb-dev libofa0-dev libogg-dev libopenexr-dev libpcre3-dev libpq-dev libqt3-compat-headers libqt3-headers libqt3-mt-dev libsasl2-dev libsdl1.2-dev libslang2-dev libsqlite3-dev libssl-dev libsysfs-dev libtag1-dev libtasn1-3-dev libtiff4-dev libtiffxx0c2 libtunepimp-dev libusb-dev libvisual-0.4-dev libvorbis-dev libxine-dev libxml2-dev libxmu-dev libxmu-headers libxslt1-dev lua50 mesa-common-dev qt3-dev-tools quilt ruby1.8-dev

I'd recommend viewing the blog as it has a lot of info regarding amarok 1.4.

Another quick mention: MTP. This will give you grief unless you have the right version. The issue is, you need to downgrade to 0.2.6.1 in order for this to work.
Source: https://launchpad.net/ubuntu/hardy/+source/libmtp/0.2.6.1-2ubuntu1
This one should be an easy .configure/make/make install (as root)

You will also need xine, and might need to compile it from source as well (I did)

2. Ruby.
This one deserves its own point, because it may give you a lot of grief. Install Ruby1.8 or higher (I used Ruby1.9.1) as well as having the rubyfull and ruby (ruby-dev) packages. If amarok is still spitting out some ruby header errors, then do the following:

sudo apt-get install --reinstall ruby

That fixed it for me, but make sure you have ruby installed.

3. Configure.
I'm assuming you have the source extracted, packages installed, and are ready to configure. First, my recommendations:
./configure --without-arts --program-suffix=-1.4
(I didn't add this, but you probably should. '--enable-mysql')

Don't build with arts, as 9.10 and other new-ish versions tend to use xine and pulse.
I added the prefix so I can run both amarok 2.x and amarok 1.4.10.
Be sure to google any errors that occur, many of them are self-explainatory.

4. Make
Here's where you will need to know if you have gcc 4.3 or gcc 4.4.
According to an Arch package report, having the updated 4.4 version will require some cpp file editing.

Source: http://aur.archlinux.org/packages.php?ID=25712
It's not too difficult even for noobs, but definitely detracts from the experience. Make-ing is the last difficult part of installing amarok 1.4.x.

If compiling with gcc-4.4 and up (as I did), some .cpp files will create errors so you have to add '#include ' to those classes (at the top of the file, I put them before the other include statements) OR '#include ' if that fails. (you may get this error: "error: 'rename' is not a member of 'std'", and including stdio.h will not fix it).
If you are using gcc-4.3, this shouldn't be an issue, but I have not tried it.
I edited approximately 8 .cpp files total. (you can use kate, nano, or any text editor.)

Once make-ing is done, then type

sudo make install

This should go without a hitch.
To run amarok, you MUST call amarokapp-1.4 (program suffix = -1.4, remember)
not amarok-1.4.

One issue I encountered is that the default .ogg file with Matthias's 15 second clip did not play. I already had installed mp3 codec support by running amarok 2's install script so mp3s play great. If I have any issues along the way to using 1.4 now, I'll post them on this blog.

I hope this helps many users hoping to regain the functionality of a quality audio player.
I am not going to test a lot of extra functionality, mostly playlist, tagging, and last.fm support.

You can comment or e-mail me if you'd like a hand, but don't expect a solution.

Anyway, cheers all.

EDIT: Just as a point of interest, amarok2 saves playlists in a .xspf format, which is why the amarok1.4 'm3u' extension is not found. I heard that when a collection is being updated, any playlists should be automatically added. I added the playlists to the /home/$USER/.kde/share/apps/amarok/playlists folder after I updated my audio, which could explain it. But I'm sure you diehard 1.4 fans don't mind.

Tuesday, June 2, 2009

Amarok: id3 tags and me

If you're like me and (1) you have a large music collection and (2) you've copied data from an ipod off the harddrive, you've probably thought about renaming your music via the id3 tags.

For newbies, an id3 tag is part of the audio file that stores the title, artist, year, track #, genre, etc. Regardless of what the file is called, this data remains intact.
Now if you are familiar with an ipod, it stores mp3's in strange, 4 character names that make no readable sense.

I use (and swear by) GNU/Linux systems. AmaroK has done everything I've ever needed when it comes to audio especially when it comes to handling large collections.

Where is this leading to? I had over 60GB of audio that I copied from my ipod before I sold it for a superior Cowon machine. (D2+ anyone?)
I wanted all the music to be in the standard Artist - Title.ext format, but I can't rename all 60GB by hand. There used to be a python script I used before that would batch rename all my files to their id3 tags, but lost it after some reformatting, etc.
I've tried looking up other methods, id3ren is one of them, plus a python script someone posted on a forum. They worked very well for me, but I never actually realized amaroK had this functionality built in. It's not obvious at all!

So for those who use amaroK and want to convert the filenames to their id3 tag counterparts, here's the solution:

Select the mp3's you want to rename.

Right click, go to Manage Files -> Organize Files

It's flexable and easy, requiring no extra programs.
Being somewhat of an audiophile, I wish I could have known about this earlier.

Thanks to the folks at amaroK for showing me how.
Peon out.