bradubuntu linux

My experience setting up a computer with Ubuntu linux

11 April 2007

Automatic Random Music Sync

As I was messing around with my laptop last week, I quickly realized that all the major ubuntu music jukebox players don't shuffle music to mp3 players. My mp3 player is only 1 GB, which is much smaller than my music library. In Windows Media Player, I click on the "shuffle" button and it automatically deletes all the music on my player and refills it with a random selection from my music library. I love this functionality in WMP, but there is no current support for this in Rhythmbox or any other of the main music players.

However, I found a random sync script on the internet. There are pretty clear instructions on how to enable the script as well. However, it doesn't do everything I want it to. For example, I don't want to select the source and target directories every time. I want to shuffle from the music folder on my PC to the music folder on my mp3 player every time. So near the top of the script file I added the definitions

tgtPath="/media/TELECHIPS/Music"
srcPath="/media/hdb1/mp3"

Ubuntu recognizes my mp3 player as TELECHIPS, although Rhythmbox correctly recognizes it as a Cowon iAudio U3. Also, my music library is on my second hard drive (hdb1).

Because I define the target and source directories, I had to comment out a few lines in the script for selecting those directories. The script allows for multiple targets and sources, so there were a couple "for" loops to comment out as well. The script does not delete music on my mp3 player, so near the top of the script file I added the line

rm -r /media/TELECHIPS/Music/*

which deletes all files and folders in the Music directory.

So here's how it works right now. I plug in my mp3 player, and it shows up on my desktop. I right click on the mp3 player (or on any folder for that matter) and select "randomsync" from the script menu. A popup tells me how much space is available and asks how much space I want to fill. After I click OK, the auto random sync runs. When finished I right click on the mp3 player and select "unmount". I wait a bit for the actual file transfer to happen, then another popup tells me I can unplug my mp3 player. This is actually easier than using WMP!

I Jumped the Gun

I was planning to wait until the official release of Ubuntu 7.04, but I couldn't. So I've installed 7.04 beta onto my home PC will all my music. It's a dual-boot setup, so I can either load up ubuntu or Windows XP if I want. The main issue with my home PC is my video card, since it needs the official Nvidia drivers rather than the free unofficial drivers. The free drivers won't output signal to my TV, so I have to plug in an extra computer monitor during the installation. Luckily, ubuntu 7.04 includes a "Restricted Drivers" application to check for necessary drivers. It identified my video card and automatically downloaded and installed the official Nvidia drivers. But that didn't start TV-out right away. Although there's not control panel that I could find, I could type

nvidia-settings

In the terminal to open the Nvidia control panel. I disabled the monitor and enabled TV-out with a slightly lower screen resolution (so that I can actually read text on the TV). Everything works great now, and it was so easy. You can check in the archives of this blog to see how difficult it was to enable TV-out last time I tried ubuntu.

The other cool thing is that Ubuntu 7.04 automatically mounts all available hard drives, which was something I had trouble with last time I tried. All my music and movies are on my second hard drive, and that showed up on my ubuntu desktop automatically.

04 April 2007

Ubuntu media players

I brought in my mp3 player from home with about 140 random songs on it and a few video clips. After plugging in the USB, the player showed up on the desktop and I was able to transfer files to the laptop. Right-clicking on the mp3 player icon let me eject it from the laptop without having to use text commands at all. This is so frickin' easy!

Ubuntu comes with Rhythmbox, which is standard for all Gnome linux operating systems. It is modeled after iTunes and works pretty well. Here are the features I need in a media jukebox:
1. support for very large music libraries
2. support for mp3 and unprotected wma files
3. the ability to lookup and search for song or album information from a database
4. renaming files based on song or album information
5. real-time monitoring of my music directory for added or removed files
6. automatic shuffling to my mp3 player

Rhythmbox is great for 1, 2, and 5, but there's no way currently (that I can figure out) to lookup song information. You see, right now I have Windows Media Player setting all that information, and often it gets things slightly wrong, like putting composer info instead of artist info. So I want to correct those errors. I also want all my music organized into directories based on this info, and WMP works well for that. When I add a bunch of new music, I just save them to my "upload" directory, and WMP does all the work of renaming them and moving files to the proper directories. But unfortunately, Rhythmbox doesn't do that. But it does monitor file changes, including song and album information, which is great. It even knows when songs have been deleted, which a lot of media players don't do.

The Rhythmbox website recommends EasyTag for editing song information. It's pretty powerful, and can work on lots of songs at the same time, but it's not really that straightforward to use. It looks up song information from a database, and it can also rename files based on song and album information. The only problem is that it doesn't give any album details, so if there are a number of versions of the same album (like a US and a UK version) it can be difficult to distinguish the two. But I can use EasyTag to find song information and let Rhythmbox update its music library with the new information without skipping a beat.

I also tested out other media jukeboxes like Banshee, BMPx, and Exaile. I stayed away from XMMS and Audacious because I never liked the look and feel of Winamp. Banshee was nice, and even offered music recommendations, but it wasn't easy to browse my music library, it couldn't lookup song information, and it couldn't automatically update the music library for added or missing files. I deleted Exaile right away because it was too clumsy, and there was no easy way to browse songs by artist (you had to go down to the album level to see a list of songs). But Exaile might be good in the future because it has built-in wikipedia support. BMPx was interesting, because it was an entirely new interface from what I'm used to. It has a lot of options for internet radio and podcasts, but the best thing was the way it looks up song information. It pops up a new window and looks for album information from both Amazon.com and free database called MusicBrainz. For the results, it shows both the album cover and a song list, which helps figuring out which version of the album I'm looking for. In fact BMPx seems to do everything except that it's not good for browsing through a large media library. The base level of organization is by album rather than by artist, which makes the list much longer than it needs to be. I'll keep it around to see if it gets better in the future.

No wireless, but music and video

Well, the upgrade went well, so now I'm running Ubuntu 7.04 beta on my old laptop, and it seems pretty cool. I think it's better than the older version.

I couldn't get my wireless card to work right, though. I must admit, however, that I didn't put as much effort into it since I don't really need it right now. NDIS wrapper comes installed in 7.04, so I didn't have to download it. I used the same couple of commands as before to get the driver installed. I also found a program called "Windows Wireless Drivers" in the "Add/Remove Programs" application which does the same thing without text commands. Anyways, once the wireless driver is installed, Network Manager is supposed to handle everything. It sorta does. I can see all of the nearby wireless networks, but I just can't connect to them. Maybe this will be fixed in the official version. I'll just use the LAN in my office at ASU for now.

I'm testing Ubuntu on this laptop to make sure it will work for my PC at home. This PC is very important because it holds my entire music collection and a large number of downloaded videos (mostly anime that I haven't had time to watch yet). So I want to make sure ubuntu can play mp3 and unprotected wma files, as well as play all sorts of video formats. I would also like a nice media jukebox application and a video editor.

The first thing to do when installing ubuntu 7.04 is to go to "Add/Remove..." and show "All available applications". Then search and select "Ubuntu restricted extras" for installation. This single package does much that EasyUbuntu and Automatix2 does. It installs many of the audio/video codecs that you might need, a Flash player for Firefox (so you can watch YouTube videos), Microsoft fonts, and Java. If there is a audio/video file you can't play still, 7.04 also will try to find and download the proper package for you, so you don't have to. These are new features and they make Ubuntu so much easier to use.

But I still need to pick an appropriate media jukebox...