Difference between revisions of "TTA"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
m
(Updated to accommodate Case's component, slightly reorganized.)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Codec Infobox
 
{{Codec Infobox
 +
| purpose =
 
| name = The True Audio
 
| name = The True Audio
| logo = [[Image:TTA-logo.png|Official TTA logo]]
+
| logo = [[File:TTA-logo.png]]
 
| type = lossless
 
| type = lossless
| purpose = The True Audio (TTA) codec
+
| maintainer = Aleksander Djuric<br/>Pavel Zhilin<br/>Tamir Barak<br/>Noam Koenigstein<br/>Kazuki Oikawa
| maintainer = Aleksander Djuric / Pavel Zhilin / Tamir Barak / Noam Koenigstein / Kazuki Oikawa
+
| released = TTA 2.3 (Windows version, 2015-02)
| recommended_encoder = TTA Lossless Audio Codec
+
| website = [http://tausoft.org/wiki/True_Audio_Codec_Overview tausoft.org]
| recommended_text = tta-2.3 (2015-02-24)
+
| website = http://tausoft.org/wiki/True_Audio_Codec_Overview
+
 
}}
 
}}
  
'''TTA''' (True Audio) audio codec is a free, simple real-time [[lossless]] audio encoder/decoder, based on adaptive prognostic filters which has shown satisfactory results comparing to majority of modern analogs.
+
'''The True Audio''' ('''TTA''') is a [[lossless]] audio [[codec]].  It is distributed as a free open-source (GPL/LGPL) encoder/decoder and library for several operating systems, and with DirectShow filters and plugins for several audio players, including [[foobar2000]].
  
