Bug 238096 - www/firefox: some videos don't have sound - include sndio in default audio options
Summary: www/firefox: some videos don't have sound - include sndio in default audio op...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-24 08:12 UTC by Dave Cottlehuber
Modified: 2019-06-01 20:27 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.

https://searchfox.org/mozilla-central/rev/662de518b168/media/libcubeb/src/cubeb_pulse.c#626-629
https://searchfox.org/mozilla-central/rev/662de518b168/media/libcubeb/src/cubeb.c#174-176,195-197

> 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).

https://bugzilla.mozilla.org/show_bug.cgi?id=1351378