Difference between revisions of "TAK"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
(Frequently Asked Questions)
(A HA thread link)
(16 intermediate revisions by 12 users not shown)
Line 3: Line 3:
 
| logo =
 
| logo =
 
| type = lossless
 
| type = lossless
| purpose = lossless audio compression.
+
| purpose = (T)om's verlustfreier (A)udio(k)ompressor
 
| maintainer = Thomas Becker
 
| maintainer = Thomas Becker
| recommended_encoder = TAK encoder
+
| released = TAK v2.3.1 (2021-03)
| recommended_text = TAK v2.3.0
+
| website = [http://thbeck.de/Tak/Tak.html ThBeck.de/Tak/Tak.html] ''(German)''
| website = [http://thbeck.de/Tak/Tak.html ThBeck.de/Tak/Tak.html] ''(german)''
+
 
}}
 
}}
  
== Description ==
+
'''Tom's lossless Audio Kompressor''' ('''TAK''') is a [[lossless]] audio [[codec]].  It comes with a freeware (closed-source) encoder/decoder as both a command-line executable and a GUI, as well as a decoding library and an SDK to use in other applications, and a [[Winamp]] plugin - all for the Windows operating systems (known to work with Wine). 
'''Tom's lossless Audio Kompressor''' ('''TAK''') is a lossless audio compressor which promises compression performance similar to [[Monkey's Audio]] “High” and decompression speed similar to [[Free Lossless Audio Codec|FLAC]].
+
 
 +
TAK has gained recognition for its performance figures, achieving compression like [[Monkey's Audio]] “High” at same encoding time, and ditto for the even higher-compressing [[OptimFrog]] “Normal” - and while also decoding at speed (CPU load) second only to [[Free Lossless Audio Codec|FLAC]].  TAK could beat every FLAC setting simultaneously on size and encoding time.  (All performance figures in this article are taken from the 4th revision of [http://audiograaf.nl/downloads.html Martijn van Beurden's comprehensive lossless comparison] for CDDA audio, TAK version tested: 2.3.0.)
 +
 
 +
== Features ==
 +
For an end-user considering TAK as a an audio format - likely due to its performance - the following features are quite common among lossless codecs.  Some competing formats are lacking certain of these features, and some are free from certain of the limitations listed; some support more input formats and some support fewer.  To compare TAK with other lossless codecs, see [[Lossless_comparison| HA Wiki's Lossless Codec Comparison]].
  
=== Features ===
 
* High compression
 
* Fast compression and decompression speed
 
 
* Streaming support (necessary headers for decompressing the audio are written to the stream every 2 seconds)
 
* Streaming support (necessary headers for decompressing the audio are written to the stream every 2 seconds)
* Piping support for encoding
 
* Error tolerance (single bit error will never affect more than 250 ms)
 
* Error detection (each frame protected by a 24-bit checksum (CRC))
 
* High-resolution (up to 24-bit/channel) audio support
 
* Support for up to 192 Khz Audio
 
 
* Seeking without seek table
 
* Seeking without seek table
* APEv2 tags supported at end of file
+
* Error handling: each frame protected by a 24-bit checksum for detection (also optional MD5 audio checksum for the entire file). According to the README, the decoder can decode through errors, and a single bit error will never affect more than 250 ms.
 +
* High-resolution audio support: up to 192 kHz sampling rate and 24 bits/channel
 +
* Support for up to six channels. Channel mask in [https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-waveformatextensible WAVEFORMATEXTENSIBLE].
 +
* Piping support for encoding
 +
* Tagging: APEv2 tags at end of file.
 +
* RIFF chunks supported for recreating also non-audio chunks of the original .wav files. See the "Wave file meta data" section in the README.
 +
* Multi-core support (encoding only; the README warns that you will likely only benefit from physical CPU cores).
  
=== Pros ===
+
Even if the bit depth must be 8 or 16 or 24 bits, TAK is known to employ a "wasted bits" strategy that treat a a (say!) 20 bit signal in a 24 bit container by detecting that 21 to 24 are "wasted" and compress the 20-bit signal without compression size penalty: see van Beurden's lossless comparison, section 2.3. 
* Fast encoding speed (while providing better compression TAK encodes as fast as [[Free Lossless Audio Codec|FLAC]] -8 in TAK's “Insane” and several times faster in “Turbo” mode)
+
* Fast decompression speed (on par with FLAC / [[WavPack]])
+
* Good compression levels (on par with [[Monkey's Audio]] High)
+
* Error Robustness
+
* Fast Seeking
+
  
=== Cons ===
+
 
* Closed Source
+
=== Limitations ===
* No hardware support
+
For an end-user considering TAK to compress common lossless audio files like found on CDs or DVDs, the main limitation is the first of the following bullet items, namely support. On a platform that supports TAK, the other items listed are either common to several if not most codecs, or ''can'' (but not necessarily ''will'') be circumvented by external applications.
* Limited software support
+
 
 +
* Currently there is no hardware supporting the format and software support is limited.  The official encoder/decoder is closed-source (but a decoding library can be used in third-party applications); ffmpeg offers an open-source decoder.
 +
* Does not support floating-point PCM (for that, use WavPack or OptimFrog).
 +
* No Unicode support as of version 2.3.1.  External applications can circumvent this ([[foobar2000]] does, [[CUETools]] does not).
 +
* The encoder can read no other input ''files'' than standard-compliant .wav; but, using piped stdin (like external applications might do) rather than file input, one can convert from other lossless formats and in particular, circumvent the WAVE standard's 4 GB limitation.
 +
 
 +
For a hybrid lossless/lossy mode, it is possible to use TAK with [[lossyWAV]]. This is arguably an option for advanced users; others who want hybrid solutions will probably consider those formats which support it natively (WavPack/OptimFrog).
  
  
 
== Software support ==
 
== Software support ==
=== Windows ===
+
ffmpeg can decode TAK files on several platforms, and both the GUI (Tak.exe) and the command-line program (Takc.exe) work with [http://www.winehq.org/ Wine]. Some of the Windows applications given below use ffmpeg for decoding, others use the official decoding library.
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=89610 TAK 2.2.0] (official release which consists of a CLI, a GUI, a [[Winamp]] plugin, the SDK, and the decoding library)
+
 
* [http://www.foobar2000.org/components/view/foo_input_tak TAK Decoder 0.4.7] - plugin for [[foobar2000]] (supports tagging and [[ReplayGain]])
+
The [http://picard.musicbrainz.org/ MusicBrainz Picard] tagger (multi-platform) supports TAK since version 0.11.
* [http://www.liviocavallo.altervista.org/ dsfTAKSource 0.0.1.6] - DirectShow source filter to play TAK-files in Windows Media Player, Media Player Classic - Home Cinema, Zoom Player and alike
+
The [http://www.videolan.org/vlc VLC Media Player] (multi-platform) can play (and transcode from) TAK since at least version 2.2.0.
* [http://reino.degeelebosch.nl/ DC-Bass Source Mod 1.5.0.0] - DirectShow source filter to play TAK-files, amongst many others, in any DirectShow media player (as mentioned above)
+
 
 +
=== Windows-specific ===
 +
* [http://thbeck.de/Download/TAK_2.3.1.zip TAK 2.3.1 download link] - Official release which consists of a CLI, a GUI, the decoding library, the SDK, and a [[Winamp]] plugin.
 +
* [https://www.foobar2000.org/components/view/foo_input_tak TAK Decoder 0.5.4] - Plugin for [[foobar2000]] (supports tagging and [[ReplayGain]], uses the current (2.3.1) decoding library).
 +
* [http://www.liviocavallo.altervista.org/ dsfTAKSource 0.0.1.6] - DirectShow source filter which uses the 2.2.0 decoding library to play TAK-files in Windows Media Player, Media Player Classic - Home Cinema, Zoom Player and alike.
 +
* [https://rwijnsma.home.xs4all.nl/dc-bsm/index.htm DC-Bass Source Mod] - DirectShow source filter which uses the 2.3.0 decoding library to play TAK-files, amongst many others, in any DirectShow media player (as mentioned above).
 +
* [http://code.google.com/p/lavfilters/ LAV Filters] - Set of open-source DirectShow filters which uses [https://ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131785.html FFMpeg's reverse-engineered decoder] to play TAK-files in any DirectShow media player.
 +
* [http://sourceforge.net/projects/mpcbe/ Media Player Classic - BE] - DirectShow media player with an internal TAK source filter which uses FFMpeg's reverse-engineered decoder to play TAK-files. The internal TAK source filter also supports embedded cue-sheets.
 
* [[Mp3tag]] – universal tag editor with support for TAK
 
* [[Mp3tag]] – universal tag editor with support for TAK
* [http://etree.org/shnutils/shntool/ shntool] (since version 3.0.6)
+
* [http://shnutils.freeshell.org/shntool/ shntool] (since version 3.0.6)
  
=== Linux ===
 
* ffmpeg can demux, decode and parse TAK since commit d7a473926504e2acfa6ae3bead0938e1f4e03441:[http://git.videolan.org/?p=ffmpeg.git;a=commit;h=d7a473926504e2acfa6ae3bead0938e1f4e03441]. First official release that supports TAK decoding is 1.1.
 
* The GUI program (Tak.exe) and the command-line program (Takc.exe) work with [http://www.winehq.org/ Wine].
 
* [http://caudec.outpost.fr caudec] is a command-line tool that can encode and decode TAK files, using the official binary (Takc.exe) with Wine (see: [http://caudec.outpost.fr/documentation/windowscodecs/ installation instructions]). Caudec can also test file integrity and compute (and tag) Replaygain data. While it hasn't been tested at the time of writing, it is possible that TAK support in caudec works on OS X as well.
 
  
== Hardware support ==
 
* None
 
  
  
== Recommended Settings ==
+
== Using TAK ==
* Default compression: “-p2” (formerly ''Normal'') is the most attractive setting, providing an excellent compromise between compression and encoding speed. (At compression levels close to [[Monkey's Audio]] High (<0.4% difference), it is able to encode more quickly.)
+
For encoding/decoding through other software, see heading below; you can pass command-line options to those applications.   
takc -e [input file]
+
* Highest compression: “-pMax” (same as -p4m) (This will create files which are comparable in size to file created using [[Monkey's Audio]] High. Decompression speed is comparable to [[WavPack]] Normal.)
+
  takc -e -pMax [input file]
+
* Fastest compression: “-p0” (This will create files which are comparable in size to [[Monkey's Audio]] Fast or [[WavPack]] High. Decompression speed is comparable to [[Free Lossless Audio Codec|FLAC]] 0.)
+
takc -e -p0 [input file]
+
  
=== TAK Performance Graph ===
+
More exhaustive instructions are found in the README.html included in the official TAK distribution.
[[Image:TAK_performance_graph_1-0-4.png|frame|center|Graph showing encoding and decoding rate against compression, using data from Synthetic Soul's test on TAK 1.0.4<br />(see [[TAK#External Links|External Links]])]]
+
 
 +
=== Encoding, decoding, test and verification ===  
 +
The following command-line parameters (and more!) are accessed through buttons and checkboxes in the GUI:
 +
* -e encodes, -d decodes; also, it can run test encoding/decoding by -te resp. -t.
 +
* -v verifies upon encoding; -md5 adds audio MD5 checksum for later verification.
 +
 
 +
=== Compression parameters and performance ===
 +
The compression options are displayed by name in the GUI.  The compression options range from -p0 to -p4, with each of the having an optional “e” (for “extra”) or “m” (“maximum”) modifier for additional compression at the expense of encoding (but not decoding) time, making for fifteen in total: -p0, -p0e, -p0m etc.  The number (0 to 4) does affect decoding CPU load, but only modestly (van Beurden, figure 1.2.)
 +
* -p2 is the current default option.  It is measured to compress on par with Monkey's “Normal”, but encoding at speeds between WavPack and FLAC default options.
 +
* -p0 is the fastest option, encoding around WavPack default and FLAC -6, but 2-3 times faster.
 +
* -p4m is the slowest option for highest compression (though at very small improvement over -p4e). The README promises compression size "on par with Monkey's Audio High and OptimFrog Normal", and van Beurden's lossless comparison confirms this - sizes even measure to between Monkey's “High” and “Extra high”, while decoding at 10-15 percent Monkey's/OptimFrog's CPU load.
 +
 
 +
=== Command-line examples, including pipe redirection ===
 +
Basic encoding resp. decoding commands are
 +
Takc -e input.wav
 +
Takc -d input.tak
 +
 
 +
Example with more parameters: The following will encode input.wav to output.tak using compression level “p3e”, write an MD5 checksum, and afterwards verify the encoded file:
 +
Takc -e -p3e -md5 -v input.wav output.tak
 +
 
 +
Examples decoding TAK with pipe to .mp3/.opus/.flac/.wv:
 +
Takc.exe -d input.tak - | lame.exe -V 6 - output.mp3
 +
Takc.exe -d input.tak - | opusenc.exe --bitrate 64 - output.opus
 +
Takc.exe -d input.tak - | flac.exe -8 - -o output.flac
 +
Takc.exe -d input.tak - | wavpack.exe -hhx - output.wv
 +
 
 +
Examples encoding TAK from FLAC, WavPack resp. arbitrary ffmpeg-supported (16-bit) format:
 +
flac.exe -dc input.flac | Takc.exe -e -p1e - output.tak
 +
wvunpack.exe input.wv - | Takc.exe -e -p4m - output.tak
 +
ffmpeg.exe -i input.xxx -f wav - | Takc.exe -e -p0 '''-ihs''' - output.tak
  
  
== Using TAK ==
 
=== TAK with [[foobar2000]] ===
 
* Copy the takc.exe to your [[foobar2000]] directory
 
* Go to File → Preferences → Tools → Converter
 
* Set it up as shown:
 
[[Image:Tak_foobar_converter.png|frame|center|Screenshot of foobar 0.9.5 Converter settings for TAK 1.0.3]]
 
'''Note:''' replace -p2 with the desired compression level.
 
  
* TAK introduced encoding from STDIN in version 1.0.3, eliminating the need for a temporary file and greatly improving overall compression time. If you are using an earlier version of TAK use the following command line instead:
+
== Using TAK in other applications ==
-e -p2 %s %d
+
* Use [[APEv2 specification|APEv2]] tagging (will be used as internal tagging)
+
  
 +
=== Ripping CDs to TAK with [[Exact Audio Copy]] ===
 +
[[EAC and TAK|wiki guide]] details how to rip CDs to TAK with EAC.
  
=== TAK with EAC ===
 
Please read the [[EAC and TAK|wiki guide]], which details how to create TAK files with [[Exact Audio Copy|EAC]].
 
  
 +
=== Playing and converting to/from TAK with [[foobar2000]] ===
 +
For decoding, use the [https://www.foobar2000.org/components/view/foo_input_tak foo_input_tak] component (current version using the 2.3.1 decoding library).
  
== Future Features ==
+
For encoding:
* Unicode support
+
* Select files, right-click, select Convert and the “...”
* MD5 audio checksums for verification and identification
+
* Under Output format, click Add New and set it up as shown below ('''note:''' replace -p2 with the desired compression level).
* A German version
+
* Upon first conversion, foobar2000 will ask you to navigate to locate Takc.exe .
* Embedded cue sheets
+
[[Image:Tak_foobar_converter.png|frame|center|Screenshot of foobar 0.9.5 Converter settings for TAK 1.0.3 choosing -p2 compression level.]]
* Embedded cover art
+
* Multichannel audio
+
  
 +
=== TAK in [[CUETools]] ===
 +
CUETools supports TAK out of the box if Takc.exe is in your ''PATH'' - or if a copy of Takc.exe is in in the CUETools folder.  Otherwise, one has to give the path to the exe in Settings, under the Encoders tab and the Decoders tab, for each profile (or edit the settings file).  Due to TAK not supporting Unicode, consider the "Force ANSI filenames" checkbox and make sure that also directory names are ANSI.
  
== Frequently Asked Questions ==
 
; Is the codec safe for use/definitely lossless?
 
: Yes, TAK is verified as being lossless, as determined through rigorous testing by the author and satisfied users. To check, convert a WAV to TAK and back and compare the two, for instance using [[Foobar2000:Foobar2000|foobar2000]]'s [[Foobar2000:Components/Binary Comparator (foo_bitcompare)|Binary Comparator]].
 
; Why should I use TAK?
 
: TAK offers high ratios of compression but also great decoding speeds.
 
; What can I compress with TAK?
 
: TAK 1.0 can compress any integer-format (up to 24 bits per channel) PCM RIFF WAVE file (.WAV). Piping support is implemented as of v1.0.3, so converting lossless files to WAV first is not necessary: users can simply pipe the decompressed output from their decoder of choice directly into TAK's encoder.
 
; What about hardware support?
 
: There is none at the moment. However, ''-p0'', ''-p1'' and ''-p2'' are the candidates for most suitable settings for hardware.
 
; Will the source be opened?
 
: The official encoder and decoder are currently closed-source. Thomas has expressed an intention to open the source of the decoder at some point in time, stipulating preconditions of its first being further refined, ported to C or C++, and documented. This may or may not lead to releases of other code. However, as of June of 2013, he feels that “a lot of (not very exciting) work is required” until the decoding source would be ready to be published, and that may or may not happen in the foreseeable future. Such questions generally generate more noise than fruitful discussion, so it is best to wait and see what happens. In any case, there is an independently implemented open source decoder available, bundled with ffmpeg.
 
  
== External Links ==
+
== Links ==
* [http://thbeck.de/Tak/Tak.html thbeck.de/Tak/Tak.html] – Official Website ''(german)''
+
* [http://thbeck.de/Tak/Tak.html] – Official Website ''(German)''
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=101386 TAK 2.3.0 Discussion Thread on HA] ''(english)''
+
* [https://hydrogenaud.io/index.php?topic=120760.0 TAK 2.3.1 Discussion Thread on HA]
* [http://www.hydrogenaudio.org/forums/index.php?showtopic=89610 TAK 2.2.0 Discussion Thread on HA] ''(english)''
+
* [https://hydrogenaud.io/index.php?showtopic=101386 TAK 2.3.0 Discussion Thread on HA]
* [http://synthetic-soul.co.uk/comparison/lossless/ synthetic-soul.co.uk/comparison/lossless] Comparison with Other Codecs (by Synthetic Soul)
+
* [https://hydrogenaud.io/index.php?showtopic=89610 TAK 2.2.0 Discussion Thread on HA]
* [http://flac.sourceforge.net/comparison.html flac.sourceforge.net/comparison.html] – An Updated Comparison (from FLAC Homepage)
+
* [https://hydrogenaud.io/index.php?topic=43808.0 HA thread where name change from ''Yet another lossless audio compressor'' was brainstormed and announced]
 +
* [https://hydrogenaud.io/index.php/topic,43179.0 First HA discussion thread]
 +
* [[Lossless_comparison| HA Wiki's Lossless Codec Comparison]] originally by [[User:Rjamorim|Rjamorim]]
 +
* [http://audiograaf.nl/downloads.html] Martijn van Beurden's lossless performance tests.
  
 +
{{navbox audio codecs}}
  
[[Category:Lossless]]
+
[[Category:Codecs]]
[[Category:Encoder/Decoder]]
+

Revision as of 08:34, 14 January 2022

Tom's lossless Audio Kompressor (TAK) is a lossless audio codec. It comes with a freeware (closed-source) encoder/decoder as both a command-line executable and a GUI, as well as a decoding library and an SDK to use in other applications, and a Winamp plugin - all for the Windows operating systems (known to work with Wine).

TAK has gained recognition for its performance figures, achieving compression like Monkey's Audio “High” at same encoding time, and ditto for the even higher-compressing OptimFrog “Normal” - and while also decoding at speed (CPU load) second only to FLAC. TAK could beat every FLAC setting simultaneously on size and encoding time. (All performance figures in this article are taken from the 4th revision of Martijn van Beurden's comprehensive lossless comparison for CDDA audio, TAK version tested: 2.3.0.)

Features

For an end-user considering TAK as a an audio format - likely due to its performance - the following features are quite common among lossless codecs. Some competing formats are lacking certain of these features, and some are free from certain of the limitations listed; some support more input formats and some support fewer. To compare TAK with other lossless codecs, see HA Wiki's Lossless Codec Comparison.

  • Streaming support (necessary headers for decompressing the audio are written to the stream every 2 seconds)
  • Seeking without seek table
  • Error handling: each frame protected by a 24-bit checksum for detection (also optional MD5 audio checksum for the entire file). According to the README, the decoder can decode through errors, and a single bit error will never affect more than 250 ms.
  • High-resolution audio support: up to 192 kHz sampling rate and 24 bits/channel
  • Support for up to six channels. Channel mask in WAVEFORMATEXTENSIBLE.
  • Piping support for encoding
  • Tagging: APEv2 tags at end of file.
  • RIFF chunks supported for recreating also non-audio chunks of the original .wav files. See the "Wave file meta data" section in the README.
  • Multi-core support (encoding only; the README warns that you will likely only benefit from physical CPU cores).

Even if the bit depth must be 8 or 16 or 24 bits, TAK is known to employ a "wasted bits" strategy that treat a a (say!) 20 bit signal in a 24 bit container by detecting that 21 to 24 are "wasted" and compress the 20-bit signal without compression size penalty: see van Beurden's lossless comparison, section 2.3.


Limitations

For an end-user considering TAK to compress common lossless audio files like found on CDs or DVDs, the main limitation is the first of the following bullet items, namely support. On a platform that supports TAK, the other items listed are either common to several if not most codecs, or can (but not necessarily will) be circumvented by external applications.

  • Currently there is no hardware supporting the format and software support is limited. The official encoder/decoder is closed-source (but a decoding library can be used in third-party applications); ffmpeg offers an open-source decoder.
  • Does not support floating-point PCM (for that, use WavPack or OptimFrog).
  • No Unicode support as of version 2.3.1. External applications can circumvent this (foobar2000 does, CUETools does not).
  • The encoder can read no other input files than standard-compliant .wav; but, using piped stdin (like external applications might do) rather than file input, one can convert from other lossless formats and in particular, circumvent the WAVE standard's 4 GB limitation.

For a hybrid lossless/lossy mode, it is possible to use TAK with lossyWAV. This is arguably an option for advanced users; others who want hybrid solutions will probably consider those formats which support it natively (WavPack/OptimFrog).


Software support

ffmpeg can decode TAK files on several platforms, and both the GUI (Tak.exe) and the command-line program (Takc.exe) work with Wine. Some of the Windows applications given below use ffmpeg for decoding, others use the official decoding library.

The MusicBrainz Picard tagger (multi-platform) supports TAK since version 0.11. The VLC Media Player (multi-platform) can play (and transcode from) TAK since at least version 2.2.0.

Windows-specific

  • TAK 2.3.1 download link - Official release which consists of a CLI, a GUI, the decoding library, the SDK, and a Winamp plugin.
  • TAK Decoder 0.5.4 - Plugin for foobar2000 (supports tagging and ReplayGain, uses the current (2.3.1) decoding library).
  • dsfTAKSource 0.0.1.6 - DirectShow source filter which uses the 2.2.0 decoding library to play TAK-files in Windows Media Player, Media Player Classic - Home Cinema, Zoom Player and alike.
  • DC-Bass Source Mod - DirectShow source filter which uses the 2.3.0 decoding library to play TAK-files, amongst many others, in any DirectShow media player (as mentioned above).
  • LAV Filters - Set of open-source DirectShow filters which uses FFMpeg's reverse-engineered decoder to play TAK-files in any DirectShow media player.
  • Media Player Classic - BE - DirectShow media player with an internal TAK source filter which uses FFMpeg's reverse-engineered decoder to play TAK-files. The internal TAK source filter also supports embedded cue-sheets.
  • Mp3tag – universal tag editor with support for TAK
  • shntool (since version 3.0.6)



Using TAK

For encoding/decoding through other software, see heading below; you can pass command-line options to those applications.

More exhaustive instructions are found in the README.html included in the official TAK distribution.

Encoding, decoding, test and verification

The following command-line parameters (and more!) are accessed through buttons and checkboxes in the GUI:

  • -e encodes, -d decodes; also, it can run test encoding/decoding by -te resp. -t.
  • -v verifies upon encoding; -md5 adds audio MD5 checksum for later verification.

Compression parameters and performance

The compression options are displayed by name in the GUI. The compression options range from -p0 to -p4, with each of the having an optional “e” (for “extra”) or “m” (“maximum”) modifier for additional compression at the expense of encoding (but not decoding) time, making for fifteen in total: -p0, -p0e, -p0m etc. The number (0 to 4) does affect decoding CPU load, but only modestly (van Beurden, figure 1.2.)

  • -p2 is the current default option. It is measured to compress on par with Monkey's “Normal”, but encoding at speeds between WavPack and FLAC default options.
  • -p0 is the fastest option, encoding around WavPack default and FLAC -6, but 2-3 times faster.
  • -p4m is the slowest option for highest compression (though at very small improvement over -p4e). The README promises compression size "on par with Monkey's Audio High and OptimFrog Normal", and van Beurden's lossless comparison confirms this - sizes even measure to between Monkey's “High” and “Extra high”, while decoding at 10-15 percent Monkey's/OptimFrog's CPU load.

Command-line examples, including pipe redirection

Basic encoding resp. decoding commands are

Takc -e input.wav
Takc -d input.tak

Example with more parameters: The following will encode input.wav to output.tak using compression level “p3e”, write an MD5 checksum, and afterwards verify the encoded file:

Takc -e -p3e -md5 -v input.wav output.tak

Examples decoding TAK with pipe to .mp3/.opus/.flac/.wv:

Takc.exe -d input.tak - | lame.exe -V 6 - output.mp3
Takc.exe -d input.tak - | opusenc.exe --bitrate 64 - output.opus
Takc.exe -d input.tak - | flac.exe -8 - -o output.flac
Takc.exe -d input.tak - | wavpack.exe -hhx - output.wv

Examples encoding TAK from FLAC, WavPack resp. arbitrary ffmpeg-supported (16-bit) format:

flac.exe -dc input.flac | Takc.exe -e -p1e - output.tak
wvunpack.exe input.wv - | Takc.exe -e -p4m - output.tak
ffmpeg.exe -i input.xxx -f wav - | Takc.exe -e -p0 -ihs - output.tak


Using TAK in other applications

Ripping CDs to TAK with Exact Audio Copy

wiki guide details how to rip CDs to TAK with EAC.


Playing and converting to/from TAK with foobar2000

For decoding, use the foo_input_tak component (current version using the 2.3.1 decoding library).

For encoding:

  • Select files, right-click, select Convert and the “...”
  • Under Output format, click Add New and set it up as shown below (note: replace -p2 with the desired compression level).
  • Upon first conversion, foobar2000 will ask you to navigate to locate Takc.exe .
Screenshot of foobar 0.9.5 Converter settings for TAK 1.0.3 choosing -p2 compression level.

TAK in CUETools

CUETools supports TAK out of the box if Takc.exe is in your PATH - or if a copy of Takc.exe is in in the CUETools folder. Otherwise, one has to give the path to the exe in Settings, under the Encoders tab and the Decoders tab, for each profile (or edit the settings file). Due to TAK not supporting Unicode, consider the "Force ANSI filenames" checkbox and make sure that also directory names are ANSI.


Links