From 3e5c6eb2ce61738aae7a769978e65e99cd2066c5 Mon Sep 17 00:00:00 2001 From: Dru Lavigne Date: Mon, 21 Apr 2014 17:17:07 +0000 Subject: [PATCH] Editorial review of MP3 chapter. Sponsored by: iXsystems --- .../books/handbook/multimedia/chapter.xml | 186 ++++++++---------- 1 file changed, 79 insertions(+), 107 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml b/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml index 5c706c8e9f..0d265aadf6 100644 --- a/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/multimedia/chapter.xml @@ -66,7 +66,7 @@ - Rip CD and DVD content into + Rip CD and DVD content into files. @@ -251,13 +251,13 @@ pcm2: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec) default If all goes well, the sound card should now work in os;. If the CD or DVD drive is properly connected to the sound card, one can insert an - audio CD in the drive and play it with + audio CD in the drive and play it with &man.cdcontrol.1;: &prompt.user; cdcontrol -f /dev/acd0 play 1 - Audio CDs have specialized encodings which means that + Audio CDs have specialized encodings which means that they should not be mounted using &man.mount.8;. @@ -486,7 +486,7 @@ pcm7: <HDA Realtek ALC889 PCM #3 Digital> at cad 2 nid 1 on hdac1 This section describes some MP3 - players available for &os;, how to rip audio CD tracks, and + players available for &os;, how to rip audio CD tracks, and how to encode and decode MP3s. @@ -494,146 +494,132 @@ pcm7: <HDA Realtek ALC889 PCM #3 Digital> at cad 2 nid 1 on hdac1 A popular graphical MP3 player is XMMS. - Winamp - skins can be used with XMMS since - the interface is almost identical to that of Nullsoft's - Winamp. - XMMS also has native plug-in - support. - - XMMS can be installed from + It supports Winamp + skins and additional plugins. The interface is intuitive, + with a playlist, graphic equalizer, and more. Those familiar + with Winamp will find + XMMS simple to use. On &os;, + XMMS can be installed from the multimedia/xmms port or package. - XMMS's interface is intuitive, - with a playlist, graphic equalizer, and more. Those familiar - with Winamp will find - XMMS simple to use. - - The audio/mpg123 port + The audio/mpg123 package or port provides an alternative, command-line MP3 - player. - - mpg123 can be run by specifying - the sound device and the MP3 file on the - command line. Assuming the audio device is - /dev/dsp1.0 and the - MP3 file is - Foobar-GreatestHits.mp3, enter the - following to play the file: - - &prompt.root; mpg123 -a /dev/dsp1.0 Foobar-GreatestHits.mp3 -High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3. -Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp. -Uses code from various people. See 'README' for more! -THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! - - - + player. Once installed, specify + the MP3 file to play on the + command line. If the system has multiple audio devices, the + sound device can also be specifed: + &prompt.root; mpg123 -a /dev/dsp1.0 Foobar-GreatestHits.mp3 +High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 + version 1.18.1; written and copyright by Michael Hipp and others + free software (LGPL) without any warranty but with best wishes Playing MPEG stream from Foobar-GreatestHits.mp3 ... MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo + + Additional MP3 players are available in + the &os; Ports Collection. - Ripping CD Audio Tracks + Ripping <acronym>CD</acronym> Audio Tracks - Before encoding a CD or CD track to - MP3, the audio data on the CD must be - ripped to the hard drive. This is done by copying the raw CD + Before encoding a CD or CD track to + MP3, the audio data on the CD must be + ripped to the hard drive. This is done by copying the raw CD Digital Audio (CDDA) data to WAV files. The cdda2wav tool, which is installed with the sysutils/cdrtools - suite, is used for ripping audio information from CDs and the - information associated with them. + suite, can be used to rip audio information from + CDs. - With the audio CD in the drive, the following command can - be issued as root to rip an entire CD - into individual (per track) WAV + With the audio CD in the drive, the following command can + be issued as root to rip an entire CD + into individual, per track, WAV files: &prompt.root; cdda2wav -D 0,1,0 -B - The - indicates the SCSI device 0,1,0, - which corresponds to the output of cdrecord - -scanbus. + In this example, the + indicates the SCSI device + 0,1,0 containing the CD to rip. + Use cdrecord -scanbus to determine the + correct device parameters for the system. - cdda2wav will support ATAPI - (IDE) CDROM drives. To rip from an IDE drive, specify the - device name in place of the SCSI unit numbers. For example, - to rip track 7 from an IDE drive: - - &prompt.root; cdda2wav -D /dev/acd0 -t 7 - - To rip individual tracks, make use of the - as shown: + To rip individual tracks, use + to specify the track: &prompt.root; cdda2wav -D 0,1,0 -t 7 - This example rips track seven of the audio CDROM. To rip + To rip a range of tracks, such as track one to seven, specify a range: &prompt.root; cdda2wav -D 0,1,0 -t 1+7 - &man.dd.1; can also be used to extract audio tracks on - ATAPI drives, as described in . + To rip from an ATAPI + (IDE) CDROM drive, specify the + device name in place of the SCSI unit numbers. For example, + to rip track 7 from an IDE drive: + &prompt.root; cdda2wav -D /dev/acd0 -t 7 + + Alternately, dd can be used to extract audio tracks on + ATAPI drives, as described in . - Encoding MP3s + Encoding and Decoding MP3s Lame is a popular MP3 encoder which can be installed from the audio/lame port. Due to - licensing restrictions, a package is not available. + patent issues, a package is not available. The following command will convert the ripped - WAV files + WAV file audio01.wav to audio01.mp3: - &prompt.root; lame -h -b 128 \ ---tt "Foo Song Title" \ ---ta "FooBar Artist" \ ---tl "FooBar Album" \ ---ty "2001" \ ---tc "Ripped and encoded by Foo" \ ---tg "Genre" \ -audio01.wav audio01.mp3 + &prompt.root; lame -h -b 128 --tt "Foo Song Title" --ta "FooBar Artist" --tl "FooBar Album" \ +--ty "2014" --tc "Ripped and encoded by Foo" --tg "Genre" audio01.wav audio01.mp3 - 128 kbits is a standard MP3 - bitrate. The 160 and 192 bitrates provide higher quality. + The specified 128 kbits is a standard MP3 + bitrate while the 160 and 192 bitrates provide higher quality. The higher the bitrate, the larger the size of the resulting - MP3. turns on the + MP3. The turns on the higher quality but a little slower mode. The - options beginning with indicate ID3 tags, + options beginning with indicate ID3 tags, which usually contain song information, to be embedded within the MP3 file. Additional encoding options can be found in the lame manual page. - - - Decoding MP3s - - In order to burn an audio CD from MP3s, + In order to burn an audio CD from MP3s, they must first be converted to a non-compressed - WAV format. Both - XMMS and - mpg123 support the output of - MP3 to an uncompressed file format. + file format. XMMS can be used to convert to the + WAV format, while + mpg123 can be used to convert to the + raw Pulse-Code Modulation (PCM) audio data + format. - Writing to Disk in XMMS: + To convert audio01.mp3 + using mpg123, specify the name of + the PCM file: + + &prompt.root; mpg123 -s audio01.mp3 > audio01.pcm + + To use XMMS to convert a + MP3 to WAV format, use + these steps: + Converting to <acronym>WAV</acronym> Format in <application>XMMS</application> Launch XMMS. @@ -683,34 +669,20 @@ MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo - Writing to stdout in - mpg123: - - - - Run mpg123 -s - audio01.mp3 > - audio01.pcm - - - - XMMS writes a file in the - WAV format, while - mpg123 converts the - MP3 into raw PCM audio data. Both of these + Both the WAV and PCM formats can be used with cdrecord - to create audio CDs, whereas &man.burncd.8; requires a raw - Pulse-Code Modulation (PCM). When using + to create audio CDs, whereas burncd requires the + PCM format. When using WAV files, there will be a small tick sound at the beginning of each track. This sound is the - header of the WAV file. One can remove the - header with SoX, which can be - installed from the audio/sox port or package: + header of the WAV file. The + audio/sox port or package can be used to remove the + header: &prompt.user; sox -t wav -r 44100 -s -w -c 2 track.wav track.raw Refer to for more - information on using a CD burner in &os;. + information on using a CD burner in &os;.