==TTA Compressor==
+
It is not known whether the project is abandoned.  An announced development of a "TTA2" format has passed with no known updates since 2010.<ref>[https://web.archive.org/web/20100727022032/http://en.true-audio.com:80/TTA_Lossless_Audio_Codec_-_Format_Description Format description], archived 2010-07-27</ref>
  
* Down to 30-60% [[lossless]] audio data compression
+
TTA has a couple of unique properties: one is encryption with password protection, and also TTA chose (since around 2004) not to offer options to tune compression/CPU load; there is ''one'' setting.  These properties have some appeal in certain applications, outside which TTA seems to have a fairly limited userbase. 
* Real-time encoding/decoding algorithm
+
* Fast decoding and encoding
+
* Multiplatform
+
* Open source code and documentation
+
* Hardware support
+
  
TTA performs [[lossless]] compression on multichannel 8, 16 and 24 bit data of the [[WAV]] audio files. Being "lossless" means that no data/quality is lost in the compression - when uncompressed, the data will be identical to the original. The compression ratios of TTA depend on the type of music file being compressed, but the compression size will generally range between 30% - 70% of the original. TTA format supports both [[ID3]]v1 and [[ID3]]v2 information tags and also [[APEv2]].
+
Performance-wise, TTA has been measured around [[WavPack]] between default and <tt>-h</tt> on CD audio signals<ref>[http://audiograaf.nl/losslesstest Martijn van Beurden's comprehensive lossless comparison, version 5]</ref> &ndash; putting it on what traditionally has been considered on the ''fast encoder'' side rather than the ''heavy compression'' ([[Monkey's Audio]]/[[OptimFROG]]) side. One codec ([[TAK]]) could beat TTA simultaneously on both encoding speed, decoding speed and file size.
  
==The Project==
+
There is a third-party implementation through ffmpeg. ffmpeg's TTA encoder seems to produce the very same files as the reference encoder does, up to the tags &ndash; and, it also supports a higher channel count and accepts more input files than the official Windows encoder.  Also the foobar2000 component at foobar2000.org implements more features than the official version.  This wiki article aims at describing the features and limitations in the available end-user applications, rather than what the TTA ''format'' might accommodate (but nobody has implemented).
  
The TTA project provides:
 
  
* Free and simple data format
+
* Plugins for the most popular media players
+
== Features ==
* TTA DirectShow filters
+
For an end-user considering TTA as an audio format, the following features are quite common among lossless codecs, except for password protection.  Some competing formats are lacking certain of these features, and some are free from certain of the limitations listed.  To compare TTA with other lossless codecs, see [[Lossless_comparison| HA Wiki's Lossless Codec Comparison]].
* Tau Producer - GUI based compressor for Windows
+
* Set of the C/C++ TTA development libraries
+
  
==Addtional Reading==
+
* Seekable and streaming playback.
* [http://www.true-audio.com True Audio Software Project]
+
* High-resolution audio support: the format supports 24 bits per sample, at any WAVE sampling rate (integers up to 4 GiHz; although the encoders may stop short of the 4 GiHz mark &ndash; ffmpeg at 2 GiHz &ndash; this limitation is hardly relevant for audio).
* [[Lossless_comparison|Lossless Codec Comparison]]  
+
* Multichannel support, however with limitations (see below). Currently the reference encoder supports up to six channels, the ffmpeg implementation supports 16, and the unofficial foobar2000 component can handle 8.
 +
* Piping support.
 +
* Tagging: APEv2 or ID3v1/2.
 +
* Unicode support.
 +
* Embedded CUE sheets support.
 +
* Can be used in the [[Matroska]] container.
 +
* Password-protected encryption.
  
 +
The lack of encoding options may be a limitation or sometimes considered a feature: a given music signal corresponds to precisely one (unencrypted) TTA bit stream &ndash; no matter whether one uses the reference encoder or ffmpeg.  Metadata sections may of course differ, but the audio data part of the file depends only on input signal (and, if applicable, encryption password).
 +
 +
=== Limitations ===
 +
The following list is in part based on currently (2023) available implementations &ndash; some as revealed by tests in the Hydrogenaudio forums. 
 +
* [https://hydrogenaud.io/index.php/topic,122094 Bad error handling in the available implementations.]<ref>[https://hydrogenaud.io/index.php/topic,122094 HA forum discussion (2022) on codecs' error handling]</ref> Errors will upon playback lead to full-volume static noise played back, at worst for the rest of the file.  Only the most severe errors seem to be detected by the reference decoder.  Testing reveals that ffmpeg can detect errors the reference decoder cannot, and might drop more defective frames, but ffmpeg might still play back static unmuted.  The lack of (MD5) audio checksum is a more severe shortcoming when the capability to detect errors by other means is so limited; there seems to be no reliable way implemented to mass scan a collection for corrupted files, although the ''format'' claims to provide for it.
 +
* The existing implementations have limitations for non-CDDA signals:
 +
** Bit depth: The format supports 8, 16 or 24 bit files &ndash; and 8-bit signals are only supported in ffmpeg's implementation, not in the the reference encoder/decoder (nor the official [[foobar2000]] playback component). Note, some old sources refer to 32-bit (floating-point) support; that was apparently dropped circa 2004, and it is not known how to decode such files, should they even exist. <br/>Non-integer byte depths (say 20 valid bits in a 24-bit WAVE container) are not well supported.  Testing with 20-bit WAVE files has provoked the reference encoder into either of the following three: rejecting the file altogether; producing undecodeable files; silently upconverting to 24 bits, losing any information that it was ever 20 bits (ffmpeg appears to ''always'' do this).  In the latter case, TTA will not compress it well, as it is unable to make use of "wasted bits": other codecs can detect that bits 21 to 24 are zero and compress a 20-bit signal virtually without penalty.  (See van Beurden's lossless comparison, section 2.3.)
 +
** Limitations in multichannel support: Although the TTA ''format'' claims support for up to 65536 channels, no implementation seems to support more than 16 (ffmpeg), the reference implementation being capped at 6. The foobar2000 component repository includes a component version that handles 8 channels (unlike the component provided by the TTA developers), and that component also honours the [https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible WAVEFORMATEXTENSIBLE] tag to interpret what channels are encoded.  This is an unofficial feature; the format itself offers no channel assignment (e.g., if a TTA file has three channels there is no rule to tell whether it is 2.1 or 3.0, and likewise there is no rule to tell whether a five-channel file a 5.0 or a 4.1).  Also, in van Beurden's comparison, TTA fared worse on multichannel material than on stereo.
 +
** The reference encoder is picky about input ''files,'' only supporting some versions/generations of the WAVE format (and no other format than WAVE) and requiring workarounds at 2 GiB input size.  Also the reference implementation might truncate too large files. These issues can be circumvented by using ffmpeg instead. 
 +
* Metadata:
 +
** TTA might be the lossless format most likely to suffer from tagging ambiguity.  While there are other formats which can (like MP3) accommotate both ID3 and APEv2 tags, applications seem to have converged to APEv2 for other lossless formats which accept it, and both ffmpeg's TTA encoder and [[foobar2000]] will try to enforce APEv2 in TTA.  However, a tagger like [https://en.wikipedia.org/wiki/MusicBrainz_Picard MusicBrainz Picard] will treat TTA files as MP3 files, defaulting to ID3v1&ID3v2.3 while ''ignoring'' any APEv2.  Apparently [[Mp3tag]] will write ID3 to an ''untagged'' .tta file, but ignore ID3 when APEv2 is already present.
 +
** Although ffmpeg can transfer tags upon conversion in the usual way (to APEv2 when encoding), the reference encoder/decoder cannot. 
 +
** There is no provision for (R)IFF chunks; i.e. TTA cannot store nor recreate ''non-audio'' chunks of the original file. That means that one limitation of ffmpeg &ndash; that it drops RIFF chunks &ndash; is moot for TTA, which could not store them in any case.
 +
* Its unique feature &ndash; password protection &ndash; seems to be unsupported in ''players''.
 +
* Just as the lack of options might be useful in specialized applications, other users will find it a limitation.  However, one may argue that by 2023, performance differences are less of an issue even if there is no way to speed up neither encoding nor decoding (which takes even more CPU power than encoding).
 +
* Like most lossless formats, TTA has no functionality for hybrid lossless/lossy encoding. For TTA, there is also no way (for power users!) to hack a hybrid solution by way of [[LossyWAV]].
 +
 +
Hardware support is limited outside [[Rockbox]].  The TTA website lists a few other hardware players with TTA support.<ref>http://tausoft.org/wiki/True_Audio_Codec_Support</ref> However with ffmpeg on devices, the distinction between &laquo;hardware&raquo; and &laquo;software&raquo; support is arguably less clear.
 +
 +
==Using TTA==
 +
For several purposes, one might rather use ffmpeg than the reference encoder &ndash; at least for 16 bit signals.  For foobar2000 playback, the component at the foobar2000 website has more features than the TTA developers' decoding component.
 +
 +
==Links==
 +
<references/>
 +
Additional sources:
 +
* [http://tausoft.org/wiki/True_Audio_Codec_Overview TTA Lossless Audio Codec &ndash; Tau Projects:] Codec overview at the official site.
 +
* {{wikipedia|TTA (codec)}}
 +
* [https://www.foobar2000.org/components/view/foo_input_tta foobar2000 component at foobar2000.org]
 +
* [[Lossless_comparison| HA Wiki's Lossless Codec Comparison]] originally by [[User:Rjamorim|Rjamorim]]
 +
 +
{{navbox audio codecs}}
  
 
[[Category:Codecs]]
 
[[Category:Codecs]]
[[Category:Lossless]]
 

Latest revision as of 21:50, 21 September 2023

The True Audio (TTA) is a lossless audio codec. It is distributed as a free open-source (GPL/LGPL) encoder/decoder and library for several operating systems, and with DirectShow filters and plugins for several audio players, including foobar2000.

It is not known whether the project is abandoned. An announced development of a "TTA2" format has passed with no known updates since 2010.[1]

TTA has a couple of unique properties: one is encryption with password protection, and also TTA chose (since around 2004) not to offer options to tune compression/CPU load; there is one setting. These properties have some appeal in certain applications, outside which TTA seems to have a fairly limited userbase.

Performance-wise, TTA has been measured around WavPack between default and -h on CD audio signals[2] – putting it on what traditionally has been considered on the fast encoder side rather than the heavy compression (Monkey's Audio/OptimFROG) side. One codec (TAK) could beat TTA simultaneously on both encoding speed, decoding speed and file size.

There is a third-party implementation through ffmpeg. ffmpeg's TTA encoder seems to produce the very same files as the reference encoder does, up to the tags – and, it also supports a higher channel count and accepts more input files than the official Windows encoder. Also the foobar2000 component at foobar2000.org implements more features than the official version. This wiki article aims at describing the features and limitations in the available end-user applications, rather than what the TTA format might accommodate (but nobody has implemented).


Features

For an end-user considering TTA as an audio format, the following features are quite common among lossless codecs, except for password protection. Some competing formats are lacking certain of these features, and some are free from certain of the limitations listed. To compare TTA with other lossless codecs, see HA Wiki's Lossless Codec Comparison.

  • Seekable and streaming playback.
  • High-resolution audio support: the format supports 24 bits per sample, at any WAVE sampling rate (integers up to 4 GiHz; although the encoders may stop short of the 4 GiHz mark – ffmpeg at 2 GiHz – this limitation is hardly relevant for audio).
  • Multichannel support, however with limitations (see below). Currently the reference encoder supports up to six channels, the ffmpeg implementation supports 16, and the unofficial foobar2000 component can handle 8.
  • Piping support.
  • Tagging: APEv2 or ID3v1/2.
  • Unicode support.
  • Embedded CUE sheets support.
  • Can be used in the Matroska container.
  • Password-protected encryption.

The lack of encoding options may be a limitation or sometimes considered a feature: a given music signal corresponds to precisely one (unencrypted) TTA bit stream – no matter whether one uses the reference encoder or ffmpeg. Metadata sections may of course differ, but the audio data part of the file depends only on input signal (and, if applicable, encryption password).

Limitations

The following list is in part based on currently (2023) available implementations – some as revealed by tests in the Hydrogenaudio forums.

  • Bad error handling in the available implementations.[3] Errors will upon playback lead to full-volume static noise played back, at worst for the rest of the file. Only the most severe errors seem to be detected by the reference decoder. Testing reveals that ffmpeg can detect errors the reference decoder cannot, and might drop more defective frames, but ffmpeg might still play back static unmuted. The lack of (MD5) audio checksum is a more severe shortcoming when the capability to detect errors by other means is so limited; there seems to be no reliable way implemented to mass scan a collection for corrupted files, although the format claims to provide for it.
  • The existing implementations have limitations for non-CDDA signals:
    • Bit depth: The format supports 8, 16 or 24 bit files – and 8-bit signals are only supported in ffmpeg's implementation, not in the the reference encoder/decoder (nor the official foobar2000 playback component). Note, some old sources refer to 32-bit (floating-point) support; that was apparently dropped circa 2004, and it is not known how to decode such files, should they even exist.
      Non-integer byte depths (say 20 valid bits in a 24-bit WAVE container) are not well supported. Testing with 20-bit WAVE files has provoked the reference encoder into either of the following three: rejecting the file altogether; producing undecodeable files; silently upconverting to 24 bits, losing any information that it was ever 20 bits (ffmpeg appears to always do this). In the latter case, TTA will not compress it well, as it is unable to make use of "wasted bits": other codecs can detect that bits 21 to 24 are zero and compress a 20-bit signal virtually without penalty. (See van Beurden's lossless comparison, section 2.3.)
    • Limitations in multichannel support: Although the TTA format claims support for up to 65536 channels, no implementation seems to support more than 16 (ffmpeg), the reference implementation being capped at 6. The foobar2000 component repository includes a component version that handles 8 channels (unlike the component provided by the TTA developers), and that component also honours the WAVEFORMATEXTENSIBLE tag to interpret what channels are encoded. This is an unofficial feature; the format itself offers no channel assignment (e.g., if a TTA file has three channels there is no rule to tell whether it is 2.1 or 3.0, and likewise there is no rule to tell whether a five-channel file a 5.0 or a 4.1). Also, in van Beurden's comparison, TTA fared worse on multichannel material than on stereo.
    • The reference encoder is picky about input files, only supporting some versions/generations of the WAVE format (and no other format than WAVE) and requiring workarounds at 2 GiB input size. Also the reference implementation might truncate too large files. These issues can be circumvented by using ffmpeg instead.
  • Metadata:
    • TTA might be the lossless format most likely to suffer from tagging ambiguity. While there are other formats which can (like MP3) accommotate both ID3 and APEv2 tags, applications seem to have converged to APEv2 for other lossless formats which accept it, and both ffmpeg's TTA encoder and foobar2000 will try to enforce APEv2 in TTA. However, a tagger like MusicBrainz Picard will treat TTA files as MP3 files, defaulting to ID3v1&ID3v2.3 while ignoring any APEv2. Apparently Mp3tag will write ID3 to an untagged .tta file, but ignore ID3 when APEv2 is already present.
    • Although ffmpeg can transfer tags upon conversion in the usual way (to APEv2 when encoding), the reference encoder/decoder cannot.
    • There is no provision for (R)IFF chunks; i.e. TTA cannot store nor recreate non-audio chunks of the original file. That means that one limitation of ffmpeg – that it drops RIFF chunks – is moot for TTA, which could not store them in any case.
  • Its unique feature – password protection – seems to be unsupported in players.
  • Just as the lack of options might be useful in specialized applications, other users will find it a limitation. However, one may argue that by 2023, performance differences are less of an issue even if there is no way to speed up neither encoding nor decoding (which takes even more CPU power than encoding).
  • Like most lossless formats, TTA has no functionality for hybrid lossless/lossy encoding. For TTA, there is also no way (for power users!) to hack a hybrid solution by way of LossyWAV.

Hardware support is limited outside Rockbox. The TTA website lists a few other hardware players with TTA support.[4] However with ffmpeg on devices, the distinction between «hardware» and «software» support is arguably less clear.

Using TTA

For several purposes, one might rather use ffmpeg than the reference encoder – at least for 16 bit signals. For foobar2000 playback, the component at the foobar2000 website has more features than the TTA developers' decoding component.

Links

  1. Format description, archived 2010-07-27
  2. Martijn van Beurden's comprehensive lossless comparison, version 5
  3. HA forum discussion (2022) on codecs' error handling
  4. http://tausoft.org/wiki/True_Audio_Codec_Support

Additional sources: