[Stereo] MPEG sound under OpenVMS [Stereo] ---------------------------------------------------------------------- [*] Overview of the MPEG audio standard. [*] MPEG audio player under OpenVMS: Mpeg3play [*] MPEG audio player (fast) under OpenVMS: Mpg123 [*] MPEG audio codec under OpenVMS: Ampegencode ---------------------------------------------------------------------- Overview of the MPEG audio standard Digital encoding of sound, very popular since the launch of Compact Disc, is now widely used. However, the size of data to store or to transmit is very large. One minute of stereo CD quality sound size (44.1 Khz sample rate with 16 bits samples) is about 10.5 Megabytes, which translates to 1400 Kbits/sec of bitrate. Data compression techniques are necessary to reduce such a high volume of data, especially for Internet distribution of sound. Data compression algorithms used for text file compression (based on pattern encoding) are not effective when applied to sound files. Reducing the bandwith or the dynamic of the sound signal can reduce the volume of data but implies an important loss of quality. One of the most popular techniques used to obtain high level of compression (typically a 1:12 factor) without loss of audible quality is the MPEG audio encoding. Such a performance is acheived by using "perceptual coding" techniques based on psychoacoustic knowledge. The coding is applied after splitting the bandwith of the sound message into multiple sub-bands and operates by deleting informations considered as not hearable according to the psychoacoustic model in use. There are 3 Layers of Mpeg encoding: [*] Mpeg Layer 1: encoding used by the Phillips DCC. Compression factor of 4 (384 Kbit/s bitrate in stereo). [*] Mpeg Layer 2: Compression factor of 8 (bitrate of 192 Kbit/s). [*] Mpeg Layer 3: Compression factor of 10, even 12 (bitrates of 128 or even 112 Kbits/s). [*] For more informations, go to Fraunhofer-IIS Mpeg audio FAQ at Url http://www.iis.fhg.de/departs/amm/layer3/sw/ ---------------------------------------------------------------------- MPEG audio player under OpenVMS: Mpeg3play Mpeg3play Mpeg3play is an Mpeg audio Layer 2 and 3 player based on public sources of ISO MPEG audio workgroup. Johan Hagman made some optimizations to allow real-time playing. MPEG coding is indeed (and decoding also) very CPU bound. I ported version 0.9.6 of Mpeg3play under OpenVMS/Alpha, adding the support of Multimédia Services for OpenVMS. Mpeg3play is not available on VAX as a player (VAXes don't have PCM capable sound card) but only as an off-line converter from MPEG to PCM (WAV) format. I've made some performance mesurements on Alphastation 255 4/233 (OpenVMS 6.2-1H3, MMOV 2.0). Playing in real-time an Mpeg layer 2 (128 Kbits/s, 44.1 Khz) eats about 25% CPU. With an equivalent Mpeg Layer 3 file, playing eats about 50% CPU. It is worth to upper to 5 or 6 the priority of the process running Mpeg3play if you want to compile when listening music. Where can I find Mpeg3play ? Mpeg3play version 0.9.6 is available at CENA's DECwindows Archive via http and on Cnam mirror via ftp: [o] http://www2.cenaath.cena.dgac.fr/ftp/decwindows/mpeg3play-096.zip [o] ftp://ftp2.cnam.fr/decwindows/mpeg3play-096.zip ---------------------------------------------------------------------- A fast MPEG audio player under OpenVMS: Mpg123 Mpg123 Mpg123 is a fast Mpeg Audio Layer 1, 2 et 3 player, written by Michael Hipp and Oliver Fromme. I ported version 0.59O of Mpg123 under OpenVMS/Alpha from the Digital Unix port which already used the Multimedia Services API I've made some performance mesurements on Alphastation 255 4/233 (OpenVMS 6.2-1H3, MMOV 2.0). Playing in real-time an Mpeg layer 2 (128 Kbits/s, 44.1 Khz) eats about 22% CPU. With an equivalent Mpeg Layer 3 file, playing eats about 26% CPU. It is worth to upper to 5 or 6 the priority of the process running Mpg123 if you want to compile when listening music. Where can I find Mpeg3play ? Mpeg3play version 0.9.6 is available at CENA's DECwindows Archive via http and on Cnam mirror via ftp: [o] http://www2.cenaath.cena.dgac.fr/ftp/decwindows/mpg123-059o.zip [o] ftp://ftp2.cnam.fr/decwindows/mpg123-059o.zip ---------------------------------------------------------------------- MPEG audio codec under OpenVMS: Ampegencode Ampegencode The Mpeg audio Layer 1, 2 and 3 hereafter presented is a port under OpenVMS of sources published by the ISO MPEG audio workgroup in February 1997 (Distribgution 10). These sources seem to be the last public available Mpeg codec sources. The Mpeg Codec uses PCM (WAV) mono or stereo file as input, with a selectable sample rate (generally we use 22.05, 32 or 44.1 Khz). The compression factor is specified by the bitrate (128 Kbit/s = 1:12 compression factor for a stereo file). Best results are acheived when the maximum sound level into the WAV file is about -10 db. Don't forget that the theorical dynamic of a 16 bit per sample encoding is 96 db, we can sacrify 10 db. The present codec is not able to compress in real-time (at least on my system). With an Alphastation 255 4/233, Mpeg Layer 2 coding needs about 2 times the "real time". Mpeg Layer 3 coding is much slower. However, it may be possible to apply some optimizations to this program (for example the optimizations already applied to Mpeg3play). The minimal bitrate letting hear some artifacts on some soud messages, especially on voices, is 128 Kbit/s (even with Layer 3). Note that you can sometimes use such a low bitrate with Layer 2 with very good results, which is interesting considering the lower CPU needs when decoding a Layer 2 stream compared to Layer 3. After encoding, it is worth to carefully listen the result (with Mpeg3play) to verify presence of artifacts. A musical piece can have sometimes a very complex spectrum, and with a constant bitrate the codec may sometimes alter the quality. In such a case, it is worth to make another run reducing the compression factor (with a greater bitrate). Layer 3 reduces the sensitivity to this problem using of a reservoir bit Using the Joint-Stereo option is another key to improve quality at a given bitrate. With a 160 Kbit/s bitrate, this option allows in most situations a good quality result. With Layer 3 we can use a 112 Kbs bitrate with purely instrumental streams and 128 Kbs when human voices are involved. The Joint-Stereo option is not available in Layer 3 with this codec. Where can I find Ampegencode ? Ampegencode is available at CENA's DECwindows Archive via http and at Cnam mirror via ftp: [o] http://www2.cenaath.cena.dgac.fr/ftp/decwindows/mpeg_audio_encode_dist08.zip [o] ftp://ftp2.cnam.fr/decwindows/mpeg_audio_encode_dist10.zip ---------------------------------------------------------------------- Last Update: 11 November 1998 ---------------------------------------------------------------------- [PMoreau] Retour à la page d'accueil de Patrick Moreau ---------------------------------------------------------------------- pmoreau@cena.dgac.fr