Jean-Marc Valin | 01e1773 | 2008-10-10 20:14:44 -0400 | [diff] [blame] | 1 | CELT is a very low delay audio codec designed for high-quality communications. |
Gregory Maxwell | 54547f1 | 2009-02-16 18:56:44 -0500 | [diff] [blame] | 2 | |
| 3 | Traditional full-bandwidth codecs such as Vorbis and AAC can offer high |
| 4 | quality but they require codec delays of hundreds of milliseconds, which |
| 5 | makes them unsuitable for real-time interactive applications like tele- |
| 6 | conferencing. Speech targeted codecs, such as Speex or G.722, have lower |
| 7 | 20-40ms delays but their speech focus and limited sampling rates |
| 8 | restricts their quality, especially for music. |
| 9 | |
| 10 | Additionally, the other mandatory components of a full network audio system— |
| 11 | audio interfaces, routers, jitter buffers— each add their own delay. For lower |
| 12 | speed networks the time it takes to serialize a packet onto the network cable |
| 13 | takes considerable time, and over the long distances the speed of light |
| 14 | imposes a significant delay. |
| 15 | |
| 16 | In teleconferencing— it is important to keep delay low so that the participants |
| 17 | can communicate fluidly without talking on top of each other and so that their |
| 18 | own voices don't return after a round trip as an annoying echo. |
| 19 | |
| 20 | For network music performance— research has show that the total one way delay |
| 21 | must be kept under 25ms to avoid degrading the musicians performance. |
| 22 | |
| 23 | Since many of the sources of delay in a complete system are outside of the |
| 24 | user's control (such as the speed of light) it is often only possible to |
| 25 | reduce the total delay by reducing the codec delay. |
| 26 | |
| 27 | Low delay has traditionally been considered a challenging area in audio codec |
| 28 | design, because as a codec is forced to work on the smaller chunks of audio |
| 29 | required for low delay it has access to less redundancy and less perceptual |
| 30 | information which it can use to reduce the size of the transmitted audio. |
| 31 | |
| 32 | CELT is designed to bridge the gap between "music" and "speech" codecs, |
| 33 | permitting new very high quality teleconferencing applications, and to go |
| 34 | further, permitting latencies much lower than speech codecs normally provide |
| 35 | to enable applications such as remote musical collaboration even over long |
| 36 | distances. |
| 37 | |
| 38 | In keeping with the Xiph.Org mission— CELT is also designed to accomplish |
| 39 | this without copyright or patent encumbrance. Only by keeping the formats |
| 40 | that drive our Internet communication free and unencumbered can we maximize |
| 41 | innovation, collaboration, and interoperability. Fortunately, CELT is ahead |
| 42 | of the adoption curve in its target application space, so there should be |
| 43 | no reason for someone who needs what CELT provides to go with a proprietary |
| 44 | codec. |
| 45 | |
| 46 | CELT has been tested on x86, x86_64, ARM, and the TI C55x DSPs, and should |
| 47 | be portable to any platform with a working C compiler and on the order of |
| 48 | 100 MIPS of processing power. |
| 49 | |
| 50 | The code is still in early stage, so it may be broken from time to time, and |
Jean-Marc Valin | 01e1773 | 2008-10-10 20:14:44 -0400 | [diff] [blame] | 51 | the bit-stream is not frozen yet, so it is different from one version to |
| 52 | another. Oh, and don't complain if it sets your house on fire. |
Jean-Marc Valin | 06ee7f9 | 2007-12-09 00:55:49 +1100 | [diff] [blame] | 53 | |
Gregory Maxwell | 54547f1 | 2009-02-16 18:56:44 -0500 | [diff] [blame] | 54 | Complaints and accolades can be directed to the CELT mailing list: |
| 55 | http://lists.xiph.org/mailman/listinfo/celt-dev/ |
| 56 | |
Jean-Marc Valin | 06ee7f9 | 2007-12-09 00:55:49 +1100 | [diff] [blame] | 57 | To compile: |
| 58 | % ./configure |
| 59 | % make |
| 60 | |
Gregory Maxwell | 54547f1 | 2009-02-16 18:56:44 -0500 | [diff] [blame] | 61 | For platforms without fast floating point support (such as ARM) use the |
| 62 | --enable-fixed argument to configure to build a fixed-point version of CELT. |
| 63 | |
| 64 | There are Ogg-based encode/decode tools in tools/. These are quite similar to |
| 65 | the speexenc/speexdec tools. Use the --help option for details. |
| 66 | |
| 67 | There is also a basic tool for testing the encoder and decoder called |
| 68 | "testcelt" located in libcelt/: |
| 69 | |
Jean-Marc Valin | 5c0d486 | 2008-07-24 08:49:34 -0400 | [diff] [blame] | 70 | % testcelt <rate> <channels> <frame size> <bytes per packet> input.sw output.sw |
Jean-Marc Valin | 06ee7f9 | 2007-12-09 00:55:49 +1100 | [diff] [blame] | 71 | |
Gregory Maxwell | 54547f1 | 2009-02-16 18:56:44 -0500 | [diff] [blame] | 72 | where input.sw is a 16-bit (machine endian) audio file sampled at 32000 Hz to |
| 73 | 96000 Hz. The output file is already decompressed. |
Jean-Marc Valin | 3e65d1e | 2008-02-13 13:07:11 +1100 | [diff] [blame] | 74 | |
Gregory Maxwell | 54547f1 | 2009-02-16 18:56:44 -0500 | [diff] [blame] | 75 | For example, for a 44.1 kHz mono stream at ~64kbit/sec and with 256 sample |
| 76 | frames: |
| 77 | |
| 78 | % testcelt 44100 1 256 46 intput.sw output.sw |
| 79 | |
| 80 | Since 44100/256*46*8 = 63393.74 bits/sec. |
| 81 | |
| 82 | All even frame sizes from 64 to 512 are currently supported, although |
| 83 | power-of-two sizes are recommended and most CELT development is done |
| 84 | using a size of 256. The delay imposed by CELT is 1.25x - 1.5x the |
| 85 | frame duration depending on the frame size and some details of CELT's |
| 86 | internal operation. For 256 sample frames the delay is 1.5x or 384 |
| 87 | samples, so the total codec delay in the above example is 8.70ms |
| 88 | (1000/(44100/384)). |