Page MenuHome

High pitch sound artifact on import of 48k audio
Closed, ResolvedPublic


System Information
Linux Fedora 22 (kernel 4.2.3) with NVIDIA Corporation GK107 HDMI Audio Controller, GeForce GTX 650 video card.

Blender Version
Broken: 2.76
Worked: ??

Short description of error
The default settings for Blender are to work with 44.1k sample rate audio. When importing video or audio files with 48k sample rate audio, a high pitch "whine" artifact is introduced. This artifact is subtle, but quite noticeable in quiet sections of the audio.

Exact steps for others to reproduce the error
Import the attached WAV file (or load the "48k_audio_artifact.blend" file). You must then confirm that User Preferences -> System -> Sample Rate is set to the default "44.1k". Now just play the audio.

To "fix" the problem, go to User Preferences -> System -> Sample Rate and set to "48k"

The mvi_6317.wav file was created from a video file recorded using a Canon 650d dSLR which records audio at 48k, I separated the audio to make a simpler test case for you developers, and to make the file sizes smaller. But, the problem exists identically in the original video file, which I can attach if anyone is interested, but it is 285MB.

[lapham@bilbo BlenderBug]$ ffmpeg -i mvi_6317.wav
[lapham@bilbo BlenderBug]$ ffmpeg -i mvi_6317.wav
Input #0, wav, from 'mvi_6317.wav':

  encoder         : Lavf56.25.101
Duration: 00:00:47.18, bitrate: 1536 kb/s
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 2 channels, s16, 1536 kb/s

Both the original video and audio play on all the normal video/audio apps without this high pitch sound.

I believe that the solution to this bug could be:

  1. when importing audio at a different sample rate, the user should be warned if the User Preferences -> System -> Sample Rate doesn't match.
  2. fix the conversion from 48k -> 44.1k to not have this artifact.

Thank you for your time

Event Timeline

Jon (jplap) updated the task description. (Show Details)Nov 3 2015, 6:12 PM
Jon (jplap) added a project: Audio.
Jon (jplap) set Type to Bug.
Jon (jplap) added a subscriber: Jon (jplap).
Jon (jplap) created this task.
Jon (jplap) raised the priority of this task from to Needs Triage by Developer.

On rendering a video, the audio artifact is baked into the resultant video/audio file. Now any video playing app (not just Blender) will produce the high pitch sound. See the file "mvi_6317_ARTIFACT_BAKED_IN.wav" to hear it.

I do not see any files? please upload the files

@Joerg Mueller (nexyon) mind testing this with new audio?

I would like to add a further note to this bug. One might be tempted to say that this is not a bug, because there is a solution to the problem, simple set User Preferences -> System -> Sample Rate appropriately.

However, from my experience, I noticed this bug only after producing something like 15 videos over the course of a few weeks. Because it is somewhat subtle, it really is not very apparent in videos with lots of noise (but you can hear it even then if you pay attention). I have since had to go back and redo all my previous videos. Frustrating!

I am a relatively well versed computer user and video editor (using other programs, I'm new to Blender). This is the sort of subtle bug that will drive people away from Blender. It took me 2 days of experimentation to discover what caused the bug, and find a solution.

Incidentally, I realize that I never mentioned that in addition to User Preferences -> System -> Sample Rate, one must also make sure that Properties -> Scene -> Audio -> Rate is set appropriately. Ugh.

Thanks again for your time.

I do not see any files? please upload the files
@Joerg Mueller (nexyon) mind testing this with new audio?

How do I attach files? I thought I did attach them when I created the bug report....

Aaron Carlisle (Blendify) triaged this task as Needs Information from User priority.Nov 3 2015, 6:38 PM

Drag an drop them into the comment area

The last upload seems to have become embedded in an audio player... maybe that is just Chrome's doing. Anyway, the last upload (the 3rd upload) is the high pitch noise baked into an audio file so people can hear what it sounds like playing the original audio file (mvi_6317.wav) in Blender, with Blender configured to 44.1k instead of 48k sample rate.

Joerg Mueller (nexyon) closed this task as Invalid.Nov 3 2015, 7:12 PM
Joerg Mueller (nexyon) claimed this task.


I know you don't want to hear it, but this is not a bug of Blender. xD

This high pitched frequency is present in every player I tried it with, it's a sound at about 17555 Hz, which you might or might not hear depending on your age (the older you get, the lower the frequencies you can hear).

Furtunately there is a way to find out, you can just open the file with audacity and plot the spectrum and you will get this:

So when you actually remove this frequency with a notch filter, you won't have that problem anymore:

To understand why you can "better" hear this high pitched sound in Blender is easy: Blender by default uses a very low quality resampling for playback, just simple linear interpolation. This causes an effect called aliasing: Now when you export the sound with Blender it should not have this problem as a very high quality resampler is used for the export. I tried this and when I render the audio, the file sounds the same as the original, which in my case means I can hear the high pitch in both of them equaly.

Unfortunately Blender does not support editing of audio (yet), so you will have to remove these high frequencies with another audio application.

Joerg Mueller (nexyon) reopened this task as Open.Nov 3 2015, 7:23 PM

Btw: Audio mixdown does high quality, but normal animation rendering does not, that's indeed a bug, will fix in a second!


Thanks for the response!

That peak in the original sound file (the one you showed) is just normal microphone hiss. I have seen that peak for years in recordings. If you compare the spectrum of the original sound file to the "mvi_6317ARTIFACT_BAKED_IN.avi" (the third I uploaded) you get this:

All I did to create "mvi_6317ARTIFACT_BAKED_IN.avi" was import the original sound file into Blender, set the audio (in both locations) to 44.1k, then I rendered a new video. Then I used ffmpeg to separate the audio.

See those extra peaks? That is the problem.

Wow, awesome Joerg! A bug fix so fast!

Yep, those additional peaks are the antialiasing I talked about. With the current Blender version you will have to downmix the audio and multiplex that to your video by hand.

But I still think it would be better you get rid of this microphone hiss. I don't know how old you are, but I can still hear this and I'm sure any young audience of your videos will too.


I agree, removing the hiss would make the sound even nicer. :)

Thanks a lot for fixing this.

If I understand your bug fix correctly, we will still hear the antialiasing when playing back in the sequencer, but it will be removed when rendering an output video? If my understanding is correct, then why not make the sequencer use high quality audio too?

PS: for the current Blender there is an easier fix than downmixing and multiplexing... simply change the sample rate from 44.1k to 48k in Blender (in the 2 locations I mentioned earlier) and the problem disappears!

Yes, during playback the aliasing (not antialiasing...) will be there. It will be removed when rendering output video, yes. And as I wrote in the commit log, playback uses low quality resampling because of performance.