# webrtc sound recording in FreeBSD



## nekoexmachina (Jun 11, 2018)

Hello!

I've a problem with webrtc sound services in Google Chromium browser on FreeBSD.
Sound just doesn't function properly: playing sound works, but then, recording sound does not. I've tried `wavrec` command from audio/wavplay to see if the audio recording is even working properly, and in short, it does record audio from my internal microphone.

Anybody had success in using google hangouts calls & meetings from FreeBSD?


----------



## cpm@ (Jun 14, 2018)

Here is a WebRTC Troubleshooter.

Can you run a test and report back?


----------



## nekoexmachina (Jun 14, 2018)

After running this test, it detected no problems with sound or video, only connectivity (no ipv6, relay connectivity, reflexive connectivity, host connectivity). I'm not sure why this is like this, because neighbouring Linux host that sits on same network with same settings passes those tests.
I've tested sound recording from https://webrtc.github.io/samples/ to see it actually works.. It does without an issue.

Still hangouts, which as far as I know, use webrtc, don't transmit sound from me. Sound to me, on the other hand, is transmitted fine.

IPv6 being a problem is weird: if I run tests on some random ipv6 test website, it claims that I've no problems with ipv6 on that host, except for my ISP's DNS not supporting ipv6.

update:

Some information on my network setup:

NAT is ran on ZyXEL VMG 8924 router;
Then there is wireless access point (some asus) with no NAT in AP mode, then there are few laptops.
My fiancee's laptop runs Linux and Windows, both systems are fine with IPv6 tests and webrtc tests. My own main work laptop runs FreeBSD and Linux, Linux installation is fine with ipv6 tests and webrtc tests, FreeBSD installation is not fine in webrtc, relatively fine in ipv6 (test at ipv6-test.com indicates that I've "filtered ICMP", which happens only on FreeBSD, which implies that I have firewall filtering it, but this is not true - pf, ipfw, ipf are disabled). Then there is "pure" FreeBSD laptop that has same problems both in ipv6 and webrtc.

All Linux installs and Windows runs fine with google hangouts (meetings part); then all FreeBSD installation doesn't run fine with it - incoming video & sound works, outgoing video works, outgoing sound just doesnt. All FreeBSD installations run fine with samples from webrtc.github.io - sound records fine, plays fine.

I've seen some post earlier that said that "Chrome OSS backend doens't support webrtc yet" but that post was a bit old and it is untrue if to take the samples from webrtc.github.io in question.

Very not sure what to make of it all.


update2:

I've tried to run firefox instead of chromium just to see if it changes things, it does not. Firefox in fact fails even worse then chrome - it cant get past 1st stage of webrtc test (testing microphone).


----------



## nekoexmachina (Jun 14, 2018)

Update 3(including some solution so not updateing previous post)

After a bit of tinkering around, I've found out that most working combination for hangouts is Firefox browser, built with Pulseaudio support, ran on Pulseaudio backend. This requires a bit of change in about:config (info in port's pkg-descr), and it works fully. alsa and oss backends didn't work for me unfortunatelly.

Howrever, for some reason, I have no idea why, choosing pulseaudio as backend completely breaks the webrtc test page. That means that while hangouts themselves are working, tests are not.. lol.

Not really sure what to make out of connectivity troubles.

Also, @dear moderation team, please move this thread from peripherial hardware to multimedia - it better belongs there.


----------



## cpm@ (Jun 14, 2018)

According to the comment [1] WebRTC audio capture only works with PULSEAUDIO in Firefox, have you tried using Chromium with PULSEAUDIO enabled?

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206479#c2


----------



## nekoexmachina (Jun 14, 2018)

I haven't seen this bug - thank you. 

No, I did not try using Chromium with PA backend. 
I only installed chromium because I've expected it would work better there. 

However, problem with Chromium is not that audio capture for webrtc doesn't work - it works on samples from webrtc.github.io. It doesn't work exclusevely in google hangouts. 

As original goal was to make hangout audio work, and it works now in firefox, I'd mark the thread solved.


----------

