Readme for OS2ENC/OS2DEC v.0.1:

OS2ENC/OS2DEC is a freeware Mpeg audio Encoder/Decoder for OS/2.
It was compiled with Gcc, so it requires that you have the emx 0.9c
runtimes installed on your system.

As it's only an encoder/decoder, you don't need to have any multimedia
hardware installed. (you'll need it if you want to sample some songs
and test it by yourself, obviously)

This version is a raw port of the public source code available at
ftp://ftp.tnt.uni-hannover.de/pub/MPEG/audio/mpeg2/software/technical_report/dist08.tar.gz
So don't expect ANY performance.

Anyway, it's the first layer-3 encoder available for OS/2 at this 
present time and it's not crippled (in the general meaning of the term).
In fact, it's crippled by its own limitations, especially by its speed !

Installation:
------------

Just unzip the file in an empty directory, say x:\mp3\os2enc\,
make sure you have the amx 0.9c runtimes installed on your computer, 
make sure you are in an OS/2 session (no, it won't work under Dos or 
the nasty windoze).
Last thing to do is to set an environment variable for the translation
tables.
Either type SET MPEGTABLES=x:\mp3\os2enc at the prompt for this particular
session, or put it in your CONFIG.SYS (and don't forget to reboot for
changes to take effect)

Features:
--------

The encoder/decoder is fully MPEG-1 and MPEG-2 compatible, for the
three available layers (Layer-1, layer-2 and ... layer-3).

As MPEG-2 introduces multichannel notions, it's only been tested
for being compatible with MPEG-1, and it's probably the only thing
you'll need, as MPEG-1 is used for 44Khz, stereo, 16b compression,
that means CD-quality. MPEG-2 is used for lower sampling frequencies
(ie: 22.05 Khz or below)

The import format for the sound files is PCM, which means a raw
sound file, with signed integer and 16bits. This version doesn't
handle WAV files yet.
The output format of the decoder is either raw (PCM) or AIFF.

Hint: if you don't know how to make a PCM file, just take a WAV file
      and cut the first 44 byter of it, it should work.

The decoder decodes almost any MPEG-1 and -2 compliant files.
The encoder lets you chose between the 3 available layers, the
output bitrate, and some other options:

1. First, you'll enter the input filename of your sound file
2. Then, the output filename, default is <input_file>.mpg
3. Then, you'll need to enter its sample frequency in KHZ:
    correct values are 44100 (default) or 22050, 11025 not available yet
    If you chose 44100 KHz, the encoding algorithm will be MPEG-1
    If you chose 22050 KHz, it will be MPEG-2

4. Then the layer you would like to use:
     Layer-2 is designed for an output bitrate of 128 Kbps/channel 
     Layer-3 is designed for an output bitrate of  64 Kbps/channel

     So, depending on the type of compression you need, use layer-2 
     or layer-3

     Layer-2 gives a lossless compression of 6:1 for a 256 Kbps 
       bitrate for a stereo signal.
     Layer-3 gives a lossless compression of 10 to 12:1 for a 
       128 to 112 Kbps for a stereo signal.

     This means, if you use layer-3 at 112 Kbps on CD-quality sound, you'll
     get a 1 Mb/mn of audio sound with the same quality as a Wav file, which
     sucks 10 Mb/mn of music... Ain't it cool ... ! :)


5. Next is the mode you want:
     Available are (s) for stereo (default)
	               (j) for joint-stereo (fake stereo from both channels)
				   (d) dual channel
				   (i) single channel (use this one if the input is a mono 
				                       signal)

     For some reasons, joint-stereo doesn't work yet, so forget it ...

6. Then chose the psychoacoustic model (uh ? ..):
     Don't worry, here's the hint, use '2' for layer-3 and '1' for layer-2
     (caution: '1' is the default, think about it when you use layer-3)

7. Then enter the bitrate for the output file (this value is the global
   output bitrate, for both channels).

   Common values are 384 - 320 - 256 - 192 - 128 - 112 - 96 - 64 - 56 - 32

   You can try layer-2 at 256 for high quality, 192 with a little loss
   For layer-3, preferred values are 128 or 112 Kbps for lossless quality.

8. Then, you'll be prompt for the de-emphasis ... use <n>one .
9. Then you'll be prompted for some adding stuff, the private bit, error
   protection, copyright ,etc... chose what you want.

10. And yet, go for it... you'll get a summary of the options you chose,
    and you'll 'see' the coding. Remember, encoding takes a looooooong 
	time, don't blame me for it right now, okay ... :)

Now, even if you don't have a descent player, or if your computer is not
a Pentium and though can't play a mp2 or mp3 file in real-time, if you
want to keep some wav files and save some hard-disk space, use this
program as a compressor... It achieves far better than Rar or Zip, 
believe me.

You can also use these options at the command-line prompt, just
type 'encode -h' to get help.


To-do list:
----------

- test every option (esp. the MPEG-2 algorithm)
- fix the joint_stereo option and 11025 Khz 
- add input/output file formats (Wav,AIFF,etc)
- change the defaults dialogs according to the layer choices
- change the verbose output to a descent one 
- optimize the code (yeah, that's the main stuff)

History:
-------

February, 1 1997: version 0.01 
  First beta version 

Acknowledgments:
---------------

This program is provided 'as is', which means I won't be responsible
for any thing that turns wrong (as Murphy said, 'if something can go
wrong, it will')... Obviously, it won't wipe out your hard-drive
(on the contrary, if your hard drive is full of wav files, it will
clean it up safely). Be careful when you uncompress mp3 files,
remember layer-3 compresses up to 12:1 so if you have a 5 MB mp3 file,
you'll get a 60 MB WAV file (AIF in fact).

That's all folks... enjoy it, feel free to distribute it to your
OS/2 friends, and look for the next releases of this software.

--
