Distorted sound in Firefox

Distorted sound in Firefox but not in mpv.
Dont have any other web browser on laptop to test it.

Code:
pkg options firefox
firefox - ALSA: off
...
firefox - JACK: on
...
firefox - PULSEAUDIO: on
firefox - SNDIO: on

Distortion trough speakers and trough earphone jack.
 
Try to use different audio backends in firefox:
## Audio backend

Currently used audio backend can be inspected on `about:support` page.
Supported backends and default probing order is as follows:
- `pulse-rust` if `pulseaudio` package is installed (PULSEAUDIO option)
- `jack` if `jackit` package is installed (JACK option)
- `sndio` if `sndio` package is installed (SNDIO option)
- `alsa` if `alsa-lib` package is installed (ALSA option)
- `oss` (always available)
To force a specific backend open `about:config` page and create
`media.cubeb.backend` preference.
 
i had audio popping with chromium

turns out i was missing gpu firmware

Code:
sudo pkg install gpu-firmware-intel-kmod-kabylake

have a look at your dmesg output and see if you have any errors related to the gpu

Code:
sudo dmesg
 
i had audio popping with chromium

turns out i was missing gpu firmware

Code:
sudo pkg install gpu-firmware-intel-kmod-kabylake

have a look at your dmesg output and see if you have any errors related to the gpu

Code:
sudo dmesg
does not look like i have issues with gpu, all fine.
i have all the kmods for gpu , currently using hdmi for second monitor.
as i dont have nvidia - when i did intel gpu install - all the firmware and extra was pulled in.
and i updated freebsd few days back to latest version. 14.1-RELEASE-p4.
 
I dont have vlc i have mpv - and yes on mpv is all fine.
I could check on VLC but if mpv works im sure VLC will toooo.
What i mean by saying distorted: its more like crackling reverbing ... dont know how to explain.
 
you can create a new firefox profile


to check if the firefox profile you are using now is causing the issue
maybe a corrupt database or some other glitch

at least that way you can rule out the firefox profile and extensions
and that it might be a freebsd issue
 
mpv was forked by Vincent Lang, also known as wm4, in 2012 from mplayer2, which was forked in 2010 from MPlayer.

if you arent having any issue with mpv with oss as the audio backend

but are having problems with firefox with the oss backend,
then it would seem to suggest its a firefox issue

i have never had any audio issues with firefox
 
if you arent having any issue with mpv with oss as the audio backend

but are having problems with firefox with the oss backend,
then it would seem to suggest its a firefox issue

i have never had any audio issues with firefox
yes, it is ff issue most likely as mpv has no issues.
I would start testing with mplayer.
mpv available outputs:
oss / null / pcm.

i think im going to re-install firefox and see what is what.
 
mpv config directory

Code:
~/.config/mpv

mpv.conf

Code:
# mpv.conf

# list profiles with: mpv --profile=help

# load hwdec profile automatically
profile=hwdec

# hardware acceleration profile
[hwdec]
profile-desc="hardware acceleration, no cache, yt-dlp 1080 or less"
vo=gpu
hwdec=vaapi

# hide: GNOME's wayland compositor lacks support for the idle inhibit protocol.
#msg-level=ffmpeg=fatal,vo/gpu/wayland=no
msg-level=ffmpeg=fatal

# cache no for internet streams
cache=no

# yt-dlp best format 1080 or less
ytdl-format="bestvideo[height<=?1080]+bestaudio/best"

# show milliseconds in the on screen display
osd-fractions

# audio device
audio-device=oss//dev/dsp1

# youtube subs - J to switch to subs
sub-auto=fuzzy
ytdl-raw-options=sub-lang="en",write-sub=,write-auto-sub=
sub-font='NotoColorEmoji'

# screenshot timecode
screenshot-template="%F-[%P]v%#01n"

# cache profile: mpv --profile=cache
[cache]
profile-desc="hardware acceleration, cache, yt-dlp 1080 or less"
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=auto

# youtube conditional auto profile match any youtube url
[youtube]
profile-desc="youtube hardware acceleration, cache"
profile-cond=path:find('youtu%.?be') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=DP-3


