Preview mono audio not the same as render #58153

Open
opened 2018-11-29 18:05:51 +01:00 by ChristopherAnderssarian · 26 comments

System Information
Operating system: Windows 7
Graphics card: Vega 64

Blender Version
Broken: 2.80 Beta 43e7c5dd43 29/11/2018

Worked: 2.79b release

Short description of error

Preview playback of audio strips set to mono don't behave the same way compared to 2.79b.

2.80b renders the audio channels correctly but doesn't preview them the same way as the render.

2.79:
2.79.PNG

2.80:
2.80.PNG

Exact steps for others to reproduce the error

May require a surround speaker setup

Open:
Audio_Panning Mono.blend

Listen to the playback differences with mono checked and unchecked.

**System Information** Operating system: Windows 7 Graphics card: Vega 64 **Blender Version** Broken: 2.80 Beta 43e7c5dd434 29/11/2018 Worked: 2.79b release **Short description of error** Preview playback of audio strips set to mono don't behave the same way compared to 2.79b. 2.80b renders the audio channels correctly but doesn't preview them the same way as the render. 2.79: ![2.79.PNG](https://archive.blender.org/developer/F5860038/2.79.PNG) 2.80: ![2.80.PNG](https://archive.blender.org/developer/F5860053/2.80.PNG) **Exact steps for others to reproduce the error** May require a surround speaker setup Open: [Audio_Panning Mono.blend](https://archive.blender.org/developer/F5758021/Audio_Panning_Mono.blend) Listen to the playback differences with mono checked and unchecked.

Added subscriber: @ChristopherAnderssarian

Added subscriber: @ChristopherAnderssarian
Joerg Mueller was assigned by ChristopherAnderssarian 2018-12-06 19:18:08 +01:00

@neXyon Mind having a look?

@neXyon Mind having a look?

@neXyon Polite Nudge...

@neXyon *Polite Nudge...*
Member

Hey, what audio backend/device are you using? OpenAL? If so, does it work with SDL? What operating system are you on? Do you have an audio driver installed? If so, which one and which sound card do you have if any?

Hey, what audio backend/device are you using? OpenAL? If so, does it work with SDL? What operating system are you on? Do you have an audio driver installed? If so, which one and which sound card do you have if any?

Sorry, a complete derp on my end...

(note: My full system specs are on my profile )

Here is my audio setup:

Audio device: Realtek® ALC1150 8-Channel High Definition Audio CODEC (on-board audio)
Audio Driver Version: 6.0.1.7525

I use the default OpenAL, but I tried with SDL, but I get nothing. The animation plays, but there is no audio. (both in 2.79 and 2.80)
I disabled all enhancements / sound effects.

Sorry, a complete derp on my end... (note: My full system specs are on my [profile ](https://developer.blender.org/p/Christopher_Anderssarian/)) Here is my audio setup: | Audio device: | Realtek® ALC1150 8-Channel High Definition Audio CODEC (on-board audio) | | -- | -- | | Audio Driver Version: | 6.0.1.7525 | I use the default OpenAL, but I tried with SDL, but I get nothing. The animation plays, but there is no audio. (both in 2.79 and 2.80) I disabled all enhancements / sound effects.
Member

Hmm, SDL should work though, can you play around with the settings a bit? The sample rate 48 kHz should work fine, you can try changing the number of channels in the user preferences. Also please try setting the environment variable SDL_AUDIODRIVER to dsound or waveout and check if that helps to get SDL to work. See https://sdl.beuc.net/sdl.wiki/SDL_envvars#head-9ae11b2daf93dc3706eccf15cbf26eb6235ac634

Hmm, SDL should work though, can you play around with the settings a bit? The sample rate 48 kHz should work fine, you can try changing the number of channels in the user preferences. Also please try setting the environment variable SDL_AUDIODRIVER to dsound or waveout and check if that helps to get SDL to work. See https://sdl.beuc.net/sdl.wiki/SDL_envvars#head-9ae11b2daf93dc3706eccf15cbf26eb6235ac634
Member

Please also try a 2.79 version from the build bot here: https://builder.blender.org/download/

I suspect that the problem with OpenAL is caused by a library update and thus should exists there as well. The precise change in OpenAL soft that I'm suspecting is here: de51ba088e - it basically removes the front speaker from the 5.1 setup and that causes the audio rendering to differ between playback and output.

Please also try a 2.79 version from the build bot here: https://builder.blender.org/download/ I suspect that the problem with OpenAL is caused by a library update and thus should exists there as well. The precise change in OpenAL soft that I'm suspecting is here: https://github.com/kcat/openal-soft/commit/de51ba088e03627cdfe9ec4485f617bb68594704 - it basically removes the front speaker from the 5.1 setup and that causes the audio rendering to differ between playback and output.
Member

Finally, if you can confirm that this change in OpenAL soft is the cause, there's one thing you can do to get the same output in playback as in rendering. You have to create an openal soft configuration file named $HOME/.alsoftrc and have the following content:

[decoder]
surround51 = <<FILE>>

(see https:*raw.githubusercontent.com/kcat/openal-soft/master/alsoftrc.sample) and for <<FILE>> you have to fill in the filename where you downloaded this file: https:*raw.githubusercontent.com/kcat/openal-soft/master/presets/itu5.1.ambdec

This should bring back the configuration before the library update.

Finally, if you can confirm that this change in OpenAL soft is the cause, there's one thing you can do to get the same output in playback as in rendering. You have to create an openal soft configuration file named $HOME/.alsoftrc and have the following content: ``` [decoder] surround51 = <<FILE>> ``` (see https:*raw.githubusercontent.com/kcat/openal-soft/master/alsoftrc.sample) and for `<<FILE>>` you have to fill in the filename where you downloaded this file: https:*raw.githubusercontent.com/kcat/openal-soft/master/presets/itu5.1.ambdec This should bring back the configuration before the library update.

Yep, I'm getting the same result with daily build: 2.79 Windows 64 bit December 29, 01:50:18 -111179beb0b1-.
I also confirmed this is happening in Linux (the nono audio not behaving in the same way as 2.79).
I'm still having trouble getting SDL to work. I've spun up an old Debian VM (with 2.80 Beta -266b1e2cdbc1-) with no drivers manually installed and Blender crashed upon switching to SDL.
Do audio drivers need to installed for this to work?

Yep, I'm getting the same result with daily build: 2.79 Windows 64 bit December 29, 01:50:18 -111179beb0b1-. I also confirmed this is happening in Linux (the nono audio not behaving in the same way as 2.79). I'm still having trouble getting SDL to work. I've spun up an old Debian VM (with 2.80 Beta -266b1e2cdbc1-) with no drivers manually installed and Blender crashed upon switching to SDL. Do audio drivers need to installed for this to work?

Okay, okay... so....
I've got 8 channels (speakers) so I just leave the sound preferences at 7.1 and adjust the scene audio to the project's need (as you know from #49241#489952) will the configuration you suggest work for 7.1?
And will the panning stay the same as in 2.79?
Mono Panning.PNG

At what point does this become a Blender issue? I assume the way Blender handles mono audio panning is unique.

Okay, okay... so.... I've got 8 channels (speakers) so I just leave the sound preferences at 7.1 and adjust the scene audio to the project's need (as you know from #49241#489952) will the configuration you suggest work for 7.1? And will the panning stay the same as in 2.79? ![Mono Panning.PNG](https://archive.blender.org/developer/F2277034/Mono_Panning.PNG) At what point does this become a Blender issue? I assume the way Blender handles mono audio panning is unique.

More testing...

Capture.PNG
This is a simple switch from mono checked to unchecked.
Left is the 2.79 release, right is the latest builds.

Surround.PNG
This is a Surround Pan left is the latest builds, right is the 2.79 release.
There is a lot of leaking between the channels

More testing... ![Capture.PNG](https://archive.blender.org/developer/F6121717/Capture.PNG) This is a simple switch from mono checked to unchecked. Left is the 2.79 release, right is the latest builds. ![Surround.PNG](https://archive.blender.org/developer/F6121720/Surround.PNG) This is a Surround Pan left is the latest builds, right is the 2.79 release. There is a lot of leaking between the channels
Member

So my suspicion seems to be correct. The difference in playback is cause by the changes in OpenAL soft which now uses ambisonics (https:*en.wikipedia.org/wiki/Ambisonics) based surround sound. Originally, I implemented Blender's speaker mapping based on OpenAL soft. That's why so far they have been the same. Ambisonics is actually better and ideally Blender would also go this direction for 3D sound. Unfortunately, I don't have the resources for this development right now, it's more a long term goal. If you need an short term solution, please use the configuration files as I have mentioned them. There are also ambdec files for different speaker setups including 7.1 here: https:*github.com/kcat/openal-soft/tree/master/presets.

So my suspicion seems to be correct. The difference in playback is cause by the changes in OpenAL soft which now uses ambisonics (https:*en.wikipedia.org/wiki/Ambisonics) based surround sound. Originally, I implemented Blender's speaker mapping based on OpenAL soft. That's why so far they have been the same. Ambisonics is actually better and ideally Blender would also go this direction for 3D sound. Unfortunately, I don't have the resources for this development right now, it's more a long term goal. If you need an short term solution, please use the configuration files as I have mentioned them. There are also ambdec files for different speaker setups including 7.1 here: https:*github.com/kcat/openal-soft/tree/master/presets.

No worries, it's a relatively minor inconvenience and does not affect the final render (or mixdown).

No worries, it's a relatively minor inconvenience and does not affect the final render (or mixdown).

Added subscriber: @iss

Added subscriber: @iss

Is this still an issue?
If yes, Should I keep VSE tag?
I am trying to cleanup workboard a bit..

Is this still an issue? If yes, Should I keep VSE tag? I am trying to cleanup workboard a bit..

Yes, this is still an issue. It's a minor inconvenience for me, but others may find it a blocker in their work flow.

@iss Out of curiosity, are going to categorize tasks like in #bf_blender_2.8 ([here ]]) or #code_quest ([ https:*developer.blender.org/project/board/80/?hidden=true | here )?
You can further categorize them by when they should be implemented or by specific areas or by both.
Feels to me wasted functionality of phab, but I thought I'd let you know/decide :)

Yes, this is still an issue. It's a minor inconvenience for me, but others may find it a blocker in their work flow. @iss Out of curiosity, are going to categorize tasks like in #bf_blender_2.8 ([here ]]) or #code_quest ([[ https:*developer.blender.org/project/board/80/?hidden=true | here ](https:*developer.blender.org/project/board/74/?hidden=true))? You can further categorize them by when they should be implemented or by specific areas or by both. Feels to me wasted functionality of phab, but I thought I'd let you know/decide :)

Right now I am focusing on bugs.
If there is VSE bug not tagged, I guess other devs will relay this to me If I don't catch it.

I can/should look at approved design decisions made in code quest, but now bugs are the priority.

Right now I am focusing on bugs. If there is VSE bug not tagged, I guess other devs will relay this to me If I don't catch it. I can/should look at approved design decisions made in code quest, but now bugs are the priority.
Member

@ChristopherAnderssarian have you tried the speaker setup configuration files as I mentioned?

@ChristopherAnderssarian have you tried the speaker setup configuration files as I mentioned?

Been a while since this project (and I haven't had this use case recently) But I think 3D7.1.ambdec showed something promising...
I remember I ended up sticking to 2.79b for the completion of the project, for various other reasons...
Currently I can't do much testing, not sure though if @iss can confirm the config files fix the issue in current master.

Been a while since this project (and I haven't had this use case recently) But I think 3D7.1.ambdec showed something promising... I remember I ended up sticking to 2.79b for the completion of the project, for various other reasons... Currently I can't do much testing, not sure though if @iss can confirm the config files fix the issue in current master.
Joerg Mueller was unassigned by Dalai Felinto 2019-12-23 16:35:48 +01:00

Added subscriber: @neXyon

Added subscriber: @neXyon

I looked into this:

First I tested file by playing in VLC - OK

No audio with SDL, havent tried workaround.

With openAL it indeed seems that FC channel gets no signal
With mono checkbox enabled, I get signal on FL and FC, but also on BL and BR, just -30dB lower than front.
Signal from FL gets in various attenuation levels to FR, BR and FLC. Similar goes for FR.
When I set 'audio device' channels to 5.1 surround, I still get signal on 7 channels.

I have this error on startup:
AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map

I created .alsoftrc file with content

[decoder]
surround51 = C:\Users\John\itu5.1.ambdec
surround71 = C:\Users\John\3D7.1.ambdec

Downloaded .ambdec files to specified path. No change in output levels.
Would be good if I could confirm, that files has been read, so I put string sdfsdfsdf at the beginning of file - no errors or anything.
Perhaps I should place this .alsoftrc file elswhere? Should I put something in PATH?

Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec.

I looked into this: First I tested file by playing in VLC - OK No audio with SDL, havent tried workaround. With openAL it indeed seems that FC channel gets no signal With mono checkbox enabled, I get signal on FL and FC, but also on BL and BR, just -30dB lower than front. Signal from FL gets in various attenuation levels to FR, BR and FLC. Similar goes for FR. When I set 'audio device' channels to 5.1 surround, I still get signal on 7 channels. I have this error on startup: `AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map` I created `.alsoftrc` file with content ``` [decoder] surround51 = C:\Users\John\itu5.1.ambdec surround71 = C:\Users\John\3D7.1.ambdec ``` Downloaded .ambdec files to specified path. No change in output levels. Would be good if I could confirm, that files has been read, so I put string `sdfsdfsdf` at the beginning of file - no errors or anything. Perhaps I should place this `.alsoftrc` file elswhere? Should I put something in PATH? Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec.

When I am here, I may as well do the thing..

When I am here, I may as well do the thing..

In #58153#861447, @iss wrote:
No audio with SDL, haven't tried workaround.

I'd love to hear what this does, I haven't ever got this to work either...

When I set 'audio device' channels to 5.1 surround, I still get signal on 7 channels.

This might be the audio driver spreading the audio around, it happens for me too.

Perhaps I should place this .alsoftrc file elswhere? Should I put something in PATH?

This is what confused me as well. In alsoftrc.sample it says this:

- The system-wide settings can be put in /etc/openal/alsoft.conf and user-
- specific override settings in $HOME/.alsoftrc.
# For Windows, these settings should go into $AppData\alsoft.ini

I read this to mean: Linux users do the first two lines, Windows users only line three concerns you.
Are Windows users supposed to just copy-and-paste the contents of surround71 into an .ini file?

Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec.

Audio in Blender is fun.
This comment explains a bit though...

> In #58153#861447, @iss wrote: > No audio with SDL, haven't tried workaround. I'd love to hear what this does, I haven't ever got this to work either... > When I set 'audio device' channels to 5.1 surround, I still get signal on 7 channels. This might be the audio driver spreading the audio around, it happens for me too. > Perhaps I should place this `.alsoftrc` file elswhere? Should I put something in PATH? This is what confused me as well. In [alsoftrc.sample ](https://raw.githubusercontent.com/kcat/openal-soft/master/alsoftrc.sample) it says this: ``` - The system-wide settings can be put in /etc/openal/alsoft.conf and user- - specific override settings in $HOME/.alsoftrc. # For Windows, these settings should go into $AppData\alsoft.ini ``` I read this to mean: Linux users do the first two lines, Windows users only line three concerns you. Are Windows users supposed to just copy-and-paste the contents of `surround71` into an .ini file? > Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec. Audio in Blender is fun. [This](https://developer.blender.org/T49241#489952) comment explains a bit though...
Member

In #58153#861447, @iss wrote:
No audio with SDL, havent tried workaround.

Please have a closer look into this one! Maybe an SDL version upgrade makes it work again. Or you may try setting the SDL_AUDIODRIVER environment variable: https://wiki.libsdl.org/FAQUsingSDL#Win32-1

I created .alsoftrc file with content

[decoder]
surround51 = C:\Users\John\itu5.1.ambdec
surround71 = C:\Users\John\3D7.1.ambdec

Downloaded .ambdec files to specified path. No change in output levels.
Would be good if I could confirm, that files has been read, so I put string sdfsdfsdf at the beginning of file - no errors or anything.
Perhaps I should place this .alsoftrc file elswhere? Should I put something in PATH?

Where did you put the .alsoftrc file in the first place? As @ChristopherAnderssarian wrote, the docs state, that the file has to be in the %APPDATA% directory (you can input that directly into the address bar of the file explorer.

Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec.

You can set the channels in the Properties -> Scene Properties -> Audio -> Audio Channels

> In #58153#861447, @iss wrote: > No audio with SDL, havent tried workaround. Please have a closer look into this one! Maybe an SDL version upgrade makes it work again. Or you may try setting the `SDL_AUDIODRIVER` environment variable: https://wiki.libsdl.org/FAQUsingSDL#Win32-1 > I created `.alsoftrc` file with content > ``` > [decoder] > surround51 = C:\Users\John\itu5.1.ambdec > surround71 = C:\Users\John\3D7.1.ambdec > ``` > > Downloaded .ambdec files to specified path. No change in output levels. > Would be good if I could confirm, that files has been read, so I put string `sdfsdfsdf` at the beginning of file - no errors or anything. > Perhaps I should place this `.alsoftrc` file elswhere? Should I put something in PATH? Where did you put the `.alsoftrc` file in the first place? As @ChristopherAnderssarian wrote, the docs state, that the file has to be in the `%APPDATA%` directory (you can input that directly into the address bar of the file explorer. > Finally I have no idea how to render multichannel audio output - I got only 2 channels when I did mixdown audio and used wav as codec. You can set the channels in the Properties -> Scene Properties -> Audio -> Audio Channels

After setting scene audio to 7.1ch I got correct render.

I haven't read that far in the .alsoftrc example.. So now I put it in %APPDATA% as alsoft.conf.
There is no error AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map in console after restarting blender, so seems that file was read.
I confirm by putting in rubbish and get AL lib: (EE) LoadConfigFromFile: config parse error: malformed option line: "sdfsdasdgadsgf"

I get some signal on FC channel, but playback is still not same as render. There seems to be some cross-mixing.

I would give example, but I don't have setup to record 8ch audio. Perahps OBS can do this, will check.

After setting scene audio to 7.1ch I got correct render. I haven't read that far in the .alsoftrc example.. So now I put it in `%APPDATA%` as `alsoft.conf`. There is no error `AL lib: (EE) SetChannelMap: Failed to match front-center channel (2) in channel map` in console after restarting blender, so seems that file was read. I confirm by putting in rubbish and get `AL lib: (EE) LoadConfigFromFile: config parse error: malformed option line: "sdfsdasdgadsgf"` I get some signal on FC channel, but playback is still not same as render. There seems to be some cross-mixing. I would give example, but I don't have setup to record 8ch audio. Perahps OBS can do this, will check.
Member

Okay, I had a close look at those configuration files and how they work. It's impossible to get the old behavior of OpenAL Soft from before the introduction of ambisonics. So there's nothing we can do unfortunately to make them work the same.

SDL would give the same output and rendering though, so it would be nice to get that to work!

Okay, I had a close look at those configuration files and how they work. It's impossible to get the old behavior of OpenAL Soft from before the introduction of ambisonics. So there's nothing we can do unfortunately to make them work the same. SDL would give the same output and rendering though, so it would be nice to get that to work!
Philipp Oeser removed the
Interest
VFX & Video
label 2023-02-10 09:32:14 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:59 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#58153
No description provided.