diff options
author | Chern Lee <chern@FreeBSD.org> | 2001-09-12 20:26:59 +0000 |
---|---|---|
committer | Chern Lee <chern@FreeBSD.org> | 2001-09-12 20:26:59 +0000 |
commit | 996f2dca7223a8912c87727b1f7d402129c07373 (patch) | |
tree | 06ebbefec4a358c0797ec519646f588fd2b6916d /en_US.ISO8859-1/books/handbook/multimedia | |
parent | f9141908fa35470297b1801610f6b585dc2340ac (diff) | |
download | doc-996f2dca7223a8912c87727b1f7d402129c07373.tar.gz doc-996f2dca7223a8912c87727b1f7d402129c07373.zip |
Add a section on MP3s in Sound:
* MP3 Players
* Encoding MP3s
* Ripping CD Audio
* Decoding MP3s
Remove comment from sypnosis and update.
Notes
Notes:
svn path=/head/; revision=10667
Diffstat (limited to 'en_US.ISO8859-1/books/handbook/multimedia')
-rw-r--r-- | en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml | 214 |
1 files changed, 211 insertions, 3 deletions
diff --git a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml index 5ceb0bf41c..0f46d6bc9d 100644 --- a/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/multimedia/chapter.sgml @@ -1,7 +1,7 @@ <!-- The FreeBSD Documentation Project - $FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.15 2001/08/16 18:35:08 chern Exp $ + $FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.16 2001/08/22 05:37:50 murray Exp $ --> <chapter id="sound"> @@ -29,8 +29,6 @@ applications allowing you to edit your recorded audio, add sound effects, and control attached MIDI devices.</para> -<!-- XXX we need to talk about ripping MP3s here. --> - <para>After reading this chapter you will know:</para> <itemizedlist> <listitem><para>How to locate your sound card.</para></listitem> @@ -39,6 +37,8 @@ <listitem><para>Methods to test that your card is working using sample applications.</para></listitem> <listitem><para>How to troubleshoot your sound setup.</para></listitem> + <listitem><para>How to playback and encode MP3s.</para></listitem> + <listitem><para>How to rip CD audio tracks into data files.</para></listitem> </itemizedlist> <para>Before reading this chapter you should:</para> @@ -365,4 +365,212 @@ pcm0: <Aureal Vortex 8830> at memory 0xfeb40000 irq 5 (4p/1r +channels dup </qandaentry> </qandaset> </sect1> + + <sect1 id="mp3"> + <sect1info> + <authorgroup> + <author> + <firstname>Chern</firstname> + <surname>Lee</surname> + <contrib>Contributed by </contrib> + </author> + </authorgroup> + <!-- 11 Sept 2001 --> + </sect1info> + + <title>MP3 Audio</title> + + <para>MP3 (MPEG Layer 3 Audio) accomplishes near CD-quality sound, + leaving no reason to let your FreeBSD workstation fall short of + its offerings.</para> + + <sect2 id="mp3-players"> + <title>MP3 Players</title> + + <para>By far, the most popular XFree86 MP3 player is + <application>XMMS</application> (X Multimedia System). Winamp + skins can be used with <application>XMMS</application> since the + GUI is almost identical to that of Nullsoft Winamp's. + <application>XMMS</application> also has native plug-in + support.</para> + + <para><application>XMMS</application> can be installed from the + <port>audio/xmms</port> port or package.</para> + + <para><application>XMMS'</application> interface is intuitive, with + a playlist, graphic equalizer, and more. Those familiar with WinAmp + will find <application>XMMS</application> simple to use.</para> + + <para>The <port>audio/mpg123</port> port is an alternative, + command-line MP3 player.</para> + + <para><application>mpg123</application> can be run by specifying the + sound device and the MP3 file on the command line, as shown below:</para> + + <screen>&prompt.root; mpg123 -a <replaceable>/dev/dsp1.0</replaceable> 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! + + + + + +Playing MPEG stream from BT - Foobar-GreastHits.mp3 ... +MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo +</screen> + + <para><literal>/dev/dsp1.0</literal> should be replaced with the + <devicename>dsp</devicename> device entry on your system.</para> + + </sect2> + + <sect2 id="rip-cd"> + <title>Ripping CD Audio Tracks</title> + + <para>Before encoding a CD or CD track to MP3, the audio data on + the CD must be ripped onto the hard drive. This is done by + copying the raw CDDA (CD Digital Audio) data to WAV + files.</para> + + <para>The <command>cdda2wav</command> tool, which is a part of the + <port>sysutils/cdrtools</port> suite, is used for ripping audio + information of CDs and the information associated with it.</para> + + <para>With the audio CD in the drive, the following command + can be issued (as <username>root</username>) to rip an entire + CD into individual (per track) WAV files:</para> + + <screen>&prompt.root; cdda2wav -D <replaceable>0,1,0</replaceable> -B</screen> + + <para>The <option>-D <replaceable>0,1,0</replaceable></option> + indicates the SCSI device <devicename>0,1,0</devicename>, which + corresponds to the output of <command>cdrecord + -scanbus</command>.</para> + + <para>To rip individual tracks, make use of the + <option>-t</option> option as shown:</para> + + <screen>&prompt.root; cdda2wav -D <replaceable>0,1,0</replaceable> -t 7</screen> + + <para>This example rips track seven of the audio CDROM. To rip a range + of tracks, for example, track one to seven, specify a range:</para> + + <screen>&prompt.root; cdda2wav -D <replaceable>0,1,0</replaceable> -t 1+7</screen> + + <para><application>cdda2wav</application> only supports SCSI + CDROM drives. For IDE drives, try out <port>audio/cdd</port> or + some of the various other utilities in the audio ports + collection.</para> + + </sect2> + + <sect2 id="mp3-encoding"> + <title>Encoding MP3s</title> + + <para>Nowadays, the mp3 encoder of choice is + <application>lame</application>. + <application>Lame</application> can be found at + <port>audio/lame</port> in the ports tree.</para> + + <para>Using the ripped WAV files, the following command will + convert <filename>audio01.wav</filename> to + <filename>audio01.mp3</filename>:</para> + + <screen>&prompt.root; lame -h -b <replaceable>128</replaceable> \ +--tt "<replaceable>Foo Song Title</replaceable>" \ +--ta "<replaceable>FooBar Artist</replaceable>" \ +--tl "<replaceable>FooBar Album</replaceable>" \ +--ty "<replaceable>2001</replaceable>" \ +--tc "<replaceable>Ripped and encoded by Foo</replaceable>" \ +--tg "<replaceable>Genre</replaceable>" \ +<replaceable>audio01.wav audio01.mp3</replaceable></screen> + + <para>128 kbits seems to be the standard MP3 bitrate in use. + Many enjoy the higher quality 160, or 192. The higher the + bitrate, the more disk space the resulting MP3 will consume--but + the quality will be higher. The <option>-h</option> option + turns on the <quote>higher quality but a little slower</quote> + mode. The options beginning with <option>--t</option> indicate + ID3 tags, which usually contain song information, to be embedded + within the MP3 file. Additional encoding options can be found + by consulting the lame man page.</para> + </sect2> + + <sect2 id="mp3-decoding"> + <title>Decoding MP3s</title> + + <para>In order to burn an audio CD from MP3s, they must be converted + to a non-compressed WAV format. Both <application>XMMS</application> + and <application>mpg123</application> support the output of MP3 to + an uncompressed file format.</para> + + <para>Writing to Disk in <application>XMMS</application>:</para> + + <procedure> + <step> + <para>Launch <application>XMMS</application>.</para> + </step> + + <step> + <para>Right-click on the window to bring up the + <application>XMMS</application> menu.</para> + </step> + + <step> + <para>Select <literal>Preference</literal> under + <literal>Options</literal>.</para> + </step> + + <step> + <para>Change the Output Plugin to <quote>Disk Writer + Plugin</quote>.</para> + </step> + + <step> + <para>Press <literal>Configure</literal>.</para> + </step> + + <step> + <para>Enter (or choose browse) a directory to write the + uncompressed files to.</para> + </step> + + <step> + <para>Load the MP3 file into <application>XMMS</application> + as usual, with volume at 100% and EQ settings turned + off.</para> + </step> + + <step> + <para>Press <literal>Play</literal> — <application>XMMS</application> + will appear as if it is playing the MP3, but no music will be heard. It + is actually playing the MP3 to a file.</para> + </step> + + <step> + <para>Be sure to set the default Output Plugin back to what it was before + in order to listen to MP3s again.</para> + </step> + </procedure> + + <para>Writing to stdout in <application>mpg123</application>:</para> + + <procedure> + <step> + <para>Run mpg123 -s <replaceable>audio01.mp3</replaceable> + > audio01.pcm</para> + </step> + </procedure> + + <para><application>XMMS</application> writes a file in the WAV format, while + <application>mpg123</application> converts the MP3 into raw PCM audio data. + Both of these formats can be used with <application>cdrecord</application> + or <application>burncd</application> to create audio CDROMs.</para> + + <para>Read <xref linkend="creating-cds"> for more information on using a + CD burner in FreeBSD.</para> + </sect2> + </sect1> </chapter> |