Skip to main content

Topic: WavPack branch for low-latency streaming applications (Read 349 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • bryant
  • [*][*][*][*][*]
  • Developer (Donating)
WavPack branch for low-latency streaming applications
Once in a while a developer will ask me whether WavPack might make sense for a streaming application. I usually refer them to this article where a group used WavPack for real time streaming over RTP with good results.

The problem is that unmodified WavPack is not particularly suited for low-latency streaming applications because it has been optimized for maximum compression through the use of long blocks (typically ¼ – ½ second) and so a large per-block overhead (64 – 128 bytes or so, depending on mode) is irrelevant. However, when relatively short blocks are desired (e.g., 128 samples in the Kurtisi paper above) this overhead becomes significant and greatly reduces the efficiency of the compression.

To better handle these applications, I have recently worked on a new branch of the WavPack code that is optimized for short blocks. This was accomplished by reducing the header overhead by about 2/3, to about 22 – 44 bytes, again depending on mode. These blocks no longer have enough information for accurate seeking, but this is not a requirement for streaming applications. The codec is completely incompatible with regular WavPack, and I have eliminated tagging capability, but in theory it should be possible to losslessly transcode the audio back into regular WavPack if that was desirable.

Just to be clear, this is not intended as a replacement for WavPack, and is only intended for streaming applications.

The source code is currently available here, although this is still very much a work-in-progress and the format may change. Unfortunately I have not built this natively on Windows, but the mingw builds seem to work fine.

Thanks, and hopefully someone will find this useful!