Multimedia

Mplayer
Mpd
Audacious
Grip
TagTool
Audacity

Mplayer

Mplayer is an absolutely awesome movie player, that supports tons of formats. I prefer not to have the gui (it's never worked well for me) so I edit my make options.

vi /etc/make.conf

Adding the following lines:

.if ${.CURDIR:M*/multimedia/mplayer}
WITHOUT_GUI=yes
.endif

If you're running FreeBSD on something other than i386 (i.e. AMD64), make sure you add the following line to the middle of the above section of mplayer-specific make flags:

WITHOUT_WIN32=yes

And now for the install:

cd /usr/ports/multimedia/mplayer
make install clean

You can run it with:

mplayer filename

Mpd

Mpd is the Music Player Daemon. I've yet to find an audio player that compares.

cd /usr/ports/audio/musicpd
make install clean

Exit back to your user. Now we'll set up the config file (you can either copy the example configuration from /usr/local/share/doc/mpd/mpdconf.example or just create a new file as shown here).

vi ~/.mpdconf

Now edit yours so it looks as follows (I'll explain the relevant lines below).

######################## REQUIRED PATHS ########################
music_directory "/fat/media"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
error_file "~/.mpd/mpd.error"
################################################################

######################## DAEMON OPTIONS ########################
user "xaenn"
bind_to_address "127.0.0.1"
################################################################

############################# MIXER ############################
mixer_type "oss"
mixer_device "/dev/mixer"
################################################################

######################### NORMALIZATION ########################
volume_normalization "yes"
################################################################

Okay, this isn't really that bad. At first we setup the proper directories for mpd. There's no need to change them except for the first one, which is the location at which you save your music (mine is on a fat32 partition: /fat/media). The user is whatever user you would like mpd to run as (I chose my regular user xaenn). I had to bind address to 127.0.0.1 in order to get it to work, but if you'd like to get other network clients to connect this probably won't work. Leave the mixers as they are. Finally, I decided to turn on volume normalization.

Next we have to create some directories:

mkdir ~/.mpd
mkdir ~/.mpd/playlists

Now we can run mpd for the first time.

mpd

Note that the first time it will have to create a music database. Afterwards, you will simply need to use one of the clients in order to update it. Now we'll need some clients to connect and control our music server. First we'll install mpc. It allows us to issue text commands to control mpd. This will be useful for hotkeys.

cd /usr/ports/audio/mpc
make install clean

In order to load files to a playlist you'll have to choose a directory/files to load to the playlist. My music directory is /fat/mp3 so in order to load the directory /fat/mp3/Artists I would do the following.

mpc add Artists

There are a few other useful commands that we can issue with mpc. Toggle toggles play and pause. The update command will update your music database. Use this anytime you add or delete songs.

mpc toggle
mpc next
mpc prev
mpc random
mpc update

Controlling mpd at the command line like this fine and dandy, but not exactly practical. I introduced it first because it can be useful for scripting and hotkeys. Now let's install ourselves a frontend for mpd. It is called ncmpc.

cd /usr/ports/audio/ncmpc
make install clean

Just bring it up as follows.

ncmpc

And you will be greeted by a very nice looking screen in your terminal. Hit 1 in order to get to the help screen. It is pretty self explanatory and you can take things from there.

In order to make using mpd a bit more enjoyable, I wrote a simple little script. Of course put it in ~/bin/ and make it executable (chmod 755) to use it.

#!/bin/sh
mpd
mpc add Artists
ncmpc

Of course switch artists with whatever you would prefer for your default playlist.

Audacious

Audacious is a small media player that is comparable to Winamp 2.x.

cd /usr/ports/multimedia/audacious
make install clean

Audacious is split up into two ports, and the second is for its plugins. Without the plugins you won't even be able to play music, so it is important to install them. The majority of my music is in the .ogg format, so I find it very important to enable .ogg support before building the plugins.

vi /etc/make.conf

Add the following line:

WITH_VORBIS=yes

Now we can continue with the install.

cd /usr/ports/multimedia/audacious-plugins
make install clean

To launch Audacious use the following command:

audacious &

In my opinion this default skin isn't the most attractive. Fortunately, we can still use XMMS skins. You can get some here. Just place the .zip in /usr/local/share/audacious/Skins.

Grip

Grip is the ultimate utility for all of your cd ripping needs.

cd /usr/ports/audio/grip
make install clean

Now you can probably guess how to run this.

grip &

Most configuration is quite straightforward. Of course you'll want to set it to .ogg for the encoding format. In this screenshot you can see how I set the output for filenames.

TagTool

You may think that a utility for editing tags on your music files is quite useless when grip can do it automatically for you. However, some of us have already ripped many music files without using grip, and it may be useful to edit their id3 tags. TagTool is perfect for the job. Furthermore, TagTool supports batch renaming and many other nice features.

cd /usr/ports/audio/tagtool
make install clean

It is run as follows:

tagtool &

Audacity

Audacity can be used to edit sound files. I've found it to come in handy in a fair number of cases. I like to think of it as somewhere between sound recorder and Cakewalk.

cd /usr/ports/audio/audacity
make install clean

And if you want to run it...

audacity &