Render audio produces random clipping #79374

Closed
opened 2020-07-29 20:46:05 +02:00 by Lord Odin · 17 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.75

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-25 21:53, hash: 62aa103d48

Short description of error
I have a blend file with audio placed in the sequencer according to when items hitting the ground
blender_HHgYZJcZBY.png

What works:
Scrubbing / Playing in the viewport
Exporting as a video h264 mp4 with vorbis audio

What doesn't work:
Exporting as a video h264 mp4 with mp3 audio
Exporting as a video h264 mp4 with aac audio
Rendering audio mix down as vorbis
Rendering audio mix down as flac
Rendering audio mix down as mp3
image.png

audacity_QQhPy9QIEv.png

When rendering the same scene multiple times, clipping appears randomly:

random clipping from same scene.PNG

Blend File
sound_error.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.75 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-25 21:53, hash: `62aa103d48` **Short description of error** I have a blend file with audio placed in the sequencer according to when items hitting the ground ![blender_HHgYZJcZBY.png](https://archive.blender.org/developer/F8729103/blender_HHgYZJcZBY.png) What works: Scrubbing / Playing in the viewport Exporting as a video h264 mp4 with vorbis audio What doesn't work: Exporting as a video h264 mp4 with mp3 audio Exporting as a video h264 mp4 with aac audio Rendering audio mix down as vorbis Rendering audio mix down as flac Rendering audio mix down as mp3 ![image.png](https://archive.blender.org/developer/F8729138/image.png) ![audacity_QQhPy9QIEv.png](https://archive.blender.org/developer/F8729109/audacity_QQhPy9QIEv.png) When rendering the same scene multiple times, clipping appears randomly: ![random clipping from same scene.PNG](https://archive.blender.org/developer/F8733143/random_clipping_from_same_scene.PNG) **Blend File** [sound_error.blend](https://archive.blender.org/developer/F8729148/sound_error.blend)
Author

Added subscriber: @derekbarker

Added subscriber: @derekbarker

Added subscribers: @neXyon, @ChristopherAnderssarian

Added subscribers: @neXyon, @ChristopherAnderssarian

I would hazard a guess that there is a some limiter on for the vorbis video encode.

In #54418#492826, @neXyon wrote:
When the number of channels is changed, the total power (not amplitude) is kept at the same level.
...merging stereo to mono, the power of the two stereo channels is added and not averaged. This approach is volume preserving and is also what OpenAL does, though Blender doesn't use OpenAL to do this in the sequencer.

@neXyon can clarify, but I think this is working as intended...

I would hazard a guess that there is a some limiter on for the vorbis video encode. > In #54418#492826, @neXyon wrote: > When the number of channels is changed, the total power (not amplitude) is kept at the same level. >...merging stereo to mono, the power of the two stereo channels is added and not averaged. This approach is volume preserving and is also what OpenAL does, though Blender doesn't use OpenAL to do this in the sequencer. @neXyon can clarify, but I think this is working as intended...
Author

This comment was removed by @derekbarker

*This comment was removed by @derekbarker*
Author

@neXyon can clarify, but I think this is working as intended...

Id have to disagree considering its the same sound on every frame in that blend but the clipping only happens randomly a few times.
Since the frames are so even and densely packed if it was something that was meant to happen you would figure it would happen every time not randomly.

image.png

> @neXyon can clarify, but I think this is working as intended... Id have to disagree considering its the same sound on every frame in that blend but the clipping only happens randomly a few times. Since the frames are so even and densely packed if it was something that was meant to happen you would figure it would happen every time not randomly. ![image.png](https://archive.blender.org/developer/F8732733/image.png)
ChristopherAnderssarian changed title from Render audio produces horrible clipping to Render audio produces random clipping 2020-07-31 13:33:26 +02:00

Ah, my mistake, I took the "horrible clipping" to mean that the audio was unusable.

Ah, my mistake, I took the *"horrible clipping"* to mean that the audio was unusable.
Author

Here is the audio if you didn't try exporting it your self
test.flac

Here is the audio if you didn't try exporting it your self [test.flac](https://archive.blender.org/developer/F8733210/test.flac)

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

@derekbarker can you try this:
Untitled.png

@derekbarker can you try this: ![Untitled.png](https://archive.blender.org/developer/F8736661/Untitled.png)
Author

In #79374#988991, @iss wrote:
@derekbarker can you try this:
Untitled.png

32 accuracy seems to fix it. I was always upping the accuracy (Because bigger is better obviously)

Care to explain why less accuracy is better?

> In #79374#988991, @iss wrote: > @derekbarker can you try this: > ![Untitled.png](https://archive.blender.org/developer/F8736661/Untitled.png) 32 accuracy seems to fix it. I was always upping the accuracy (Because bigger is better obviously) Care to explain why less accuracy is better?

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Richard Antalik self-assigned this 2020-08-02 19:36:52 +02:00

In #79374#989215, @derekbarker wrote:

In #79374#988991, @iss wrote:
@derekbarker can you try this:
Untitled.png

32 accuracy seems to fix it. I was always upping the accuracy (Because bigger is better obviously)

Care to explain why less accuracy is better?

It says so in tooltip :)

Well I am no 100% sure. I think accuracy is measured in audio samples, probably of project sample rate. it definitely helps to lower accuracy if you use fast animations like quick fades and such.

In this case it probably renders 1024 samples to buffer and "request updates" and Blender tells it that a strip should be already playing and we are xx samples late, so it starts playing not from beginning. This is based on rough knowledge of how audio system works, so info may be inaccurate.

However this works as designed, it is not perfect, but for vast majority of use cases, this works good enough.

> In #79374#989215, @derekbarker wrote: >> In #79374#988991, @iss wrote: >> @derekbarker can you try this: >> ![Untitled.png](https://archive.blender.org/developer/F8736661/Untitled.png) > > 32 accuracy seems to fix it. I was always upping the accuracy (Because bigger is better obviously) > > Care to explain why less accuracy is better? It says so in tooltip :) Well I am no 100% sure. I think accuracy is measured in audio samples, probably of project sample rate. it definitely helps to lower accuracy if you use fast animations like quick fades and such. In this case it probably renders 1024 samples to buffer and "request updates" and Blender tells it that a strip should be already playing and we are xx samples late, so it starts playing not from beginning. This is based on rough knowledge of how audio system works, so info may be inaccurate. However this works as designed, it is not perfect, but for vast majority of use cases, this works good enough.

This issue was referenced by f9aba4f6e1

This issue was referenced by f9aba4f6e190b9411ab3cd68e9c6d90cc68eb5c7

This issue was referenced by 3593dff147

This issue was referenced by 3593dff147ae2a13c07e6338cb0d6a71218596b1
Richard Antalik was unassigned by Joerg Mueller 2020-08-03 17:41:41 +02:00
Joerg Mueller self-assigned this 2020-08-03 17:41:41 +02:00
Member

Changed status from 'Archived' to: 'Confirmed'

Changed status from 'Archived' to: 'Confirmed'
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
5 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#79374
No description provided.