简体   繁体   中英

Flash AS3 - How to set high quality audio recording

Currently, I'm using

mic.rate = 100;

This only gives 63kbps.

Is it possible for Flash AS3 to set bitrate higher than 63kbps?

From the docs

Acceptable values are 5, 8, 11, 22, and 44

So enter one of those.

And it's measured in kHz, not kbps, also according to the docs

It's flash. Great quality also depends on users' hardware. You didn't post full settings for your microphone. Also value that you are using isn't valid.

Here a small snippet, for mic settings, that will give you good enough results:

var micOptions : MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
micOptions.echoPath = 128;
micOptions.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
micOptions.nonLinearProcessing = true;
microphone.setSilenceLevel(0);
microphone.rate = 44;
microphone.enhancedOptions = micOptions;

The bit rate (kbps) depends on:

  1. the audio codec used ( NellyMoser's Asao or Speex )
  2. the Asao sample rate (mic.rate) / the Speex encode quality (mic.encodeQuality) .

NellyMoser's Asao

With Asao the sound will use from 11 to 88kbps depending on the sampling rate:

在此处输入图片说明

There's also a third factor with Nellymoser Asao:

When using the Nellymoser codec, one microphone might produce more bandwidth over against another.

Speex

With Speex the sound will use from 4 to 42kbps depending on the encoding quality (sampling rate is fixed at 16kHz with Speex):

在此处输入图片说明

From: http://audior.ec/blog/audio-quality-and-bitrate-in-flash-as3-web-apps/

These bitrates should reflect in the .flv where the audio is stored/recorded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM