linux

Page 134

82935c06.qxd:Toolbox

10/29/07

1:32 PM

Page 109

Playing with Multimedia There’s no need to go to a GUI tool, if all you need to do is play a song or convert an image or audio file to a different form. There are commands for working with multimedia files (audio or images) that are quick and efficient if you find yourself working from the shell. And if you need to manipulate batches of multimedia files, the same command you use to transform one file can be added to a script to repeat the process on many files. This chapter focuses on tools for working with audio and digital image files from the shell.

Working with Audio There are commands available for Linux systems that can manipulate files in dozens of audio formats. Commands such as ogg123, mpg321, and play can be used to listen to audio files. There are commands for ripping songs from music CDs and encoding them to store efficiently. There are even commands to let you stream audio so anyone on your network can listen to your playlist.

IN THIS CHAPTER Playing music with play, ogg123, and mpg321 Adjusting audio with alsamixer and aumix Ripping music CDs with cdparanoia Encoding music with oggenc, flac, and lame Streaming music with icecast and ices Converting audio files with sox Transforming digital images with convert

Playing Music Depending on the audio format you want to play, you can choose from several command line players for Linux. The play command (based on the sox facility, described later), can play audio files in multiple, freely available formats. You can use ogg123 to play popular open source music formats, including Ogg Vorbis, Free Lossless Audio Codec (FLAC), and Speex files. The mpg321 player, which is available via third-party RPM repositories, is popular for playing MP3 music files.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.