Expand my Community achievements bar.

SOLVED

Audio Quality

Avatar

Level 2

Hey folks,

We've got a client who is looking for better audio quality than we've previously been able to get out of LCCS. Looking into it a bit, it looks like the Flash microphone class has two main quality settings: encodeQuality and rate. The MicrophoneManager allows you to set the encodeQuality (although it seems to default to the max: 10 (~42kbps)) but not the sampling rate, which defaults to something like 8 or 11 kHz. Is there a reason for this? Would it be a particularly bad idea to up the sampling rate on the mic manually if we'd like to improve audio quality?

Also, in the Flash Microphone class documentation (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Microphone.html) it looks like the rate can be set to 5, 8, 11, 22, 44 kHz. Another article I found on audio capture (http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7d1d.html) seems to suggest that those settings are available with the Nellymoser codec only, and that the SPEEX codec, which is recommended for LCCS, can only do 16 kHz sampling. Was wondering if that article might not be a bit outdated and if we might not be able to set the rate to something higher (the wikipedia entry on SPEEX seems to suggest that it can handle 32 kHz).

Our client was hoping for relatively high grade audio quality - I believe he wanted, in an ideal world, something like 44kHz sampling frequency and 96kbps bitrate. I don't know if these values are possible, but I'd hope that we can improve the audio quality to some degree.

Do you have any suggestions on how to produce higher quality audio from LCCS? Are there any other factors in the audio quality that I'm neglecting? Any help would be greatly appreciated.

Thanks,
Davis

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Hi Josh,

Sorry, only Speex and Nellymoser are supported for live encoding. With Player 11, g.711 is also included, but this also uses phone-like voice compression (eliminating a lot of frequencies). Essentially, the live microphone for the Flash Player is optimized for voice rather than live music streaming.

nigel

View solution in original post

9 Replies

Avatar

Former Community Member

Hi there,

Have you tried using the NellyMoser codec, rather than Speex? AFAIK, there's no way to get Speex to change its frequency range - some folks have found NellyMoser to be better for their specific case (Speex is really meant to encode human speech rather than music).

  You're actually welcome to use the Microphone class rather than Microphone manager to change settings we don't expose. I don't think changing the sample rate would have a negative impact (just more bandwidth).

  nigel

Avatar

Level 3

Hi Nigel,

As I mentioned in another forum, for me NellyMoser is a better codec than Speex, better quality, more crisp and more clear.

But I have a few problems to solve with the audioPublisher and the Nellymoser codec. Periodically, when a new user enters or leaves a room I have to reapply the codec as follows:

if (audioPub.microphone.codec.toLocaleLowerCase()=="speex" && myCodec=="nellymoser") {audioPub.microphone.codec=myCodec;audioPub.microphone.setSilenceLevel(0);}


There is a stability problem with LCCS and this codec and I can not understand where this problem.

Also, why the silencelevel (Nellymoser not Speex) is set to 10 by default in audioPubliser.as ? : MicrophoneManager.getInstance().selectedMic.setSilenceLevel(10) ;

Bernard

Avatar

Former Community Member

Thanks for the feedback Bernard – it’s possible that the client SDK is trying to be “too smart” here and re-applying settings on the fly. There was a bug in a prior Flash Player version that we’re working around – setting the silence level to something other than 0 for Speex was leading to dropped audio.

But I’m still not sure I understand how or when you’re reapplying the codec here – I don’t see anything other than the silence level. Could you describe in more detail the frequency of the problem, and how you’re solving it?

thanks as always – feedback like this is really helpful.

nigel

Avatar

Level 3

like this....

                    private var audioCodec:String="Nellymoser";

                    ....

                    private function onTimerComplete(p_evt:TimerEvent):void

                              {

                                        activityTimer.start();

                                        if ( audioPub.isPublishing && !audioPub.isPaused ) {

                                                  if (audioPub.microphone.codec.toLocaleLowerCase()=="speex" && myCodec=="Nellymoser") {audioPub.microphone.codec=myCodec;audioPub.microphone.setSilenceLevel(0,666666);}

                    blablabla....

Even if I apply the codec this way:  <rtc:AudioPublisher id="audioPub" codec="Nellymoser"

when a new user enters or leaves the room the audioPub.codec switch to Speex. To correct this, I can reapply the codec and also setSilencelevel but the audio stream will be stopped for 1 or 2 sec.

Avatar

Level 2

Sidebar: we tried using Nellymoser and our client said it was worse. Anything in particular that we need to be on the lookout for in terms of leveraging Nellymoser to improve our audio quality?

unicorn tears ->

Avatar

Level 2

Are we able to use codecs other than Speex and Nellymoser (e.g. Ogg)?

Avatar

Level 2

Trying to make sense of...

http://kb2.adobe.com/cps/402/kb402866.html
and

"Flash Player also supports ADPCM, HE-AAC, MP3, and Nellymoser."

Is there a way to get mp3 quality on the input side (e.g. from MicrophoneManager)

Relevant post from @davisballen

http://forums.adobe.com/message/2052912

Avatar

Correct answer by
Former Community Member

Hi Josh,

Sorry, only Speex and Nellymoser are supported for live encoding. With Player 11, g.711 is also included, but this also uses phone-like voice compression (eliminating a lot of frequencies). Essentially, the live microphone for the Flash Player is optimized for voice rather than live music streaming.

nigel

Avatar

Level 2

Hi Nigel,

Thanks for the definitive answer. We'll look into how to squeeze the best audio out of those codecs.

Is there any chance that LCCS will include support for higher quality audio or other media encoding + streaming in the future? (as mentioned in this post: http://forums.adobe.com/message/3280885#3280885)

Thanks,

Davis

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----