Chapter 20. Playing Music and Movies

Contents

20.1. Mixers
20.2. Playing Music Files
20.3. Handling Audio CDs
20.4. Playing Movie Files

Abstract

During installation, YaST normally identifies and configures the sound cards of your computer automatically. Otherwise (or if you installed a new sound card), start YaST and configure the sound card manually in the Sound module. When your sound card has been configured, you can control the volume and balance with a mixer and start other sound applications.

Linux includes a wide range of sound and multimedia applications. Some of these applications are installed on your Linux system by default. With the applications described here, control the volume and balance of playback and play CDs, music and movie files.

In case one of the listed applications is not installed by default on your system, use YaST to install the missing packages. Use the search function of the YaST package management tool to find the package names.

20.1. Mixers

Mixers provide a convenient means of controlling the volume and balance of the sound output and input of computers. For a description of the default KDE and GNOME mixer applets refer to the KDE and GNOME chapters.

The main difference between the various mixers is the outer appearance of the user interface. However, there are a number of mixers that are designed for specific hardware. One example is envy24control, a mixer for the Envy 24 sound chip. Another one is hdspmixer, which is for RME Hammerfall cards. From the mixers available, select the one that best suits your needs.

[Tip]Starting the Mixer

Generally, it is advisable to open a mixer application before opening other sound applications. Use the mixer to test and adjust the control settings for the input and output of the sound card.

20.2. Playing Music Files

In Linux, find a variety of programs for playing music files, such as OGG or WAV files. KDE offers amaroK and JuK, for example.

20.2.1. amaroK Media Player

The amaroK music player allows you to play various audio formats, create playlists, import music from removable media such as portable MP3 players or external hard disks (or upload files to removable media), and listen to streaming audio broadcasts of radio stations on the Internet. The file types supported depend on the engine used.

On first start, amaroK launches a First-Run Wizard, which helps set up amaroK. Determine where amaroK should look for your music collection. amaroK scans these folders for playable media. By default, amaroK is configured to scan the selected folders recursively (to include all their subdirectories in the scan), monitor changes to the content of the selected directories, and import any playlists located there. All the settings made with the wizard can be modified later in the configuration dialog by selecting Settings+Configure AmaroK.

Figure 20.1. The amaroK Media Player

The amaroK Media Player

20.2.1.1. Quick Start

On start-up, amaroK scans the folders that are part of your collection for music files. Although you can use amaroK without building a collection, it is recommended to do so, because most of the powerful, advanced features are only available with an existing collection.

The amaroK main window is divided into two parts. The sidebar on the left providing different views: your music collection, a context browser, your playlists, a file browser, etc. Change the browser by clicking a tab on the far left. The right part contains the playlist window and, below it, the player (if you have not configured it to be shown in a separate window).

To play music, just drag and drop items from any of the sidebar browsers to the playlist area. Use Shift or Ctrl to select multiple items. Double-click an item in the playlist to play it. You can add or delete items from the list during playback with the context menu. Use the icons located above the playlist area to Clear the playlist, to Save playlist as, to Undo and Redo changes or to Search for a certain track. To manipulate play modes, either click the Repeat or Random icons in the amaroK status bar several times to switch mode or select the desired Mode from the main amaroK menu.

20.2.1.2. The Sidebar Browsers

Context

With this tab, view information and statistics related to the track currently being played. Switch to different views within the Context browser by clicking the tabs on top of the sidebar. For example, click Artist to make amaroK search for the appropriate Wikipedia article, which is then displayed in the context browser. To view a track's lyrics, click the Lyrics tab to start a search and display the results. The Music tab shows the album cover, if available, (see Section 20.2.1.3, “The Cover Manager”) and the listening statistics related to the current track.

Collection

Use this view to manage and display your personal collection of titles. The toolbar on top of the browser allows you to configure the way your collection is displayed and to reorganize the collection. Define the order your titles are displayed in the browser with Group By. You can choose between predefined criteria or create your own sort criteria using Primary, Secondary, and Tertiary. The next four icons let you toggle between tree view, flat view and iPod* view or Show dividers for better overview in large music collections. Use the wrench icon to add or delete folders amaroK should scan for music to add to your collection.

To search or filter your collection for a certain track or album, enter the title (or part of it) in the search field at the top. Each character you enter narrows down the search and the selection in the browser is adjusted as you type. To search for certain metadata such as Genre or Bitrate or to combine several search options, click the button to the right of the search field to open the Edit Filter dialog.

Playlists

