Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cues Feature #19

Merged
merged 25 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

# wavinfo

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 Support
Expand All @@ -13,17 +15,18 @@ The `wavinfo` package allows you to probe WAVE and [RF64/WAVE files][eburf64] an

* [Broadcast-WAVE][bext] metadata, including embedded program
loudness, coding history and [SMPTE UMID][smpte_330m2011].
* [ADM][adm] track metadata and schema, including channel, pack formats, object, content and programme.
* [Audio Definition Model (ADM)][adm] track metadata and schema, including
channel, pack formats,
object, content and programme.
* [Dolby Digital Plus][ebu3285s6] and Dolby Atmos `dbmd` metadata.
* [iXML][ixml] production recorder metadata, including project, scene, and take tags, recorder notes
and file family information.
* [iXML][ixml] production recorder metadata, including project, scene, and
take tags, recorder notes and file family information.
* iXML `STEINBERG` sound library attributes.
* Wave embedded cue markers, cue marker labels, notes and timed ranges as used
by Zoom, iZotope RX, etc.
* 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
information.

In progress:
* Pro Tools __embedded regions__.
* The __wav format__ is also parsed, so you can access the basic sample rate
and channel count information.

[bext]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html
[smpte_330m2011]:https://wavinfo.readthedocs.io/en/latest/scopes/bext.html#wavinfo.wave_bext_reader.WavBextReader.umid
Expand Down Expand Up @@ -57,4 +60,5 @@ $ wavinfo test_files/A101_1.WAV

## 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).
5 changes: 4 additions & 1 deletion docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ instance of :class:`WaveInfoReader`.

adm_metadata = info.adm
ixml_metadata = info.ixml


WavInfoReader Class Documentation
--------------------------------------

.. module:: wavinfo
:noindex:

.. autoclass:: wavinfo.wave_reader.WavInfoReader
:members:
:special-members: __init__

2 changes: 1 addition & 1 deletion docs/source/references.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ iXML

RIFF Metadata
-------------
* `1991. Multimedia Programming Interface and Data Specifications 1.0<https://www.aelius.com/njh/wavemetatools/doc/riffmci.pdf>`_
* `1991. Multimedia Programming Interface and Data Specifications 1.0 <https://www.aelius.com/njh/wavemetatools/doc/riffmci.pdf>`_
* `Exiftool Documentation <https://exiftool.org/TagNames/RIFF.html#Info_docs>`_

37 changes: 24 additions & 13 deletions docs/source/scopes/bext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,43 @@ Broadcast WAV Extension Metadata

Notes
-----
A WAV file produced to Broadcast-WAV specifications will have the broadcast metadata extension,
which includes a 256-character free text descrption, creating entity identifier (usually the
recording application or equipment), the date and time of recording and a time reference for
timecode synchronization.
A WAV file produced to Broadcast-WAV specifications will have the broadcast
metadata extension, which includes a 256-character free text descrption,
creating entity identifier (usually the recording application or equipment),
the date and time of recording and a time reference for timecode
synchronization.

The :py:attr:`coding_history<wavinfo.wave_bext_reader.WavBextReader.coding_history>`
is designed to contain a record of every conversion performed on the audio file.

In this example (from a Sound Devices 702T) the bext metadata contains scene/take slating
information in the :py:attr:`description<wavinfo.wave_bext_reader.WavBextReader.description>`.
Here also the :py:attr:`originator_ref<wavinfo.wave_bext_reader.WavBextReader.originator_ref>`
In this example (from a Sound Devices 702T) the bext metadata contains
scene/take slating information in the
:py:attr:`description<wavinfo.wave_bext_reader.WavBextReader.description>`.
Here also the
:py:attr:`originator_ref<wavinfo.wave_bext_reader.WavBextReader.originator_ref>`
is a serial number conforming to EBU Rec 99.

If the bext metadata conforms to `EBU 3285 v1`_, it will contain the WAV's 32 or 64 byte `SMPTE
ST 330 UMID`_. The 32-byte version of the UMID is usually just a random number, while the 64-byte
UMID will also have information on the recording date and time, recording equipment and entity,
and geolocation data.
If the bext metadata conforms to `EBU 3285 v1`_, it will contain the WAV's 32
or 64 byte `SMPTE ST 330 UMID`_. The 32-byte version of the UMID is usually
just a random number, while the 64-byte UMID will also have information on the
recording date and time, recording equipment and entity, and geolocation data.

If the bext metadata conforms to `EBU 3285 v2`_, it will hold precomputed program loudness values
as described by `EBU Rec 128`_.
If the bext metadata conforms to `EBU 3285 v2`_, it will hold precomputed
program loudness values as described by `EBU Rec 128`_.

.. _EBU 3285 v1: https://tech.ebu.ch/publications/tech3285s1
.. _SMPTE ST 330 UMID: https://standards.globalspec.com/std/1396751/smpte-st-330
.. _EBU 3285 v2: https://tech.ebu.ch/publications/tech3285s2
.. _EBU Rec 128: https://tech.ebu.ch/publications/r128


.. note::
All text fields in the Broadcast-WAV metadata structure are decoded by
default as flat ASCII. To override this and use a different encoding, pass
an string encoding name to the ``bext_encoding`` parameter of
:py:meth:`WavInfoReader()<wavinfo.wave_reader.WavInfoReader.__init__>`


Example
-------
.. code:: python
Expand Down
31 changes: 31 additions & 0 deletions docs/source/scopes/cue.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Cue Marker and Range Metadata
------------------------------

Notes
=====

Cue metadata stores timed markers that clients use to mark times of interest
in a wave file, and optionally give them a name and longer comment. Markers
can also have an associated length, allowing ranges of times in a file to be
marked.

String Encoding of Cue Metadata
"""""""""""""""""""""""""""""""

Cue labels and notes will be decoded using the string encoding passed to
:py:meth:`WavInfoReader's<wavinfo.wave_reader.WaveInfoReader.__init__>`
``info_encoding=`` parameter, which by default is ``latin_1`` (ISO 8859-1).

Text associated with ``ltxt`` time ranges may specify their own encoding in
the form of a Windows codepage number. `wavinfo` will attempt to use the
encoding specified.

.. note::
``cset`` character set/locale metadata is not supported. If it is present
in the file it will be ignored by `wavinfo`.

Class Reference
===============

.. autoclass:: wavinfo.wave_cues_reader.WavCuesReader
:members:
18 changes: 9 additions & 9 deletions docs/source/scopes/info.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ music library software.
print("INFO Comment:", bullet.info.comment)


On Encodings
""""""""""""
According to Microsoft, the original developers of the RIFF file and RIFF INFO
metadata, these fields are always to be interpreted as ISO Latin 1 characters,
and this is the default encoding used by `wavinfo` for these fields. You can
select a different encoding (like Shift-JIS) by passing an encoding name (as
would be used by `string.encode()`) to `WavInfoReader.__init__()`'s
`info_encoding=` parameter.

String Encoding of INFO Metadata
""""""""""""""""""""""""""""""""

Info metadata fields will be decoded using the string encoding passed to
:py:meth:`WavInfoReader's<wavinfo.wave_reader.WaveInfoReader.__init__>`
``info_encoding=`` parameter, which by default is ``latin_1`` (ISO 8859-1).

.. note::
``cset`` character set/locale metadata is not supported. If it is present
in the file it will be ignored by `wavinfo`.

Class Reference
---------------
Expand Down
Loading
Loading