Bug 238096

Summary: www/firefox: some videos don't have sound - include sndio in default audio options
Product: Ports & Packages Reporter: Dave Cottlehuber <dch>
Component: Individual Port(s)Assignee: freebsd-gecko mailing list <gecko>
Status: Closed Not Enough Information    
Severity: Affects Only Me CC: mizhka
Priority: --- Flags: jbeich: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   

Description Dave Cottlehuber freebsd_committer 2019-05-24 08:12:16 UTC
e.g. https://www.invidio.us/watch?v=_oWcfUt9QUs (a silent gnn is a rare thing)

the same video can be played directly via multimedia/mpv and it seems that
firefox chooses incorrect codecs.

while this may be specific to my computer setup, I have found that switching the
backend to sndio resolves this issue, on 3 different systems (intel i915, USB audio devices, HDMI output).

Is it possible to add SNDIO to the default OPTIONS_MULTI_AUDIO? the overall difference in size to www/firefox is negligable - a few KiB only, and it saves having to rebuild a very very large port each update.

Alternatively, I can provide more debugging info if needed, I'm just not sure where to look for that.
Comment 1 Jan Beich freebsd_committer 2019-06-01 18:58:01 UTC
There's no "best" backend, see bug 216383.

> Is it possible to add SNDIO to the default OPTIONS_MULTI_AUDIO?

sndio backend in cubeb doesn't support lazy bindings, so enabling it would always pull libsndio.so even if unused. As sndio comes after alsa in backend autoselection it will be unused by default. FreeBSD support is also not upstreamed.


> Alternatively, I can provide more debugging info if needed, I'm just not sure where to look for that.

Dump Media section from about:support to confirm used backend. www/firefox won't use PulseAudio if audio/pulseaudio isn't installed.

If the backend is alsa then the issue maybe in either audio/alsa-plugins port options, /usr/local/etc/asound.conf or ~/.asoundrc. Check if you've modified any of these.

If the backend is pulse-rust or pulse then it could be stale configuration. Check if paplay works. If not try removing ~/.config/pulse. Otherwise, show audio/pulseaudio port options and "pacmd dump" output. See bug 211684 for rationale how default sink is selected.
Comment 2 Jan Beich freebsd_committer 2019-06-01 20:27:17 UTC
(In reply to Jan Beich from comment #1)
> FreeBSD support is also not upstreamed.

This is a major blocker. I'm not interested in SNDIO, so someone has to pick up/restart the effort. As is SNDIO option contributes to technical debt and so can be pruned if it becomes too much of a burden (similar to OSS).

Comment 3 Jan Beich freebsd_committer 2019-09-07 20:52:25 UTC
Feedback timeout. Cosidering a pilot error.
Comment 4 commit-hook freebsd_committer 2019-09-07 20:53:24 UTC
A commit references this bug:

Author: jbeich
Date: Sat Sep  7 20:53:08 UTC 2019
New revision: 511423
URL: https://svnweb.freebsd.org/changeset/ports/511423

  gecko: enable SNDIO by default

  To avoid runtime dependency switch to dlopen(3).

  PR:		238096
  Requested by:	many

Comment 5 Dave Cottlehuber freebsd_committer 2019-09-17 13:31:34 UTC
I see sndio was enabled recently - with sndiod started, "stuff just works" now - thanks!

Prior to this ffox was using alsa according to about:support. There was no pulseaudio installed.