# invidious conditional auto profile match any youtube url
[invidious]
profile-desc="invidious hardware acceleration, cache"
profile-cond=path:find('http://127.0.0.1:3000') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=DP-3


# archive.org conditional auto profile match any archive.org url
[archive]
profile-desc="archive hardware acceleration, cache"
profile-cond=path:find('archive.org') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=auto
# fullscreen 2nd display
fs
fs-screen-name=DP-3


# bbc iplayer conditional auto profile match any bbc iplayer url
[iplayer]
profile-desc="iplayer hardware acceleration, cache"
profile-cond=path:find('bbc.co.uk/iplayer') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=yes
# fullscreen 2nd display
fs
fs-screen-name=DP-3


# bbc iplayer conditional auto profile match any bbc iplayer url
[bbc]
profile-desc="bbc hardware acceleration, cache"
profile-cond=path:find('bbc:pips:service') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=DP-3

# kodi invidious conditional auto profile match any youtube url
[kodi]
profile-desc="kodi invidious hardware acceleration, cache"
profile-cond=path:find('http?s://inv.tux.pizza') ~= nil
# include hwdec profile
profile=hwdec
# override hwdec profile cache setting
cache=no
# fullscreen 2nd display
fs
fs-screen-name=DP-3

input.conf

Code:
# vim keybindings
l seek  5
h seek -5
k seek  60
j seek -60

# subtitles
J cycle sub
K cycle sub down

# Audio filters:
F1 show-text "F2: loudnorm | F3: dynaudnorm | F4: low Bass | F5: low Treble" 2000

# loudnorm:
F2 af toggle lavfi=[loudnorm=I=-16:TP=-3:LRA=4]

# dynaudnorm:
F3 af toggle lavfi=[dynaudnorm=g=5:f=250:r=0.9:p=0.5]

# lowered bass:
F4  af toggle "superequalizer=6b=2:7b=2:8b=2:9b=2:10b=2:11b=2:12b=2:13b=2:14b=2:15b=2:16b=2:17b=2:18b=2"

# lowered treble:
F5  af toggle "superequalizer=1b=2:2b=2:3b=2:4b=2:5b=2:6b=2:7b=2:8b=2:9b=2:10b=2:11b=2:12b=2"
 
Sweet. I dont have any config files yet so this means MPV uses oss ?
Re-installed firefox - issue still there. ( as it was quickest option to do )
Which means :
ff 130 - pulseaudio , sndio, alsa - bad and oss better.
Need to play around with mpv and see what is what and if no - try to downgrade firefox an check it out.
 
default mpv config files

Code:
/usr/local/share/examples/mpv

Code:
ls -l /usr/local/share/examples/mpv

Code:
-rw-r--r--  1 root wheel 10085 17 Apr 20:18 input.conf
-rw-r--r--  1 root wheel  2781 17 Apr 20:18 mplayer-input.conf
-rw-r--r--  1 root wheel  4595 17 Apr 20:18 mpv.conf
-rw-r--r--  1 root wheel  1285 17 Apr 20:18 restore-old-bindings.conf

mpv.conf

Code:
#
# Example mpv configuration file
#
# Warning:
#
# The commented example options usually do _not_ set the default values. Call
# mpv with --list-options to see the default values for most options. There is
# no builtin or example mpv.conf with all the defaults.
#
#
# Configuration files are read system-wide from /usr/local/etc/mpv.conf
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
# system-wide settings, all of which are overridden by the command line.
#
# Configuration file settings and the command line options use the same
# underlying mechanisms. Most options can be put into the configuration file
# by dropping the preceding '--'. See the man page for a complete list of
# options.
#
# Lines starting with '#' are comments and are ignored.
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.

##################
# video settings #
##################

# Start in fullscreen mode by default.
#fs=yes

# force starting with centered window
#geometry=50%:50%

# don't allow a new window to have a size larger than 90% of the screen size
#autofit-larger=90%x90%

# Do not close the window on exit.
#keep-open=yes

