ebu / libbw64

Broadcast Wave 64 (ITU-R BS.2088) library
https://libbw64.readthedocs.io
Apache License 2.0
28 stars 16 forks source link

RF64 Question #10

Closed sounddroid closed 5 years ago

sounddroid commented 5 years ago

Hello! Will this library create "RF64" or "RIFF" headers?

sounddroid commented 5 years ago

This library does support RF64 and RIFF !

benjamin-weiss commented 5 years ago

RF64 described in EBU Tech 3306 is deprecated. The latest version 2.0 simply refers to Recommendation ITU-R BS.2088. To be backwards compatible this library is able to also read RF64 files, but if necessary it will write BW64 files. It does so by following the rules described in section 2.5 of Recommendation ITU-R BS.2088:

At the beginning of a recording, a BW64-aware application will create a standard RIFF/WAVE with a ’JUNK’ chunk as the first chunk. While recording, it will check the RIFF and data sizes. If they exceed 4 Gbyte, the application will:

  • Replace the chunkID with chunk. (This transforms the previous chunk into a chunk).
  • Insert the RIFF size, ‘data’ chunk size and sample count in the chunk
  • Set RIFF size, ‘data’ chunk size and sample count in the 32 bit fields to −1 = FFFFFFFF hex
  • Replaces the ID ‘RIFF’ with ‘BW64’ in the first four bytes of the file
  • Continue with the recording.

I hope this clarifies it.

sounddroid commented 5 years ago

Yes that makes perfect sense! Thank you.