source: extensions/gsdl-video/trunk/installed/cmdline/share/doc/lame/html/node6.html@ 18425

Last change on this file since 18425 was 18425, checked in by davidb, 15 years ago

Video extension to Greenstone

File size: 6.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
2<HTML>
3<HEAD>
4<TITLE>Introduction</TITLE>
5<META NAME="description" CONTENT="Introduction">
6<META NAME="keywords" CONTENT="lame">
7<META NAME="resource-type" CONTENT="document">
8<META NAME="distribution" CONTENT="global">
9<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso_8859_1">
10<LINK REL="STYLESHEET" HREF="lame.css">
11</HEAD>
12<BODY TEXT=#000000
13 BGCOLOR=#F9FBFB LINK=#006666 VLINK=#4C4C4C
14 ALINK=#995500>
15<FONT FACE = Helvetica ><strong>Subsections</strong>
16<UL>
17 <LI><A
18 HREF="node6.html#SECTION00311000000000000000"> The purpose of audio compression</A>
19 <LI><A
20 HREF="node6.html#SECTION00312000000000000000"> The two parts of audio compression</A>
21 <LI><A
22 HREF="node6.html#SECTION00313000000000000000"> Compression ratios, bitrate and
23 quality</A>
24</UL>
25
26<HR>
27<H1><A NAME="SECTION00310000000000000000"> Introduction</A> </H1>
28There is a lot of confusion surrounding the terms <I>audio compression</I>, <I>audio
29encoding</I>, and <I>audio decoding</I>. This section will give you an overview
30what audio coding (another one of these terms...) is all about.
31<P>
32<H2><A NAME="SECTION00311000000000000000"> The purpose of audio compression</A>
33</H2>
34<P> Up to the advent of audio compression, high-quality digital audio data took
35 a lot of hard disk space to store. Let us go through a short example.
36<P> You want to, say, sample your favorite 1-minute song and store it on your
37 harddisk. Because you want CD quality, you sample at 44.1 kHz, stereo,
38 with 16 bits per sample.
39<P> 44100 Hz means that you have 44100 values per second coming in from your sound
40 card (or input file). Multiply that by two because you have two channels. Multiply
41 by another factor of two because you have two bytes per value (that's what 16
42 bit means). The song will take up <NOBR>44100 samples/s &middot; 2 channels
43 &middot; 2 bytes/sample &middot; 60 s/min ~ 10 MBytes</NOBR> of storage space
44 on your harddisk.
45<P> If you wanted to download that over the internet, given an average 56k&nbsp;modem
46 connected at 44k (which is a typical case), it would take you (at least) <NOBR>10000000
47 bytes &middot; 8 bits/byte / (44000 bits/s) &middot; / (60 s/min) ~ 30 minutes</NOBR>
48<DIV ALIGN="CENTER"> <B>Just to download one minute of music!</B> </DIV>
49<P> Digital audio coding, which - in this context - is synonymously called digital
50 audio compression as well, is the art of minimizing storage space (or channel
51 bandwidth) requirements for audio data. Modern perceptual audio coding techniques
52 (like MPEG Layer III) exploit the properties of the human ear (the perception
53 of sound) to achieve a size reduction by a factor of 11 with little or no perceptible
54 loss of quality.
55<P> Therefore, such schemes are the key technology for high quality low bit-rate
56 applications, like soundtracks for CD-ROM games, solid-state sound memories,
57 Internet audio, digital audio broadcasting systems, and the like.
58<P>
59<H2><A NAME="SECTION00312000000000000000"> The two parts of audio compression</A>
60</H2>
61<P> Audio compression really consists of two parts. The first part, called <I>encoding</I>,
62 transforms the digital audio data that resides, say, in a WAVE file, into a
63 highly compressed form called <I>bitstream</I>. To play the bitstream on your
64 soundcard, you need the second part, called <I>decoding</I>. Decoding takes
65 the bitstream and re-expands it to a WAVE file.
66<P> The program that effects the first part is called an audio <I>encoder</I>.
67 <i>LAME</i> is such an encoder . The program that does the second part is called
68 an audio <I>decoder</I>. One well-known MPEG&nbsp;Layer III decoder is <tt>Xmms</tt>,
69 another <TT>mpg123</TT>. Both can be found on <A NAME="tex2html1"
70 HREF="http://www.mp3-tech.org">ww.mp3-tech.org</A> .
71<H2><A NAME="SECTION00313000000000000000"> Compression ratios, bitrate and quality</A>
72</H2>
73<P> It has not been explicitly mentioned up to now: What you end up with after
74 encoding and decoding is not the same sound file anymore: All superflous information
75 has been squeezed out, so to say. It is not the same <I>file</I>, but it will
76 <I>sound</I> the same - more or less, depending on how much compression had
77 been performed on it.
78<P> Generally speaking, the lower the compression ratio achieved, the better the
79 sound quality will be in the end - and <I>vice versa</I>. Table <A HREF="node6.html#table-soundq">1.1</A>
80 gives you an overview about quality achievable.
81<P> Because compression ratio is a somewhat unwieldy measure, experts use the
82 term <I>bitrate</I> when speaking of the strength of compression. Bitrate denotes
83 the average number of bits that one second of audio data will take up in your
84 compressed bitstream. Usually the units used will be kbps, which is <SUP>kbits</SUP>/<SUB>s</SUB>,
85 or 1000&nbsp;<SUP>bits</SUP>/<SUB>s</SUB>. To calculate the number of bytes
86 per second of audio data, simply divide the number of bits per second by eight.
87<P> <BR>
88<DIV ALIGN="CENTER"><A NAME="table-soundq">&#160;</A> <A NAME="95">&#160;</A>
89 <TABLE CELLPADDING=3 BORDER="1" width="512" height="225">
90 <CAPTION><STRONG>Table 1.1:</STRONG> Bitrate versus sound quality</CAPTION>
91 <TR VALIGN="TOP">
92 <TD ALIGN="RIGHT" nowrap width="115">Bitrate</TD>
93 <TD ALIGN="RIGHT" nowrap width="67">Bandwidth</TD>
94 <TD ALIGN="LEFT" nowrap width="246">Quality comparable to or better than</TD>
95 </TR>
96 <TR VALIGN="TOP">
97 <TD ALIGN="RIGHT" nowrap width="115">16 kbps</TD>
98 <TD ALIGN="RIGHT" nowrap width="67">4.5 kHz</TD>
99 <TD ALIGN="LEFT" nowrap width="246">shortwave radio</TD>
100 </TR>
101 <TR VALIGN="TOP">
102 <TD ALIGN="RIGHT" nowrap width="115">32 kbps</TD>
103 <TD ALIGN="RIGHT" nowrap width="67">7.5 kHz</TD>
104 <TD ALIGN="LEFT" nowrap width="246">AM radio</TD>
105 </TR>
106 <TR VALIGN="TOP">
107 <TD ALIGN="RIGHT" nowrap width="115">96 kbps</TD>
108 <TD ALIGN="RIGHT" nowrap width="67">11 kHz</TD>
109 <TD ALIGN="LEFT" nowrap width="246">FM radio</TD>
110 </TR>
111 <tr valign="TOP">
112 <td align="RIGHT" nowrap width="115">128 kbps</td>
113 <td align="RIGHT" nowrap width="67">16 kHz</td>
114 <td align="LEFT" nowrap width="246">near CD</td>
115 </tr>
116 <tr valign="TOP">
117 <td align="RIGHT" nowrap width="115">160-180 kbps <br>
118 (variable bitrate)</td>
119 <td align="RIGHT" nowrap width="67">20 kHz</td>
120 <td align="LEFT" nowrap width="246">perceptual transparency</td>
121 </tr>
122 <TR VALIGN="TOP">
123 <TD ALIGN="RIGHT" nowrap width="115">256 kbps</TD>
124 <TD ALIGN="RIGHT" nowrap width="67">22 kHz</TD>
125 <TD ALIGN="LEFT" nowrap width="246">studio</TD>
126 </TR>
127 </TABLE>
128</DIV>
129<BR>
130</font>
131</BODY>
132</HTML>
Note: See TracBrowser for help on using the repository browser.