Copy link to clipboard
Copied
I am trying to playback streaming mp3 stereo audio as a live stream while using echo cancellation features of the enhancedMicrophone.
The mp3 stereo stream is a server-side modified stream of conference participants' audio input. It is routed through AMS. The codec can be modified.
Each participant's audio is generated using the available features of the Flash client and transmitted via NetStream.
The goal is to enable echo cancellation on each of the clients.
Using a normal microphone works, but no echo cancellation.
Setting the mp3 netstream bufferTime > 0 provides great playback, but no echo cancellation of the stereo audio stream.
Any other suggestions?
I would be excited to have access to the client's raw microphone data prior to shipping it via the netstream as it would allow me to enable my own AEC algorithms.
Thanks!
Sam
Copy link to clipboard
Copied
Try using something like this on the client side.
Copy link to clipboard
Copied
The microphone code is very similar to what you have posted. I can successfully use the enhanced microphone. When it is enabled, the issue I am having is exhibited.
A simple test I am using:
Use ffmpeg to stream a stereo mp3 file to the media server. I am using the following ffmpeg command line:
ffmpeg -re -i ~/alone.mp3 -vn -acodec copy -ac 2 -f flv rtmp://myserver.com:1935/video/3Daudio/alone
In this case the file is encoded at 44.1 kHz.
The client uses a netstream to play with bufferTime = 0
Without the microphone, the playback is as expected. With a normal microphone, not the enhanced microphone, the playback is as expected but there is little to no echo cancellation.
When the enhanced microphone is enabled, again using similar code to your post, the mp3 playback becomes severely distorted and is unacceptable.
In my opinion, this is an issue with the AEC algorithms of the enhancedMicrophone and stereo playback of a 'live' stream. If I modify the client playback code to bufferTime > 0, the mp3 playback is normal but there is no echo cancellation.
Thanks,
Sam
Copy link to clipboard
Copied
OK got it.
Maybe lower the gain level to 30 or 40 and see if the audio distortion is less.
That may help but it may be a flashplayer issue as you said.
Good Luck.