# Recording

Most stations that stream MP3 or OGG music can be recorded. This is accomplished through the command-line tool streamripper. If you select a station and press `●` record, a console window should appear, where streamripper shows its progress.

You can configure the recording tool according to audio types again. Usually you want to use the %srv placeholder.

## Streamripper

There's already a default entry for recording radio stations:

Format | Application
audio/* | xterm -e streamripper %srv

Streamripper has a few more options of its own:

1. To define an exact download directory:

   - xterm -e "streamripper -d ~/Music/ %srv"

2. Use a specific filename pattern:

   - xterm -e "streamripper --xs2 -D '%S-%A-%T-%a.mp3' %srv"

3. Just record a continuous stream, for 1 hour, without splitting individual songs from a radio station:

   - xterm -e "streamripper -A -s 3600 -d ~/Music/ %srv"

4. Pretend to be an audio player (in case recording is blocked):

   - streamripper -u 'WinampMPEG/5.0' %srv

Whenever you leave out the xterm prefix, it runs silently in the background. Common xterm alternatives are x-terminal-emulator, or rxvt, gnome-terminal, and xfce4-terminal etc.

See the streamripper(1) man page or its FAQ for more tips.

## fIcy/fPls

As alternative to streamripper, check out fIcy/fPls for recording ICEcast/SHOUTcast streaming servers.

It can be configured just as easily with:

1. xterm -e "fPls %pls"

## Graphical stream recording tools

You can also try a streamripper GUI or graphical reimplementation:

- StreamRipStar (Java), works best per drag and drop; set the DND format to PLS or M3U however.

- Streamtastic (Java), only imports a text entry per drag and drop.

- KStreamRipper, though no current version in distros.

- VLC has built-in recording capabilities.

Which all simplify defining a custom download directory, or how radio streams are split (between advertisement breaks), and the naming scheme for resulting *.mp3 filenames of course.

## Youtube-DL

The recording settings already have a specific entry for "video/youtube" URLs.

To configure a custom download directory, use:

1. xterm -e "cd /media/music ; youtube-dl %srv"

The cd trick also works with streamripper, or other tools.

## Wget for MOD files

To download audio files from The MOD Archive directly, you can also define a custom handler.

1. Scroll/click on the ⎘ empty row in the recording application list.

2. There create a new recording MIME type:

   - audio/mod+zip

3. Specifiy a command like:

   - xterm -e wget %srv

   - cd ~/Desktop ; wget %srv

   - curl %srv

All MOD file formats (IT, XM, S3M, etc.) are mapped to this generic type specifier.