direkt zum Inhalt springen

direkt zum Hauptnavigationsmenü

Sie sind hier

TU Berlin

Inhalt des Dokuments

The LPAC Homepage

Important notice: In 2003, an improved version of the LPAC algorithm was chosen as reference model for "MPEG-4 Audio Lossless Coding (ALS)", so I decided to freeze the development of LPAC at that point. More information on MPEG-4 Audio Lossless Coding can be found on the MPEG-4 ALS page.

Conversion of LPAC files: You may convert existing LPAC files into ALS files without any loss (well, that's the main idea behind lossless compression). The fastest way to do so is to decode the LPAC files and then to re-encode the resulting wave files. For example, this Windows batch file (ZIP, 703,0 B) converts all LPAC files in a directory. All temporary wave files will be deleted, but not the original LPAC files. Please read the batch file (which is text) for additional explanations and syntax examples.

What is LPAC...?

LPAC is a codec (coder / decoder) for lossless compression of digital audio files. "Lossless" means that any compressed file can be decompressed in a way it will be bit-wise identical with the original. This is the main advantage of LPAC compared to lossy formats like MP3, WMA or RealAudio. On the other hand, lossy codecs can achieve higher compression ratios. For example, MP3 at 128 kbit/s achieves a (fixed) compression ratio of 11, whereas LPAC's compression ratios range from 1.5 to 4, strongly depending on the audio material. Typically they are around 2 for pop music and 2.5 for classical music. This may not seem much, but remember you will get back every single bit, no matter how often you subsequently compress and decompress a file. It is true that general archivers (Zip, LZH, gzip) are lossless, too, but they often achieve nearly no compression on audio files. LPAC is your choice if you want to save disk space without any quality drawbacks introduced by lossy codecs like MP3. The LPAC file format (*.PAC) is designed to be compatible and lossless across different platforms and processors. Using Windows, you can play your compressed songs using the Winamp plug-in. LPAC is also supported by ExactAudioCopy. Key Features

  • Totally lossless compression of 8 bit, 16 bit, 20 bit and 24 bit wave files (mono / stereo).
  • Cross-platform support for Windows, Linux and Solaris.
  • Direct playback of LPAC files (*.PAC) with Winamp plug-in.
  • CRC checksum to ensure lossless processing (since codec 2.0).
  • Encoding much faster than real time (4x - 12x on a 500 MHz Pentium).

New Releases

  • LPAC Archiver 1.41
  • Command Line Version 1.40 (Windows and Linux)
  • LPAC Codec DLL 3.08

For details see below.

LPAC Platforms

There are versions of LPAC for Windows, Linux and Solaris, which are compatible with each other, so you can exchange your compressed files between different systems. Windows LPAC Archiver is the user interface of the LPAC codec for Win32 (Windows95/98/ME/NT/2000). The codec itself is supplied as a DLL (lpaccodec.dll). In addition, there is also a command line version. To play compressed files directly there is a LPAC plug-in for Winamp. Linux and Solaris For Linux as well as for Solaris there are precompiled command line versions of LPAC.

LPAC Archiver

The LPAC Archiver is the user interface of the LPAC codec for Win32 (Windows 95/98/ME/NT/2000). The codec itself is supplied as a DLL (lpaccodec.dll). You can check the versions of LPAC Archiver and the Codec DLL by choosing About LPAC Archiver... in the system menu. Using the command line version simply type lpac -h. You can find a HTML documentation of the LPAC Archiver here (HTML, 18,0 KB).
History of LPAC Archiver

  • 1.41: Solves some problems with the report file. Supports improved file I/O control features of codec 3.07.
  • 1.40: Provides a check for accurate decoding and a priority selection. In addition, items in the file list can now be removed, and there should be no overflow anymore if if the total size of all files exceeds 2 GB.
  • 1.30: Supports the LPAC codec 3.0 which offers improved compression efficiency and increased speed. The Custom Compression Options are adapted to the new codec's features.
  • 1.20 Progress bar is updated more frequently. More detailed report file. Some internal modifications.
  • 1.10: Supports the LPAC codec 2.0 which offers compression of 24 bit files, CRC checksum and some general compression enhancements. For compatibility reasons you can choose a backward compatible file format for 8 bit and 16 bit files. There is also a new predefined compression mode Medium Compression, whereas the former Normal Compression mode is now called Simple Compression. Furthermore, all compression options are now saved in the configuration file.
  • 1.01: Some minor internal modifications.
  • 1.00: New user interface. The File Options dialog was removed, but its overwrite selection was integrated in the main dialog. In addition, you can specify a target folder for all output files and delete source files automatically. These options are now saved to a configuration file. The codec itself is now supplied as a DLL. The windows help file (.hlp) was replaced by a HTML documentation.

History of the Codec DLL

  • 3.08: Supports input from stdin. This feature is used by the command line version.
  • 3.07: Improved file I/O control features.
  • 3.06: Supports output to stdout. This feature is used by the command line version.
  • 3.05: Verifies the specifications in the wave header more exactly.
  • 3.03: Supports the 12 bit wave format (2 Bytes per sample). Some internal modifications.
  • 3.02: Supports the LPAC Codec API.
  • 3.01: Fixed a bug which could have made the codec crash under some (very improbable) circumstances.
  • 3.00: New PAC file format (v6), which offers improved compression efficiency and increased speed. Older PAC file formats (v2, v4, v5) still can be generated and decoded (forward and backward compatibility).
  • 2.04: Slightly optimized compression performance.
  • 2.03: Fixed another memory problem (only appeared using the 8192 block length).
  • 2.02: Supports the 20 bit wave format (3 bytes per sample). Fully backward compatible.
  • 2.01: Fixed some potential memory problems.
  • 2.00: Supports 24 bit resolution wave files. The new PAC file format (v5) has a CRC checksum to indicate lossless processing, and there are some compression enhancements associated with this new file format.
  • 1.58: Supports wave files with long headers (e.g. 4096 bytes). A memory bug in the decoder was removed.
  • 1.57: Optimized Extra High Compression mode. A rare bug using Joint Stereo was removed.
  • 1.53: A bug using Random Access was removed.
  • 1.52: A bug in the Fast Compression mode was removed.
  • 1.51: Increased compression and decompression speed.
  • 1.50: Increased compression ratio using Extra High Compression mode.

Downloads


Command Line Versions

The LPAC Command Line Version 1.40 for Windows supports input from stdin. In order to use all options of version 1.40, the codec DLL v3.08 is required. The version 1.40 for Linux is compatible with codec v3.08. The version 1.30 for Solaris is compatible with codec v3.01.

History of the Command Line Versions

  • 1.40: Supports input from stdin. Output file name is generated automatically (if missing). Extended verbose mode shows progress in percent.
  • 1.38: (Linux) Fixed "segmentation fault" bug. Revised error messages.
  • 1.37: Supports improved file I/O control features of codec 3.07. Output to stdout using "-".
  • 1.36: Supports output to stdout.
  • 1.35: New options. Delete input file after (de)compression, check for accurate decoding of the compressed file, set priority (Windows only). Some error messages are more precise now.
  • 1.32 (Linux): Significantly enhanced speed using file format v6 / v5.
  • 1.31: Shows file name if file could not be opened.
  • 1.30: Supports the LPAC codec 3.0.

Downloads

  • LPAC Command Line Version 1.30 for Solaris (Codec 3.01 compatible)
    Download: .gz file

Some remarks on the Linux / Solaris versions

  • The Linux and Solaris versions are executable (binary) files. It is not possible to release the source code (yet) due to copyright issues - sorry for that! Maybe there will be a GPL solution in the future.
  • Using the Solaris version, the command line option -u has the reverse meaning compared to the Windows and Linux versions! If you omit this option, 8 bit and 16 bit files will be encoded in the backward compatible format v4 of codec 1.5x. Please use -u6 / -u5 to enable the new file formats of codec 3.0 / 2.0 respectively. Using -u6 leads to significantly better compression, but it is also slower by a factor of 2. I changed the meaning of the -u option because encoding with the new file formats v6 / v5 is still very slow due to some non-optimized code. This will be changed in one of the next releases.

Please let me know if one version doesn't work on your system.

LPAC plug-in for Winamp

Playing your LPAC files with Winamp gives you the opportiunity to use Winamp's features like playlists, equalizers and much more. Fast forward and rewind is supported for all files. Random Access files will forward more quickly, but please make sure you used the Codec DLL 1.53 or later for encoding.
Plug-in History:

  • 1.00: Increased forwarding and rewinding speed for Random Access coded files. I finally decided to name this version "1.0".
  • 0.99: Supports the new PAC file format (v6) introduced with codec 3.0.
  • 0.98: Increased forwarding speed for files coded without the Random Access feature (in fact, forwarding speed was decreased in version 0.97, so now it's as fast as it was originally, but rewinding those files is still rather slow).
  • 0.97: Supports playback of 24 bit PAC files. The samples are internally converted to 16 bit resolution, but I hope this is a reasonable solution since most sound cards don't support 24 bit playback anyway. On the other hand, your soundcard must support the file's sampling frequency.
  • 0.96: Supports the new PAC file format (v5), but only for 8 / 16 bit resolution.
  • 0.95: Fast forward and rewind is now supported for all files. Those files coded without the Random Access feature will take a little longer to forward (approx. 5 sec for 1 min forwarding on a 300 MHz Pentium II).
  • 0.91: Extended File Info box (shows file sizes and compression ratio).
  • 0.90: Initial version.

Downloads

Installation: Simply execute the self-extracting archive "in_lpac.exe".

LPAC Codec API

The LPAC Codec API (Application Programming Interface) is a simple C interface for the LPAC codec. You can use the functions in your own applications to losslessly encode wave files (*.wav) and store them in the LPAC file format (*.pac) as well as to decode existing LPAC files. There are functions to encode or decode a whole file with only one function call, and there are sets of functions to process files frame by frame. Downloads

  • LPAC Codec API 1.0 for Win32  (includes the special codec DLL 3.02 which is necessary to use all functions)
    Download: lpacapi.zip (ZIP, 59,1 KB)

The package also includes a HTML documentation and some sample code.

LPAC support by ExactAudioCopy

LPAC is supported by the ExactAudioCopy audio grabbing tool. You can grab CDs and save you files as compressed LPAC files instead of wave files. First make sure that you have installed the LPAC command line version ("lpac.exe"). Then start ExactAudioCopy and chose "Compression Options | External Compression" from the EAC menu. Set the "Parameter passing scheme" to "LPAC Lossless Encoder" and specify the path where "lpac.exe" is located (e.g. "c:\myfolder\lpacstuff\lpac.exe"). Under "Bit Rate" you should chose "Medium Compression" or higher. If you check "Delete WAV after compression", all temporary wave files will be removed. Close the dialog box with "Ok". Then highlight the tracks to grab in the main window and chose "Copy Selected Tracks | Compressed" from the "Action" menu. After you have specified a directory where to copy the files, the audio tracks are successively grabbed and compressed.

Notice

The LPAC applications are freeware. They are supplied for people interested in audio compression and may be used by anyone for a noncommercial purpose. The files may be copied and distributed, as long as they are not altered.

The author will not be liable for any problems caused by the use of LPAC or LPAC files.

I would appreciate any comments or hints on errors. Please send them to .

Zusatzinformationen / Extras

Direktzugang

Schnellnavigation zur Seite über Nummerneingabe