ebu / libbw64

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

Backwards compatibility for writing BWF and/or RF64 #12

Closed smlehbleh closed 4 years ago

smlehbleh commented 4 years ago

Hi, Apologies if this is an uneducated question but I'm trying to figure out if the BW64 spec or the way this library is written allows libbw64 to output BWF and/or RF64 audio files. The idea being to use this library to write audio for applications (Adobe Premiere/DaVinci Resolve) which only support BWF and/or RF64

Thanks Russell

benjamin-weiss commented 4 years ago

Hi Russel,

for files <4GB it should just work, as the only difference is, that the JUNK chunk (and possibly the chna and axml chunk) will be added, which should just be ignored by every proper RIFF implementation. But if your files are bigger than 4GB you could run into issues, as instead of fourcc('WAVE') or fourcc('RF64'), fourcc('BW64') will be used. But you can easily check if your software supports the files if you adjust the bw64_create_sine programme to write a bigger file (e.g. const float DURATION = 40000.f;) and try to read it with your target programmes. If they are not able to read thhe files written by libbw64 you could also try to patch it.

https://github.com/IRT-Open-Source/libbw64/blob/901dd46488aa71ed836d30006f1c472d5131f8ba/include/bw64/writer.hpp#L206

Overwrite the BW64 by RF64 and most programmes should be able to read the files written by libbw64 (but as this does not comply with BS.2088, I will not do that).

Thanks! Benjamin

smlehbleh commented 4 years ago

Hi Benjamin,

Thanks for the information - looks like a straight forward thing to alter. Cheers Russell