Does Ecasound Support RF64 Audio Files?

Ecasound supports reading and writing RF64 formatted audio files through its integration with the libsndfile library. RF64 is an extension of the standard RIFF/WAV format designed to overcome the traditional 4 GB file size limit, making it essential for long multitrack recordings and high-resolution multichannel audio. While Ecasound's built-in, native WAV handler adheres to the classic 32-bit RIFF specification, compiling and running Ecasound with libsndfile support enables seamless handling of RF64 streams.

How Ecasound Handles RF64

Ecasound relies on modular audio object drivers to read and write different media types. Standard WAV operations often use Ecasound's internal routines, which will fail or truncate when exceeding the 4 GB limit of 32-bit RIFF files. However, Ecasound integrates with libsndfile, an external C library that includes native support for the RF64 format (EBU Tech 3306 / ITU-R BS.1638).

When linked against libsndfile, Ecasound can access the SF_FORMAT_RF64 format type to handle large files.

Reading RF64 Files

To read an RF64 audio file in Ecasound, the file must be routed through the sndfile I/O module.

  • If an input file uses the .rf64 extension, Ecasound typically routes it to libsndfile automatically.

  • If the file uses a standard .wav extension but contains an RF64 header, you can explicitly force Ecasound to use the libsndfile driver by prefixing the input or specifying the object type:

    ecasound -i sndfile,large_recording.wav -o alsa

    Because libsndfile automatically parses the 64-bit chunk sizes and the mandatory ds64 chunk, reading functions normally without special sample rate or channel restrictions.

Writing RF64 Files

Writing RF64 files requires directing the output to the sndfile subsystem rather than Ecasound's native RIFF writer:

  1. Using the .rf64 Extension: When you define an output file ending in .rf64, Ecasound uses libsndfile to initialize the file with 64-bit RF64 headers.

    ecasound -i alsa -o output_multitrack.rf64
  2. Explicit Format Assignment: You can explicitly configure the output type using Ecasound's audio format options to guarantee the file is not written as a legacy RIFF file.

Prerequisites for RF64 Support

To ensure RF64 compatibility works properly in your workflow:

  • Verify libsndfile Installation: Ecasound must be built with libsndfile support enabled (version 1.0.21 or newer is required, as this is when reliable RF64 read/write support was introduced to the library).
  • Avoid Native WAV Output for Large Files: Do not use plain .wav outputs with the default internal engine for tasks expected to surpass 4 GB, as the headers will overflow. Always use the .rf64 extension or explicit sndfile routing.