You can access different playlists with the playlist browser. Playlists holds your personal playlists found in your collection folders. Every time you create and save a new playlist from the playlist window, it appears here. Right-click the Playlist folder to create or import a new playlist or to add a subfolder. To add new items from the playlist window to an existing playlist, just drag and drop them on the playlist in the browser window.

[Important]Sharing Playlists with Other Players

Save playlists in m3u format, so you can share them with any other players using this format.

Smart Playlists offer various views of your collection, such as tracks never played, newest tracks, or tracks by genre. For example, to create a random playlist from your collection, select 50 random Tracks and drag the entry to the playlist area. Right-click the Smart Playlists folder to add subfolders or to create your own smart playlists.

Radio Streams lets you listen to live radio streams from the Internet. An extensive list is already shipped with amaroK. Right-click to add more or create subfolders.

Podcasts imports podcasts to amaroK. Right-clicking opens a menu where you can add podcasts and subfolders, refresh all podcasts, or set the scan interval.

Files

This tab opens a file browser which corresponds to the standard KDE file manager dialog. Use the icons at the top to navigate the file system, change the view or to create bookmarks. Enter a URL or a path directly into the text input field. From the contents displayed, drag elements to the playlist to include them.

Magnatune

On this tab, you can establish a connection to the Magnatune store where you can purchase music online. Click Update to view the available albums and titles at magnatune.com. Sort the album list by Genre and listen to some tracks with amaroK. To buy music, click Purchase Album and enter your payment details.

Devices

If you own portable MP3 players or external hard disks, use this browser to configure your portable device and to access it from amaroK.

20.2.1.3. The Cover Manager

With amaroK, you can assign a cover to each album of your collection. With the Cover Manager, easily add, delete, and retrieve album covers.

Start the cover manager with Tools+Cover Manager. A tree view in the left part of the window lists all artists in your collection. The main part of the window lists the covers of all albums. To filter the covers displayed, click an individual artist in the tree view or enter a term in the input field at the top of the window. Use View to toggle between displaying all albums, albums with covers, or albums without covers.

There are three different methods for assigning covers to the albums:

Automatically Assign Covers

amaroK can automatically fetch all missing covers displayed in the main windows from Amazon. Use Amazon Locale to determine from which Amazon Web server the covers should be fetched then click Fetch Missing Covers.

[Important]Proper Tagging Needed

amaroK fetches the covers from Amazon using the query string Artist - Album. This information is extracted from the tags of your music files. The better they are tagged, the better the hit rate is when automatically fetching covers.

Manually Choose a Cover Fetched from Amazon

If you want more control over what image to use and what query string to use to retrieve a cover, right-click an album in the main window and choose Fetch From amazon.com. Next Cover lets you cycle through all images available. Save selects the actual cover and assigns it to the album selected. If you are not satisfied with the covers displayed, use New Search to refine the search. Use Amazon Locale from the toolbar of the main window to determine from which Amazon Web server the covers should be fetched.

Manually Assign Covers

If you already have your own cover images, you can assign them by right-clicking an album and choosing Set Custom Cover.

20.2.1.4. Visualizations

If visualizations for amaroK are installed, you can select various graphical effects for the music played with Tools+Visualizations. Native amaroK visualizations are displayed in the player window. Cycle through the various available display modes by clicking the animation.

20.2.1.5. The amaroK Tray Icon

Like other KDE applications, amaroK adds an icon to the KDE system tray. You can use this icon to control a large number of amaroK's features. Hovering the mouse pointer over the icon displays information about the track currently played, by scrolling the mouse wheel simultaneously you can reduce or increase the playback volume. A single left-click closes the application window without affecting playback. Click again to reopen the window. Clicking with the middle mouse button pauses playback—middle-click again to resume playback. Right-clicking opens a context menu where you have access to the player controls and can exit amaroK.

Using the Shift and Ctrl keys together with the mouse gives you access to more advanced features. Holding Shift while scrolling the mouse wheel seeks through the current track. Holding Ctrl while scrolling the mouse wheel skips through tracks in the playlist.

You may also drag items and drop them on the tray icon to add them to the current playlist. A pop-up menu opens, asking whether to append the track to the playlist, append and play it, or queue it after the current track.

20.3. Handling Audio CDs

There are many ways to listen to your favorite music tracks. Either play a CD or play digitized versions of them. The following section features some CD player applications as well as some applications that can be used for digitizing audio CDs.

For information about how to create your own CDs, refer to Chapter 21, Burning CDs and DVDs.

[Important]CDDA and Analog CD Playback

There are two different ways of playing audio CDs. CD and DVD drives capable of analog CD playback read the audio data and send it to the sound output device. Some external drives connected via PCMCIA, FireWire, or USB need to use CDDA (Compact Disk Digital Audio) to extract the audio data first then play it as digital PCM. The players featured in the following sections do not support CDDA. Use XMMS if you need CDDA support.

