How to utilize webrtc diagnostic audio recording (audio.aecdump) ?

4,049 views
Skip to first unread message

Ömer Furkan Tercan

unread,
Sep 30, 2014, 7:51:23 AM9/30/14
to discuss...@googlegroups.com
Hello,

How can I debug the audio dump files that are recorded by webrtc voiceengine? 

The audio.aecdump files that I can easily get from chrome://webrtc-internals contains the audio played out from the speaker and recorded from the microphone. That is what we need to start analyzing AEC performance using e.g. matlab or R. 

But what is the format of the audio.eacdump file? It is not a normal audio file. How can I read the record, extract far-end signal and microphone signal? 

I would like to plot the signals, apply modified filters and analyze their effect?

Thanks,
Furkan
Message has been deleted

Ömer Furkan Tercan

unread,
Oct 1, 2014, 4:36:21 AM10/1/14
to discuss...@googlegroups.com
After having a look at related source code, I understand that audio.aecdump is an encoded protobuf file. 
But I still don't know how to decode it. Do I need a .proto file? I tried decoding it with the following .proto file but couldn't make it work

Daniel Pañeda

unread,
Oct 2, 2014, 6:08:24 AM10/2/14
to discuss...@googlegroups.com
You need to use unpack_aecdump, it should be on out/Debug or out/Release if you compile all the targets.

I just discover this and I also have some doubts about it. The unpack usually writes three files:

input.wav
reverse.wav
ref_out.wav

Can someone explain what are this files? I only understand the input one..

Ömer Furkan Tercan

unread,
Oct 3, 2014, 10:16:18 AM10/3/14
to discuss...@googlegroups.com
Hello,

Thank you for your tip! But couldn't find unpack_aecdump anywhere. This is how my out/Debug looks after compiling all targets:
drwxrwxr-x 2         4096 Oct  3 16:43 apks
-rw-rw-r-- 1     2508286 Oct  3 16:57 AppRTCDemo-debug.apk
-rw-rw-r-- 1        34766 Oct  3 16:42 build.ninja
-rwxrwxr-x 1      1647616 Oct  3 16:49 bwe_rtp_play
-rwxrwxr-x 1      1680652 Oct  3 16:49 bwe_rtp_to_text
drwxrwxr-x 8         4096 Oct  3 16:48 gen
-rw-rw-r-- 2      6053808 Sep 29 13:11 icudtl.dat
drwxrwxr-x 2         4096 Oct  3 16:46 lib.java
-rwxrwxr-x 1     67785800 Oct  3 16:56 libjingle_media_unittest
-rwxrwxr-x 1     82425360 Oct  3 16:54 libjingle_p2p_unittest
-rw-rw-r-- 1        79442 Oct  3 16:57 libjingle_peerconnection.jar
-rwxrwxr-x 1     75709052 Oct  3 16:57 libjingle_peerconnection_so.so
-rw-rw-r-- 1        40202 Oct  3 16:57 libjingle_peerconnection_so.so.TOC
-rwxrwxr-x 1     99486100 Oct  3 16:57 libjingle_peerconnection_unittest
-rwxrwxr-x 1     17069216 Oct  3 16:49 libjingle_unittest
-rwxrwxr-x 1      1363484 Oct  3 16:50 libopensl-demo-jni.so
-rw-rw-r-- 1        32250 Oct  3 16:50 libopensl-demo-jni.so.TOC
-rwxrwxr-x 1        25372 Oct  3 16:43 libvpx_obj_int_extract
-rwxrwxr-x 1     27936908 Oct  3 16:50 libwebrtcdemo-jni.so
-rw-rw-r-- 1        41696 Oct  3 16:50 libwebrtcdemo-jni.so.TOC
-rw-rw-r-- 1      1310502 Oct  3 16:46 libyuv.a
-rw-rw-r-- 1       122766 Oct  3 16:44 libyuv_neon.a
-rwxrwxr-x 1     10368196 Oct  3 16:56 login
-rw-rw-r-- 1       660756 Oct  3 16:57 .ninja_deps
-rw-rw-r-- 1       228345 Oct  3 16:57 .ninja_log
drwxrwxr-x 6         4096 Oct  3 16:57 obj
drwxrwxr-x 3         4096 Oct  3 16:42 obj.host
-rw-rw-r-- 1       153651 Oct  3 16:54 OpenSlDemo-debug.apk
-rwxrwxr-x 1       823456 Oct  3 16:48 peerconnection_server
-rwxrwxr-x 1     12942701 Oct  3 16:46 protoc
drwxrwxr-x 3         4096 Oct  3 16:48 pyproto
-rwxrwxr-x 1      5255340 Oct  3 16:57 relayserver
-rwxrwxr-x 1      3877736 Oct  3 16:55 stunserver
drwxrwxr-x 2         4096 Oct  3 16:43 test.lib.java
-rwxrwxr-x 1      9809364 Oct  3 16:56 turnserver
-rw-rw-r-- 1      1289869 Oct  3 16:54 WebRTCDemo-debug.apk

