Git Product home page Git Product logo

wav2bw64's Introduction

wav2bw64

A simple tool to add basic ADM metadata to a WAV file, according to EBU Production Profile and export it as BW64 file.

adm_authoring_v0 1 0-alpha2

Installation

pip install .

Usage

Command Line Usage

wav2bw64 infile.wav outfilebw64.wav adm.yaml

Web GUI Usage

Start Web server:

adm_author --host 127.0.0.1 --port 8080 

Open http://127.0.0.1:8080 in your Browser

ADM config in YAML file

Basic example structure:

- name: Audio Programme 1
  language: eng
  loudness: -23
  apItems:
  - name: Stereo Bed
    routing: [1, 2]
    type: 0+2+0
  - name: English Dialogue
    routing: [4]
    type: Object
    object_parameter:
      position: {azimuth: 0, distance: 1, elevation: 14}
    importance: 10
    interactivity:
      onOffInteract: false
      azRange: [-30, 30]
      elRange: [-30, 30]
      positionInteract: true
- name: Audio Programme 2
  language: ger
  loudness: -23
  apItems:
  - name: Stereo Bed
    routing: [1, 2]
    type: 0+2+0
    importance: 10
    interactivity:
      onOffInteract: false
      azRange: [-30, 30]
      elRange: [-30, 30]
      gainInteract: false
      gainInteractionRange: [-6, 6]
      positionInteract: false
  - name: German Dialogue
    routing: [3]
    type: Object
    importance: 10
    object_parameter:
      position: {azimuth: 0, distance: 1, elevation: 0}

This configures two audioProgrammes, one with the name "Audio Programme 1" and one with "Audio Programme 2". The first audioProgramme contains two audioObjects, one with an Object type and one with 0+2+0 DirectSpeakers type. The routing array defines the track indices for the CHNA chunk. It is possible to refer to the same track indices multiple times, as it is done in the example.

GUI Usage

The web-based authoring tool enables users to upload a WAV file (axml chunks are curently ignored) and to add ADM Metadata to it such as

  • AudioProgrammes
  • language of Audio Programmes
  • Items (DirectSpeaker & Object) for Audio Programmes depending on uploaded wav file channel count
  • Routing to wav file track indices for items
  • Interactivity options
  • Importance options
  • Object settings

The metadata can be generated by exporting the ADM structure. That will be saved in an axml chunk which is attached to a copy of the uploaded wav file, so basically a new BW64 file.

GUI Development

In production mode, the Flask server is just using a bundled Javascript and CSS which was generated using Svelte. To change the bundeled Javascript and CSS, the Svelte project needs to be build again:

Dependencies installation

cd svelte_app
npm install

Environments

Using

npm run build

will just build the Svelte project once and close, whilst

npm run dev

will start a webserver (which is actually not needed, since we are using Flask as webserver) in development mode which will rebuild the bundles on every change.

wav2bw64's People

Contributors

kickermeister avatar wernerbleisteiner avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wav2bw64's Issues

Feature Request: cpoy past & save setups

Would it be possible to save setups for one or a combination of audioprogrammes - of course without channel assignments. Also copy paste items from one audioprogramme to another?image

First Test