20.3.1. KsCD—Audio CD Player

KsCD is an easy-to-use audio CD player included in the kdemultimedia3-extra package. If it is installed, press Alt+F2 and enter kscd to start the application. KsCD integrates into your KDE panel and can be configured to start playing automatically after a CD has been inserted. To access the configuration menu, select Extras+Configure KsCD. Fetch album and track information from a CDDB server on the Internet if KsCD is configured accordingly. You can also upload CDDB information to share it with others. Use the CDDB dialog for information retrieval and upload.

Figure 20.2. The KsCD User Interface

The KsCD User Interface

20.3.2. Compressing Audio Data: Ripping

Audio compression can be handled by various tools. The following sections feature a command line approach to encoding and playing audio data as well as some graphical applications capable of audio compression.

20.3.2.1. Command Line Tools for Encoding and Playback of Audio Data

Ogg Vorbis (package vorbis-tools) is a free audio compression format that is now supported by the majority of audio players and even portable MP3 players. The Web page of the project is http://www.vorbis.com/.

Your system comes with several tools supporting Ogg Vorbis. oggenc is a command line tool used for encoding WAV files to Ogg. Just run oggenc myfile.wav to transform a given .wav file into Ogg Vorbis. The -h option displays an overview of the other parameters. Oggenc supports encoding with a variable bit rate. In this way, an even higher degree of compression can be achieved. Instead of the bit rate, specify the desired quality with the parameter -q. -b determines the average bit rate. -m and -M specify the minimum and maximum bit rate.

ogg123 is a command line Ogg player. Start it with a command like ogg123 mysong.ogg.

20.3.2.2. Compressing Audio Data Using KAudioCreator

KAudioCreator is a lean CD ripper application (see Figure 20.3, “Ripping Audio CDs with KAudioCreator”). Once started, it lists all the tracks of your CD in the CD Tracks tab. Select the tracks to rip and encode. To edit the track information, use the Album Editor under File+Edit Album. Otherwise just start the ripping and encoding with File+Rip Selection. Watch the progress of these jobs using the Jobs tab. If configured accordingly, KAudioCreator also generates playlist files for your selection that can be used by players like amaroK, XMMS, or Helix Banshee.

Figure 20.3. Ripping Audio CDs with KAudioCreator

Ripping Audio CDs with KAudioCreator

20.3.2.3. Compressing Audio CDs Using Konqueror

Before you start the actual ripping process with Konqueror, configure the handling of audio CDs and the Ogg Vorbis encoder in the KDE Control Center. Select Sound & Multimedia+Audio CDs. The configuration module is divided into three tabs: General, Names, and Ogg Vorbis Encoder. Normally, a suitable CD device is detected automatically. Do not change this default setting unless the autodetection failed and you need to set the CD device manually. Error correction and encoder priority can also be set here. The Ogg Vorbis Encoder tab determines the quality of the encoding. To configure online lookup of album, track, and artist information for your ripped audio data, select Add Track Information.

Start the ripping process by inserting the CD into the CD-ROM drive and entering audiocd:/ in the Location bar. Konqueror then lists the tracks of the CD and some folders (see Figure 20.4, “Ripping Audio Data with Konqueror”).

Figure 20.4. Ripping Audio Data with Konqueror

Ripping Audio Data with Konqueror

To keep uncompressed audio data on your disk, just select the .wav files and drag them into another Konqueror window to copy them to their final destination. To start the Ogg Vorbis encoding, drag the Ogg Vorbis folder or files from this folder to another Konqueror window. The encoding starts as soon as you drop the Ogg Vorbis folder at its destination.

20.4. Playing Movie Files

You can choose between several movie players shipped with your SUSE Linux Enterprise. Kaffeine is the default KDE movie player and can be run with several back-ends, such as Xine and MPlayer.

Figure 20.5. Kaffeine Main Window

Kaffeine Main Window

The formats you can view with Kaffeine depends on the back-end (by default, Xine is used). Xine interprets many of the most common multimedia formats available. For more information, refer to http://xinehq.de/.

Kaffeine can also play multimedia streamed over the Internet and can be used as a plug-in for Konqueror. It provides the usual options for playing files in full screen mode, navigating through files, and more. You can also take a snapshot of the video and save it as an image.

Apart from Kaffeine, SUSE Linux Enterprise also ships RealPlayer for Linux. RealPlayer supports RealAudio, RealVideo, Ogg Vorbis, Theora, and more.

Figure 20.6. RealPlayer for Linux

RealPlayer for Linux