Vikas

unread,
Oct 3, 2014, 6:28:01 PM10/3/14
to discuss...@googlegroups.com
Hi,

That's right you can use the unpack_aecdump to unpack the AEC debug dumps. 

Unpacking results:
  • reverse.pcm: the received audio from the network, bound for rendering.
  • input.pcm: the captured audio, before audio processing.
  • ref_out.pcm: the captured audio, after audio processing, bound for the network.
Typically The pcm files are 16-bit linear, and usually mono with a 16 kHz sampling rate, but check settings.txt which might be created when using the unpack utility. The files can then be opened in any audio editor for analysis.

/Vikas

Daniel Pañeda

unread,
Oct 4, 2014, 3:03:01 PM10/4/14
to discuss...@googlegroups.com
Thanks Vikas for the clarification, the names were a little cryptic.

Ömer, I don't know why is not generating the unpack on your compilation, maybe some missconfiguration of the GYP_DEFINES variable? 
Try cleaning the output folder, recreating the ninja files with gclient runhooks and compile all the targets again.

Ömer Furkan Tercan

unread,
Oct 6, 2014, 7:24:54 AM10/6/14
to discuss...@googlegroups.com
Thanks Daniel & Vikas. I only left "enable_tracing=1 OS=android" in the GYP_DEFINES and it works!

Thomhert Siadari

unread,
Aug 20, 2015, 7:21:38 AM8/20/15
to discuss-webrtc
Hi,
Your explanation about these three files is very helpful. However, what does ref_out exactly mean? I extracted these three files however I didn't hear any sound when I played it?
My scenario was referred from this: I record audio from UserB.
  • For echo issues, please try to capture an audio recording from the side that is generating the echo, not the side that hears the echo. For example if UserA and UserB are in a call, and UserA hears herself speak, please obtain an audio recording from UserB.

Thank you.
Thomhert
ref_out.wav

Andrew MacDonald

unread,
Aug 20, 2015, 12:14:29 PM8/20/15
to discuss-webrtc
Short for "reference out". As Vikas wrote, it's the captured audio, after audio processing, which will be sent to User A. If it's silence, input.wav should be as well and it likely means there's an issue with the microphone.

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/4876ad59-6d0d-4f67-8ce9-935fe31875f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomhert Siadari

unread,
Sep 4, 2015, 4:20:38 AM9/4/15
to discuss-webrtc
Hi Andrew,
Thank you for your explanation. I did more tests to record the audio. It worked well.
Anyway, is it right if I assume reference_out.wav is echo signal + User B signal? Let's say if there is no one speaking on UserB (which means signal = 0), ref_out can be assumed as echo signal only.
Then, I compare reverse.wav and ref_out.wav using a certain software to measure echo canceler performance but somehow the result is not correct. Any idea how to measure webRTC echo canceler performance? Because I checked on out\Debug folder of webrtc project but couldn't find any related application.

Regards,
Thomhert  

Thomhert Siadari

unread,
Dec 12, 2015, 1:16:01 AM12/12/15
to discuss-webrtc
Dear All,
I tried recording audio test using on chrome://webrtc-internals/ on Chromium Version 48.0.2560.0 but the output is different from previous version (I still have v.46 though).
Based on chromium explanation, it consisted of two files (which are different from v.46). I tried extracting it using unpack_aecdump but failed. Do you know how to analyze these files?

BR,
Thomhert

Reply all
Reply to author
Forward
0 new messages