December 1, 2008

Managing your MP3s with Zina

Author: David Pendell

Large collections of MP3 files can be hard to manage. Organizing your music into directories helps some, but when you want to play just those tracks in a certain genre or from a certain year, no amount of directory organization will help -- but Zina, a powerful Web application, can.

Zina is easiest to set up if you already have a home Web server. You must understand how to set up CGI applications on your Web server. If you're using Apache, you can read a nice tutorial for basic CGI setups. You must also have PHP in your Apache setup, as that is the language that Zina is written in.

Zina also provides modules for integration into Joomla!, WordPress, Drupal, and Xoops.

As my test bed, I used the Amahi Linux Home Server. Installation on Amahi is simple. First, click on the setup button at the top of Amahi's top bar and then click on the Web Apps tab. Click on the New Web App button, enter the name "zina" in the name field, and click Create. Download the latest release and copy it to the /var/hda/web-apps/ directory on the Amahi server. Untar it in that directory and make sure that the untarred information is in a directory named zina. Delete the .htaccess file in the zina directory, then run the command chmod -R apache:users zina. That's it -- installation is finished. You can enable some other features for tracking statistical information by installing MySQL, but they are useful mostly if you are serving music to many people.

Once Zina is installed, point your Web browser to http://zina, click on the login icon in the upper right corner, and enter the default admin username and password. You should change them right away by clicking the gears icon that appears next to the padlock and moving to the authentication page under the navigation settings. You should also specify the path to your music files in the settings.

Now you can start using Zina. Begin by clicking on the Artists link. If your music collection is arranged into folders and there are ID3 tags in the files, you should see a list of links to the artists and albums in your collection. If there are no ID3 tags, Zina will try to use information in the name of the MP3 files. To add icons for each album, direct your browser to allmusic or a similar site that has cover art and download the cover art by right-clicking on the image and clicking Save image as, or scan your own. Copy it to the directory that contains the album to which it belongs. If you have a parent directory for an artist and you place a picture in that directory, that picture will show up on the artist's page in Zina. If the albums are in sub-directories, you can place album art in each of those subdirectories and it will display when you bring the album up. It doesn't matter what you call the file -- Zina picks up any JPEG, GIF, or PNG image that you put in the album's directory.

Once you have the album art the way that you want it, you can start using the program. Click on one of the albums and you will be presented with a picture of its cover art and a list of the songs on it. To play one of the tracks, simply click the link for it. Whatever program you have set up to play m3u track lists will automatically open and begin playing the track. I tested Amarok and Rhythmbox, and found that Amarok handles the m3u lists better than Rhythmbox does.

If you want to do more than play individual tracks, you can set up playlists in three ways. The first method, to create a playlist that will play the entire album, is to click on the speaker icon or "Play album" text next to the speaker. Alternatively, to listen to just selected tracks on an album, check the tracks you want in the interface, then click the speaker icon to play the selected tracks. If you want to save your selections as a playlist, then a third option is best. Ignore the button that says "Create custom playlist," as it seems to do nothing, and instead click on the option box next to the tracks you want and click on the green "add to" icon at the bottom right of the page. A page will appear to ask the name of the playlist. Once it is named, you will see a page that shows the playlist along with some icons that allow you to rename, delete, and play the selected playlist. To add more tracks, click the Artists link in the upper left and you will be back to the main page, where you can duplicate the process with another album. A playlist can encompass as many tracks from as many albums as you wish, and you can create as many playlists as you want.

To play a custom playlist, return to the Artists page and select the playlist from a drop-down list. Click the speaker icon, and your media player should automatically begin playing the playlist.

You can also access Zina over the Internet. If you want it to be simply a music streaming system, you can change an option and turn off downloads. If the system you're making available is on your home server, you may want to implement a virtual private network for publishing through a firewall, or use network address translation and port forwarding to make the Zina available to the public.

Zina has numerous other features that are available in the settings page. You can sort and play tracks by genre. You can configure Zina to show lyrics with each song, as long as you already have the lyrics. Unfortunately, you have to enter them in to a text file manually, and the documentation for doing this is somewhat sparse. You can display information about an album in a caption under the cover art by creating a text file with the same name as the graphic. You can also have Zina stream files with lower sampling rates that mirror the high-quality files for people who want to listen to your music over dialup, or do on-the-fly resampling with LAME. Zina can also stream other media files, including video. Other features include and Twitter integration, allowing you to send listening habit information to each of these sites.

Unfortunately, the documentation for Zina is quite sparse. There is a discussion forum where you can ask questions, but if you need more support than that, you are on your own.

Zina is a powerful program, but marred by a lack of good documentation. Fortunately, Zina's strengths overcome its faults. Playlist generation, music streaming, and music organization are this Web app's strengths.


  • Graphics & Multimedia
Click Here!