# Do not wait with showing the video window until it has loaded. (This will
# resize the window once video is loaded. Also always shows a window with
# audio.)
#force-window=immediate

# Disable the On Screen Controller (OSC).
#osc=no

# Keep the player window on top of all other windows.
#ontop=yes

# Specify fast video rendering preset (for --vo=<gpu|gpu-next> only)
# Recommended for mobile devices or older hardware with limited processing power
#profile=fast

# Specify high quality video rendering preset (for --vo=<gpu|gpu-next> only)
# Offers superior image fidelity and visual quality for an enhanced viewing
# experience on capable hardware
#profile=high-quality

# Force video to lock on the display's refresh rate, and change video and audio
# speed to some degree to ensure synchronous playback - can cause problems
# with some drivers and desktop environments.
#video-sync=display-resample

# Enable hardware decoding if available. Often, this does not work with all
# video outputs, but should work well with default settings on most systems.
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
# may or may not help.
#hwdec=auto

##################
# audio settings #
##################

# Specify default audio device. You can list devices with: --audio-device=help
# The option takes the device string (the stuff between the '...').
#audio-device=alsa/default

# Do not filter audio to keep pitch when changing playback speed.
#audio-pitch-correction=no

# Output 5.1 audio natively, and upmix/downmix audio with a different format.
#audio-channels=5.1
# Disable any automatic remix, _if_ the audio output accepts the audio format.
# of the currently played file. See caveats mentioned in the manpage.
# (The default is "auto-safe", see manpage.)
#audio-channels=auto

##################
# other settings #
##################

# Pretend to be a web browser. Might fix playback with some streaming sites,
# but also will break with shoutcast streams.
#user-agent="Mozilla/5.0"

# cache settings
#
# Use a large seekable RAM cache even for local input.
#cache=yes
#
# Use extra large RAM cache (needs cache=yes to make it useful).
#demuxer-max-bytes=500M
#demuxer-max-back-bytes=100M
#
# Disable the behavior that the player will pause if the cache goes below a
# certain fill size.
#cache-pause=no
#
# Store cache payload on the hard disk instead of in RAM. (This may negatively
# impact performance unless used for slow input such as network.)
#cache-dir=~/.cache/
#cache-on-disk=yes

# Display English subtitles if available.
#slang=en

# Play Finnish audio if available, fall back to English otherwise.
#alang=fi,en

# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
# If the file seems to be valid UTF-8, prefer UTF-8.
# (You can add '+' in front of the codepage to force it.)
#sub-codepage=cp1256

# You can also include other configuration files.
#include=/path/to/the/file/you/want/to/include

############
# Profiles #
############

# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.

# The following profile can be enabled on the command line with: --profile=eye-cancer

#[eye-cancer]
#sharpen=5
 
So looks like its 110% Firefox issue.
Just installed chromium from pkg - and sound is perfect.
gonna try one more thing without dong anything major or writing mpv config.
 
Ive tested jack, pulse,sndio,alsa, oss.
Issues with all of them - no clear sound.
Need to try older FF version or different one then.
 
im using firefox 130

here are my firefox settings


user.js for all the settings you add to about:config

and chrome directory for user style sheets
to remove things from the contextual menu like pocket etc

firefox 130 has picture in picture mode auto open on tab switch


im running firefox in a jail
and the audio works fine

 
just wondering if its a sample rate issue

for example

if the system audio is set to 48k
and firefox is trying to use 44.1k

not saying thats the problem

but that can be one of the causes of audio issues
 
I agree. Need to have a look around, maybe other Thinkpad users have same issues as well. With sound i do have issues with this laptop. Did not had audio from headphone jack but audio was fine ... now i have audio from headphone jack but audio is bad.
Also need to try to compile ff from ports but im kinda not looking forward at the moment, better try to debug.
 
just wondering if its a sample rate issue

for example

if the system audio is set to 48k
and firefox is trying to use 44.1k

not saying thats the problem

but that can be one of the causes of audio issues

It could be ...
Actualy i found a video from someone else had issues but on chromium and i found your sampling command.
This is what im experiencing
I want to finish last 2 series of GITS - reboot and test it....
 
Back
Top