6

Playing with Multimedia

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 video DVDs

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, digital image, and video 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.

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 ...

Get Ubuntu Linux Toolbox: 1000+ Commands for Power Users, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.