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

Enabling Ambisonic Encoding #74

Open
MandyJCho opened this issue Feb 6, 2023 · 1 comment
Open

Enabling Ambisonic Encoding #74

MandyJCho opened this issue Feb 6, 2023 · 1 comment

Comments

@MandyJCho
Copy link

MandyJCho commented Feb 6, 2023

Hi there,

I was following this thread about the --enable-ambisonic flag. Are there instructions to enable the ambisonic API with the opusenc cli? The documentation for 1.3 mentions support for channel mapping families 2 and 3, but it's unclear where I can configure this.

Right now the layout is being set to quad rather than 'ambisonic 1'

Input #0, ogg, from '.\ambisonic_opusenc.opus':
  Duration: 00:00:29.04, start: 0.000000, bitrate: 185 kb/s
  Stream #0:0: Audio: opus, 48000 Hz, quad, fltp
    Metadata:
      ENCODER         : opusenc from opus-tools 0.2-3-gf5f571b

Here's an output using ffmpeg to transcode audio:

Input #0, ogg, from '.\ambisonic_ffmpeg_2.opus':
  Duration: 00:00:29.04, start: 0.000000, bitrate: 113 kb/s
  Stream #0:0: Audio: opus, 48000 Hz, ambisonic 1, fltp
    Metadata:
      encoder         : Lavc59.51.100 libopus
@Artoria2e5
Copy link

Could be --channels ambix per

The "ambix" option indicates that the input is ambisonics using ACN channel

family 2 (matrix) is the default and I am not seeing any place to change it. well, multi-mono is probably much worse anyways.

opus-tools/src/opusenc.c

Lines 901 to 906 in ecd50e5

if (inopt.channels_format==CHANNELS_FORMAT_AMBIX) {
validate_ambisonics_channel_count(chan);
/*Use channel mapping 3 for orders {1, 2, 3} with 4 to 18 channels
(including the non-diegetic stereo track). For other orders with no
demixing matrices currently available, use channel mapping 2.*/
mapping_family=(chan>=4&&chan<=18)?3:2;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants