Back to the original question, here's my comprehension.

WAVEFORMATEXTENSIBLE is a structure defined by Microsoft:

https://github.com/MicrosoftDocs/windows-driver-docs-ddi/blob/staging/wdk-ddi-src/content/ksmedia/ns-ksmedia-waveformatextensible.md

The channel mask define 18 speaker positions (related to well known Dolby channel positions).

Note: they are also included (with different names) in a new ITU recommendation defining 54 positions: https://www.itu.int/rec/R-REC-BS.2051-3-202205-I/

This channel mask is optional for FLAC, and playing software may use this mapping information.

The Internet Draft explain that because the mask is not included in FLAC frames, streaming applications expecting the mask may fail to remap positions.

The Ogg transport layer can help: https://xiph.org/flac/ogg_mapping.html

For Ambisonics applications this mask is irrelevant.

FLAC can be used to stream Ambisonics, but because a FLAC stream can't have more than 8 channels, a transport protocol for HOA must support more than one FLAC stream (or track) to include all required channels. But then the application must synchronize the frames of all channels from different tracks, so I would not use FLAC for streaming HOA...

Examples on how to include more than one track for a TOA stream in different types of container:

ffmpeg -i channels-1-8.wav -i channels-9-16.wav -map 0 -map 1 -c:a flac -y channels-16.flac.ogg

ffmpeg -i channels-1-8.wav -i channels-9-16.wav -map 0 -map 1 -c:a flac -y channels-16.flac.mkv

ffmpeg -i channels-1-8.wav -i channels-9-16.wav -map 0 -map 1 -c:a flac -strict -2 -y channels-16.flac.mp4

I hope it makes sense.

Marc

Le 2023-04-30 à 14 h 02, Bo-Erik Sandholm a écrit :
Can someone comment on the double message i think i find in the spec?

There is a the specification of max number of channels in stream info
chapter 8.2

u(3)   | (number of channels)-1.  FLAC supports from 1 to  |
       |        | 8 channels.


In chapter 8.6.2

A WAVEFORMATEXTENSIBLE_CHANNEL_MASK field of 0x0 can be used to
    indicate that none of the audio channels of a file correlate with
    speaker positions.  This is the case when audio needs to be decoded
    into speaker positions (e.g.  Ambisonics B-format audio) or when a
    multitrack recording is contained.


.....

What does this mean?

Is it that ambisonics cannot be streamed in second or third order with flac?


In todays widebandwith internet this feels a bit too restrictive, is
it a Dolby business thing?


https://datatracker.ietf.org/doc/draft-ietf-cellar-flac/

Any information or ideas about this?

Bosse Sandholm
Ambisonics hobbyist.
_______________________________________________
Sursound mailing list
Sursound@music.vt.edu
https://mail.music.vt.edu/mailman/listinfo/sursound - unsubscribe here, edit 
account or options, view archives and so on.

Reply via email to