Extend Amarok with useful scripts

488

Author: Razvan T. Coloja

Amarok is a popular audio player under Linux. It can manage external storage devices, transfer music to your iPod, display lyrics, and play various formats. Although Amarok supports scripts to extend its functionality, not many users know about the powerful features that these simple plugins can provide.

Audio conversion

With Audio Format Converter, you can convert audio file formats between FLAC, Ogg, MP3, MPC, M4A, and WAV. Launch this Python script from Tools -> Scripts Manager with the Run button. It will ask you where you want to save the resulting files, what naming convention you want to use for them (track number plus title, subfolders with artist’s name, album and the file as a song title, or just a simple file with all three as the basename). Finally, depending on the audio converting tools already installed in your system, Audio Format Converter lets you choose an output file format and quality setting. It performs the conversion in the background, with only a popup message announcing the beginning of each process; in the meantime you can listen to your favorite songs.

You can also try transKode, which you may find easier to use. It does the same thing as Audio Format Converter but is accessible from the playlist context menu.

Web access

PlaylistServer is preinstalled with the default Amarok package. Its sole purpose is to provide an HTML listing of your playlist on http://localhost:4773. Why bother? It lets you share what you’ve been listening to with your friends. If you’d rather send the playlist as a file, activate the Playlist2HTML plugin. It generates the same file but saves it on your hard drive instead.

Web Control lets you control your current playlist using a Web interface accessible on your localhost at port 4774. Select the script in the Script Manager window, press the Configure button, and check the Allow Control and Publish buttons to actually gain control of the application. Click on a song name to start playing it or use the buttons on the top of the page to change the volume and manipulate Amarok.

XUL Remote provides a more secure way of accessing Amarok. Through a Firefox extension you can configure the IP address, port, and username/password that let you gain access to Amarok’s controls.

Internet and networking

Amarok’s Email script inserts a new entry labeled “email” in the playlist’s contextual menu. Select a couple of songs and choose this entry to send the files as an attachment to whomever you wish. The script uses KMail by default but it can be modified easily to be compatible with Thunderbird or other email clients that support CLI arguments.

If you have an Ices server running, you can stream the output of your sound card when running Amarok with the Ices script activated. Using the Configure button to define a stream name, homepage, and description, and specify the server configuration in the same window: hostname, port, password, and a mount point.

You can set up streaming more easily with Amarok Shouter. When activated, it streams the playing song on port 8000 so your friends can listen to it over the Internet.

Instant messaging

If you want your friends to know what song you’re currently listening to, use the AmarokPidgin script to update your status message in Pidgin to show the song that Amarok is playing. aMSN users can turn to the amsn-now-listen script to do the same in conjunction with this application. Same goes for XChat: use the XChat Now Playing for Amarok and customize what song information you want to display in the XChat window. This plugin also allows you to control Amarok from within XChat. To modify your Skype mood message, use the Amarok Skype mood poster script. If you’d rather use Kopete for instant messaging, the amaroKopete script changes the Kopete nickname and avatar with information regarding the currently playing song and album cover respectively.

Video support

If you like a song so much that you want to watch its video, there’s no need to fire up a browser and search for it on YouTube — the AmarokTube script does that for you. Activate the plugin with the Run button, start playing a song, and from the context menu pick AmarokTube -> Search. Your default browser will pop up a video list of the available videos containing the song title in their name.

Many users have requested Amarok be enhanced to also play video files. While the developers argue that Amarok is solely for audio use, Autoplay Videos is a nice little plugin that lets users also display video files. If you insert a video file into Amarok’s playlist with this plugin activated, the file will be launched with MPlayer. You can change the default player by modifying the video_player = “mplayer” line in the script.

Other scripts

There are many useful script for Amarok that don’t fall in any of the categories above. For instance, nightIMPgale can be configured to shut down your PC after a defined number of tracks, minutes, or hours. It’s useful for when you leave your computer on at night to play soothing music until you fall asleep.

CoverPrint uses Inkscape SVG files as templates for audio CD covers. Say you burned an album with K3b and you need a cover for it. Run the script, right-click on the selected files in the Amarok playlist, and choose one of the available templates. You can edit them to match your artistic needs or just complete the CD Title and Artist fields and click OK to print a ready-to-be-cut CD cover.

If you want some eye candy on your desktop, try the amarok Desktop Script. It uses PyQT and PyKDE to display the currently playing song’s album cover directly on your desktop using a nice, glossy CD case effect.

If you’re not happy with the way Amarok handles lyrics, you can try several scripts that fetch lyrics from different Web sites. Notable examples would be Terra Letras, Wiki-Lyrics, GoogLyrics and Jamendo Lyrics. Lyrics Manager provides extended control over Amarok’s lyrics, such as exporting the text to files, importing from local sources, and direct editing.

If you like a certain song that plays on an Internet radio station, RecordRadio lets you record the stream or save the podcast (if the remote file is an MP3 or Ogg file).

The Amarok wiki has dozens more scripts ready for you to try.

Category:

  • Graphics & Multimedia