Python modules for handling the Broadcast Wave Format and RF64 files.
Project description
wave-bwf-rf64
Python modules for handling the Broadcast Wave Format and RF64 files.
Installing:
$ pip install wave-bwf-rf64
Basic example:
import contextlib
import wave_bwf_rf64
with contextlib.closing(wave_bwf_rf64.open("input.wav", "rb")) as f:
print("Num frames:", f.getnframes())
Features
This package gives you the ability to work with both BWF and RF64 compatible WAV-files in Python.
Supported file IDs (first four bytes):
- RIFF
- RF64
Supported WAVE formats:
- PCM
Supported chunk types:
- ds64
- fmt
- data
- bext
- axml
- MD5
- levl
- chna
- r64m (only when reading)
This package's scope is limited to BWF and RF64 WAV files in the PCM format. Feature requests and pull requests for other types of (WAV) files are outside of this scope and would increase our maintenance burden if accepted. They will therefore not be considered. You are, however, more than welcome to publish such additions in a fork of your own.
Compatibility
This project requires Python version 3.10 or higher.
Versioning
We use semantic versioning.
The Semantic Versioning Specification requires that we declare a public API. We may only introduce breaking changes to this public API if we simultaneously increment the major version. No such commitment is made for the parts of this project that are outside of the public API.
The public API is:
wave_bwf_rf64.openwave_bwf_rf64.chunk.Chunkwave_bwf_rf64.wave.__all__ErrorWAVE_FORMAT_PCMBextChnaR64mMarkerR64mWave_readWave_writeopen
- All methods and attributes of any classes mentioned above, where the method or attribute name does not start with an underscore (
!= _*) - All methods and attributes of any classes mentioned above, where the method or attribute name is a system-defined name, i.e. their name starts and ends with two underscores (
== __*__)
License
This project is licensed under the GNU General Public License version 3 or later. See LICENSE for details.
wave-bwf-rf64 is a modified version of BBC's wave-bwf project.
The latter is, to the best of our knowledge, no longer available.
See the changelog for the history of this project, which spans back to 2014/2015.
Known issues
- There is no rendered documentation for the
openfunction and the classes it may return - The
openfunction does not acceptpathlib.Pathobjects - The object returned by
openis not a context manager, so it cannot be used with awithstatement directly - Issues where the size in the RIFF file header is too small or equal to 0, as may be the case when a recording was abruptly stopped or is accessed mid-recording, are not handled gracefully
- The project is lacking quality control
- The project is missing type annotations, so type checkers and IDEs may not help you so much
Specifications
- Primary specification: Recommendation ITU-R BS.2088-1
- Superseded specification containing information on the RF64 marker chunk (r64m): EBU-TECH 3306: MBWF/RF64: An extended File Format for Audio
Modules
chunk.py
The original Python module for handling RIFF chunks with extensions for handling RF64.
wave.py
Extension of the Python Standard Library's wave module with BWF handling added (bext, chna, axml, md5 and levl chunks).
Contributors
Thank you to:
- The Python Standard Library authors and contributors for the original
waveandchunkmodules - David Marston (BBC) for the Broadcast Wave File support
- Tormod Værvågen (NRK) for the RF64 support and support for the
MD5andlevlchunks - John Arne Johnsen (NRK) for conversion to Python 3 and the addition of BEXT coding history field
- Thorben Werner Sjøstrøm Dahl (NRK) for the support for the
r64mchunk (when reading) and preparations before publication
Todo
- Incorporate changes made to the chunk and wave modules in the Python Standard Library after this fork was made
- Adapt tests from the Python Standard Library and expand them with tests for the added functionality
- Adapt documentation from the Python Standard Library and expand it with descriptions of the added functionality
- Run tests and other quality control tools automatically
- Set up automatic release pipeline
- Refactor the user-facing API for easier use
- Refactor the internals, so that type checking works and the code is more readable
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wave_bwf_rf64-2.0.1.tar.gz.
File metadata
- Download URL: wave_bwf_rf64-2.0.1.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5fdabc3dad4ebf7dd65d86b15acc8b8cce856a2c2032abcb55ac9bd79d58c5c
|
|
| MD5 |
0d3ced8be5f123bcb238ebdb871c848d
|
|
| BLAKE2b-256 |
41d717c4f9051b72cf114882b24fb82b057d1b37da6500492bc8d3a8bcfa5593
|
File details
Details for the file wave_bwf_rf64-2.0.1-py3-none-any.whl.
File metadata
- Download URL: wave_bwf_rf64-2.0.1-py3-none-any.whl
- Upload date:
- Size: 39.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cea4c5df0c3dabf938d78dd1be3a89cc4ec32ea794fce35d63947164782efa8
|
|
| MD5 |
14173ead86c6001ba892f8aa70944214
|
|
| BLAKE2b-256 |
8dc5747b8764552336b1910f419d5aeef470844d556544a69972de10e7220ee9
|