home *** CD-ROM | disk | FTP | other *** search
-
- MPEG Audio encoder and decoder
- ==============================
- Version 0.02 by Henrik Bjerregaard Pedersen.
-
- This program is Public Domain, and is provided 'as is'. The author cannot
- accept any liability for any damage or loss of any kind as a result of the
- use of this program.
- You are allowed to copy, distribute and use this program for any
- non-commercial purposes, as long as this file is included unaltered.
-
- Bug report, suggestions (and donations!!!) to
-
- Henrik Bjerregaard Pedersen
- Stengaaards Alle 13B
- DK-2800 Lyngby
- Denmark
- email: henrik@login.dknet.dk
-
-
-
- Encoder
- -------
- The encoder compresses a raw sample file (16 bit linear signed) in either
- mono or stereo. The samples must be stored with the low byte first.
-
- Usage: Encode [switches] <input> <output>
-
- Switches: -m <mode> m (mono) or s (stereo)
- -s <freq> source sample rate in kHz.
- -b <kbps> bitrate in kbits/second
-
- Default is -m s -s 44.1 -b 384
-
-
- If the sample file is a stereo sample, the channels should be interleaved
- LRLRLRLR...
-
- Legal sample rates are 32kHz, 44.1kHz and 48kHz. However, this doesn't mean
- that you cannot compress samples recorded at other sample rate; only that the
- encoder assumes that the frequency is either 32, 44.1 or 48 kHz.
- You should select the sample rate closest to the actual samplerate and you
- should be careful when encoding samples recorded at frequencies very much
- lower than 32kHz. The encoder uses various psychoacoustic tricks to compress
- the sample; eg. it assumes that the ear is less sensitive to variations in
- volume at some frequencies than at others. If you encode a 10kHz sample by
- specifying a sample rate of 32kHz, the algorithmes will actually be applied
- to frequencies only 1/3 of what they're supposed to be, and so will have a
- different effects than what was intended.
-
- The possible bitrates are:
- 0,32,48,56,64,80,96,112,128,160,192,224,256,320,384.
-
-
- If you want to compress a sample to 15% of the original, you should select a
- bitrate which is 15% of the sample rate you specify. So if your sample was
- recorded at 28kHz, you specify 32kHz as the sample rate and a bitrate of
- 80 kbps (0.15 * 32000 samples/second * 16 bits/sample = 80000 bits/second).
-
- Example: Encode -m m -s 32 -b 80 samplefile ampegfile
-
-
-
- Decoder
- -------
- The decoder outputs a file holding 16 bit linear signed samples. If the
- sample is in stereo, the channels will be interleave (LRLRLRLR...).
-
- Usage: Decode [switches] <input> <output>
-
- Switches: -h output high byte first
-
- Example: Decode -h ampegfile samplefile
-
-
-
- The frontend
- ------------
- When you run !AudioMPEG, it installs an icon on the icon bar. Click
- SELECT on this to open the encoder window. To encode a sample file, simply
- drag the file to this window or to the AudioMPEG icon on the iconbar.
- You may then alter the parameters (bits-per-second, sample-rate, number
- of channels) and when this is OK, clicking on the 'OK' icon will open a
- standard save-box which lets you specify where the encoded file should be
- saved.
- The encoding may optionally be run multitasking by selecting the 'Multitask'
- icon in the encoder window.
-
- To decode a file, simply drag it to the AudioMPEG icon on the iconbar which
- will open the save window.
- The file MUST have filetype &1AD (AMPEG). Decoding is done multitasking (in
- a taskwindow) if the 'Multitask' icon in the encoder window is set.
-
-
- Speed
- -----
- The current decoder runs at about 2-4% of real-time, which is actually
- quite fast compared to the encoder. So the encoder and decoder should only
- really be used when you need to store/transmit large samples.
-
-
- ftp-sites
- ---------
- For examples of MPEG audio files, try
-
- sunsite.unc.edu
-
- in the directory
-
- pub/electronic-publications/IUMA/music/Clapton,_Eric
- pub/electronic-publications/IUMA/music/Madonna
- pub/electronic-publications/IUMA/music/Prince
- pub/electronic-publications/IUMA/music/Buffalo,_Grant_Lee
-