...Hab aus Vorsicht versucht, das in venv zu installieren (2 Versuche, da beim ersten Mal dann nur 'pip install ." statt "pip3 install". Beide Installationen gaben keine Fehlermeldungen.
Versuche dann Files zu konvertieren scheiterten aber.
Werde als Laie daraus nicht schlau.
Log anbei.
BASH-wav2bw64-install-run-test.txt.zip

  • War ich über vorsichtig? Brauche ich keine virtuelle Python Umgebung?
  • Fehlen vielleicht dependencies?

adding yams

Du weißt, ich bin noch am Lernen mit Git und so....Also verzeih, wenn ich was falsch gemacht habe.
Ich hab zwei weitere yaml erstellt:
-adm2.yaml in dem die Zuweisungen im Programm "stereo" : [7, 8] statt [1, 2] ist - entsprechend den Quellspuren im (RF64)wav. Was mich aber stutzig macht: Ich dachte Beides erzeugt dennoch identische Files. Dachte, die Zuweisung in Deinem adm.yaml würde auf die Tracks [1, 2] des wavs referieren (also die Frontstereo-Kanäle des Surround) und daher falsch sein. Ict aber nicht so. Kapier ich nicht...

-rf64-adm2prgr.yaml entspricht eher dem von mir angepeilten Use case, dass aus aus dem 5.1+2.0 RF64 zwei Audioprogramme werden.

Soweit ich es sehe, sind die beiden yams jetzt bereits in der Mainbranch. Da wollte ich sie erstmal nicht haben.
Daher habe ich eine Branch add-more-yaml erstellt.

Wie gessagt: Sorry. Du hast's mit dem Dilettanten zu zu tun....

Näheres können wir dann die Tage direkt besprechen.

Adding one (or more) wav(s) to an existing ADM?

Would it be possible to add one (or more) strictly channel-based wavs(s) to an existing ADM?
Might be useful in workflow scenarios where the creation of another format (derivate) has an ADM as prerequisite (such as IRT's nga-binaural-renderer) with it's outcome to be merged with the input at a next stage.
However: the exact same length of the files could be required as conditional.

Same seem to fit for other projected additional treatments of multi-program ADM for legacy channel-based outputs (e.g. loudness, Dialog+)

Copy/move metadata from bext_chunk to respective ADM positions

BWF/RF64 in broadcaster's archives may have crucial metadata written in their bext_chunk, such as markers, regions infos (movements in classical music) or loudness values according to EBU R128 gained during the mastering process (however, only some DAWs so support the creation and export of this and it may not everywhere be applied in workflow regulations).
As BW64 de facto abolished the bext_chunk, this metadata must not get lost during the transformation process.
It should be preserved and go into the right places within ADM.

Subject to a possible toleration of use of the bext_chunk in BW64 (which is asked for), metadata is rather to be copied than moved.

Which ADM: BS.2076-1 or BS.2076-2?

Just to make sure: which ADM version does wav2BW64 support: BS.2076-1 or BS.2076-2? (I guess the latter).
Found out that a multi-program (though channel-based only) ADM created with the present EPS does not forward the names given for audioProgrammes to MPEG-H tools (ADMInfo and EncMux - although the audio itself can get encoded).
FH IIS states, that's due to the fact EPS only works on "ADM Revision 1" (BS.2076-1).
Still have to check if wav2bw64 delivers accurate results.

wav2bw64 not working with 24bit ?

Trying to use a 24bit in the CL results in

~/wav2bw64 > wav2bw64 /Users/werner/Desktop/ITU-BS1770-Compliance-Material-ADM-TESTS/ITU-BS2217-2-ORIGINALS/24bit/42_1770Conf-24LKFS-10channel-24.wav /Users/werner/Desktop/ITU-BS1770-Compliance-Material-ADM-TESTS/ITU-BS2217-2-ORIGINALS/24bit/42_1770Conf-24LKFS-10channel-24-ADM.wav wav2bw64/4+5+0.yaml Traceback (most recent call last): File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/bin/wav2bw64", line 8, in <module> sys.exit(main()) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wav2bw64/main.py", line 14, in main adm_dict) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wav2bw64/fileio.py", line 122, in generate_bw64_file wav_info = get_wav_info(in_wav_path) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wav2bw64/fileio.py", line 32, in get_wav_info wavinfo = wavreader(path) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 66, in __init__ self.data = self._describe_data() File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 74, in _describe_data data_chunk = next(c for c in self.main_list if c.ident == b'data') File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 74, in <genexpr> data_chunk = next(c for c in self.main_list if c.ident == b'data') AttributeError: 'ListChunkDescriptor' object has no attribute 'ident'

Using GUI shows
image

reporting in terminal
ERROR:wav2bw64.flask_app.app:Exception on / [POST] Traceback (most recent call last): File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/flask/app.py", line 2077, in wsgi_app response = self.full_dispatch_request() File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/flask/app.py", line 1525, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/flask/app.py", line 1523, in full_dispatch_request rv = self.dispatch_request() File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/flask/app.py", line 1509, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wav2bw64/flask_app/app.py", line 43, in base wav_info = get_wav_info(path) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wav2bw64/fileio.py", line 32, in get_wav_info wavinfo = wavreader(path) File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 66, in __init__ self.data = self._describe_data() File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 74, in _describe_data data_chunk = next(c for c in self.main_list if c.ident == b'data') File "/Users/werner/.local/share/virtualenvs/wav2bw64-nFi1sJCm/lib/python3.7/site-packages/wavinfo/wave_reader.py", line 74, in <genexpr> data_chunk = next(c for c in self.main_list if c.ident == b'data') AttributeError: 'ListChunkDescriptor' object has no attribute 'ident'

File used
42_1770Conf-24LKFS-10channel-24.wav.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.