Documentation

This commit is contained in:
Jamie Hardt
2022-11-23 18:30:50 -08:00
parent f9e5f28f7d
commit 5d4f97f6cc
5 changed files with 18 additions and 27 deletions

View File

@@ -5,23 +5,24 @@
The `wavinfo` package allows you to probe WAVE and [RF64/WAVE files][eburf64] and extract extended metadata, with an emphasis on film, video and professional music production metadata. The `wavinfo` package allows you to probe WAVE and [RF64/WAVE files][eburf64] and extract extended metadata, with an emphasis on film, video and professional music production metadata.
## Metadata Support
`wavinfo` reads: `wavinfo` reads:
* __Broadcast-WAVE__ metadata<sup>[1][ebu]</sup>, including embedded program * [__Broadcast-WAVE__][ebu] metadata, including embedded program
loudness and coding history, if extant. This also includes the SMPTE UMID<sup>[2][smpte_330m2011]</sup>. loudness and coding history and [__SMPTE UMID__][smpte_330m2011].
* __ADM__ track metadata<sup>[3][adm]</sup>, including channel, pack formats, object and content names. * [__ADM__][adm] track metadata, including channel, pack formats, object and content names.
* __iXML__ production recorder metadata<sup>[4][ixml]</sup>, including project, scene, and take tags, recorder notes * [__iXML__][ixml] production recorder metadata, including project, scene, and take tags, recorder notes
and file family information. and file family information.
* Most of the common __RIFF INFO__<sup>[5][info-tags]</sup> metadata fields. * Most of the common [__RIFF INFO__][info-tags] metadata fields.
* The __wav format__ is also parsed, so you can access the basic sample rate and channel count * The __wav format__ is also parsed, so you can access the basic sample rate and channel count
information. information.
In progress: In progress:
* [Dolby RMU][dolby] metadata and [EBU Tech 3285 Supplement 6][ebu3285s6]. * [__Dolby RMU__][dolby] metadata and [EBU Tech 3285 Supplement 6][ebu3285s6].
* iXML `STEINBERG` sound library attributes.
* __NetMix__ library attributes.
* Pro Tools __embedded regions__. * Pro Tools __embedded regions__.
* iXML `STEINBERG` sound library attributes.
[dolby]:https://developer.dolby.com/globalassets/documentation/technology/dolby_atmos_master_adm_profile_v1.0.pdf [dolby]:https://developer.dolby.com/globalassets/documentation/technology/dolby_atmos_master_adm_profile_v1.0.pdf
[ebu]:https://tech.ebu.ch/docs/tech/tech3285.pdf [ebu]:https://tech.ebu.ch/docs/tech/tech3285.pdf
@@ -32,7 +33,7 @@ In progress:
[eburf64]:https://tech.ebu.ch/docs/tech/tech3306v1_1.pdf [eburf64]:https://tech.ebu.ch/docs/tech/tech3306v1_1.pdf
[info-tags]:https://exiftool.org/TagNames/RIFF.html#Info [info-tags]:https://exiftool.org/TagNames/RIFF.html#Info
## Demonstration ## How To Use
The entry point for wavinfo is the WavInfoReader class. The entry point for wavinfo is the WavInfoReader class.
@@ -42,6 +43,9 @@ from wavinfo import WavInfoReader
path = '../tests/test_files/A101_1.WAV' path = '../tests/test_files/A101_1.WAV'
info = WavInfoReader(path) info = WavInfoReader(path)
adm_metadata = info.adm
ixml_metadata = info.ixml
``` ```
The package also installs a shell command: The package also installs a shell command:
@@ -50,17 +54,6 @@ The package also installs a shell command:
$ wavinfo test_files/A101_1.WAV $ wavinfo test_files/A101_1.WAV
``` ```
### Basic WAV Data
The length of the file in frames (interleaved samples) and bytes is available, as is the contents of the format chunk.
```python
(info.data.frame_count, info.data.byte_count)
>>> (240239, 1441434)
(info.fmt.sample_rate, info.fmt.channel_count, info.fmt.block_align, info.fmt.bits_per_sample)
>>> (48000, 2, 6, 24)
```
## Other Resources ## Other Resources
* For other file formats and ID3 decoding, look at [audio-metadata](https://github.com/thebigmunch/audio-metadata). * For other file formats and ID3 decoding, look at [audio-metadata](https://github.com/thebigmunch/audio-metadata).

View File

@@ -63,8 +63,6 @@ Result:
Class Reference Class Reference
--------------- ---------------
.. module:: wavinfo
.. autoclass:: wavinfo.wave_bext_reader.WavBextReader .. autoclass:: wavinfo.wave_bext_reader.WavBextReader
:members: :members:

View File

@@ -23,8 +23,6 @@ music library software.
Class Reference Class Reference
--------------- ---------------
.. module:: wavinfo
.. autoclass:: wavinfo.wave_info_reader.WavInfoChunkReader .. autoclass:: wavinfo.wave_info_reader.WavInfoChunkReader
:members: :members:

View File

@@ -37,8 +37,6 @@ Result:
Class Reference Class Reference
--------------- ---------------
.. module:: wavinfo
.. autoclass:: wavinfo.wave_ixml_reader.WavIXMLFormat .. autoclass:: wavinfo.wave_ixml_reader.WavIXMLFormat
:members: :members:

View File

@@ -40,6 +40,8 @@ class WavInfoReader:
The text encoding to use when decoding the string The text encoding to use when decoding the string
fields of the Broadcast-WAV extension. Per EBU 3285 this is ASCII fields of the Broadcast-WAV extension. Per EBU 3285 this is ASCII
but this parameter is available to you if you encounter a weirdo. but this parameter is available to you if you encounter a weirdo.
""" """
self.info_encoding = info_encoding self.info_encoding = info_encoding
@@ -149,6 +151,8 @@ class WavInfoReader:
:yields: a string, the :scope: of the metadatum, the string :name: of the :yields: a string, the :scope: of the metadatum, the string :name: of the
metadata field, and the value. metadata field, and the value.
""" """
scopes = ('fmt', 'data', 'ixml', 'bext', 'info') scopes = ('fmt', 'data', 'ixml', 'bext', 'info')