mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2025-12-31 08:50:41 +00:00
Documentation stuff
This commit is contained in:
@@ -17,11 +17,14 @@ instance of :class:`WaveInfoReader`.
|
|||||||
|
|
||||||
adm_metadata = info.adm
|
adm_metadata = info.adm
|
||||||
ixml_metadata = info.ixml
|
ixml_metadata = info.ixml
|
||||||
|
|
||||||
|
WavInfoReader Class Documentation
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
.. module:: wavinfo
|
.. module:: wavinfo
|
||||||
:noindex:
|
:noindex:
|
||||||
|
|
||||||
.. autoclass:: wavinfo.wave_reader.WavInfoReader
|
.. autoclass:: wavinfo.wave_reader.WavInfoReader
|
||||||
:members:
|
:members:
|
||||||
|
:special-members: __init__
|
||||||
|
|
||||||
|
|||||||
@@ -4,32 +4,43 @@ Broadcast WAV Extension Metadata
|
|||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
A WAV file produced to Broadcast-WAV specifications will have the broadcast metadata extension,
|
A WAV file produced to Broadcast-WAV specifications will have the broadcast
|
||||||
which includes a 256-character free text descrption, creating entity identifier (usually the
|
metadata extension, which includes a 256-character free text descrption,
|
||||||
recording application or equipment), the date and time of recording and a time reference for
|
creating entity identifier (usually the recording application or equipment),
|
||||||
timecode synchronization.
|
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>`
|
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.
|
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
|
In this example (from a Sound Devices 702T) the bext metadata contains
|
||||||
information in the :py:attr:`description<wavinfo.wave_bext_reader.WavBextReader.description>`.
|
scene/take slating information in the
|
||||||
Here also the :py:attr:`originator_ref<wavinfo.wave_bext_reader.WavBextReader.originator_ref>`
|
: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.
|
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
|
If the bext metadata conforms to `EBU 3285 v1`_, it will contain the WAV's 32
|
||||||
ST 330 UMID`_. The 32-byte version of the UMID is usually just a random number, while the 64-byte
|
or 64 byte `SMPTE ST 330 UMID`_. The 32-byte version of the UMID is usually
|
||||||
UMID will also have information on the recording date and time, recording equipment and entity,
|
just a random number, while the 64-byte UMID will also have information on the
|
||||||
and geolocation data.
|
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
|
If the bext metadata conforms to `EBU 3285 v2`_, it will hold precomputed
|
||||||
as described by `EBU Rec 128`_.
|
program loudness values as described by `EBU Rec 128`_.
|
||||||
|
|
||||||
.. _EBU 3285 v1: https://tech.ebu.ch/publications/tech3285s1
|
.. _EBU 3285 v1: https://tech.ebu.ch/publications/tech3285s1
|
||||||
.. _SMPTE ST 330 UMID: https://standards.globalspec.com/std/1396751/smpte-st-330
|
.. _SMPTE ST 330 UMID: https://standards.globalspec.com/std/1396751/smpte-st-330
|
||||||
.. _EBU 3285 v2: https://tech.ebu.ch/publications/tech3285s2
|
.. _EBU 3285 v2: https://tech.ebu.ch/publications/tech3285s2
|
||||||
.. _EBU Rec 128: https://tech.ebu.ch/publications/r128
|
.. _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
|
Example
|
||||||
-------
|
-------
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|||||||
@@ -9,6 +9,21 @@ 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
|
can also have an associated length, allowing ranges of times in a file to be
|
||||||
marked.
|
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
|
Class Reference
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
|||||||
@@ -20,16 +20,16 @@ music library software.
|
|||||||
print("INFO Comment:", bullet.info.comment)
|
print("INFO Comment:", bullet.info.comment)
|
||||||
|
|
||||||
|
|
||||||
On Encodings
|
String Encoding of Cue Metadata
|
||||||
""""""""""""
|
"""""""""""""""""""""""""""""""
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
|
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
|
Class Reference
|
||||||
---------------
|
---------------
|
||||||
|
|||||||
@@ -38,10 +38,8 @@ class WavInfoReader:
|
|||||||
file handle to an open file.
|
file handle to an open file.
|
||||||
|
|
||||||
:param info_encoding:
|
:param info_encoding:
|
||||||
The text encoding of the INFO, LABL and other RIFF-defined metadata
|
The text encoding of the ``INFO``, ``LABL`` and other RIFF-defined
|
||||||
fields. latin_1/ISO 8859-1/Win CP819 is the safest assumption for
|
metadata fields.
|
||||||
this; chunks that define their own encoding explicitly (like LTXT)
|
|
||||||
will override this setting.
|
|
||||||
|
|
||||||
:param bext_encoding:
|
:param bext_encoding:
|
||||||
The text encoding to use when decoding the string
|
The text encoding to use when decoding the string
|
||||||
|
|||||||
Reference in New Issue
Block a user