RPi-Distro / repo

Issue tracking for the archive.raspberrypi.com repo
37 stars 1 forks source link

[SOLVED] audio problems in Firefox-ESR after PulseAudio is used #218

Closed beta-tester closed 3 years ago

beta-tester commented 3 years ago

hi,

after PulseAudio is used as top layer for audio devices, firefox-esr plays some videos without audio. this wasn't an issue before the December 2020 RPi OS upgrade.

see here no audio in Firefox-ESR after the 2020-12-02 RPi OS upgrade

the update that was published today (2020-12-07) pulseaudio (12.2-4+deb10u1+rpi2) did not fix that issue.

how to reproduce that issue:

  1. full-upgrade your RPi.
  2. open firefox-esr
  3. navigate to: https://www.youtube.com/watch?v=4Wrc4fHSCpw
  4. play the video (the video plays without audio)

  5. open chromium
  6. navigate to: https://www.youtube.com/watch?v=4Wrc4fHSCpw
  7. play the video in chromium (the video plays with audio)

  8. open VLC media player
  9. hit [Ctrl] + [N] and paste the following link: https://www.youtube.com/watch?v=4Wrc4fHSCpw
  10. play the video in VLC media player (the video plays with audio)

i tested on RPi4B (4GByte) and RPi3. i tested full-upgrade (2020-12-04 and 2020-12-07) an previous RPi OS version (2020-08-20) and the current RPi OS version (2020-12-02) all installations show up that issue. the RPi's are connected to a TV by using HDMI cable.

spl237 commented 3 years ago

This seems to be a known / common issue with Firefox and PulseAudio; Firefox seems reluctant to use a running PulseAudio service. See https://bugzilla.mozilla.org/show_bug.cgi?id=1422073

You can fix it (in an not-entirely-satisfying way) by killing the existing PulseAudio service:

systemctl --user stop pulseaudio.service pulseaudio.socket

Then starting a new PulseAudio service in a terminal:

pulseaudio

And then running Firefox, which will then play audio via PulseAudio as expected.

As we are running an almost entirely vanilla PulseAudio instance - the only changes we have made are a couple of initial config changes which shouldn't have made any difference to this, and given the existing bug reports on similar-looking issues, this looks like something which Mozilla need to fix.

beta-tester commented 3 years ago

i forgot to mention that not all video files are affected from this issue. most videos i played plays its audio well. but some videos don't. and those which don't, don't do it reproducable.

e.g. https://www.youtube.com/watch?v=pTn6Ewhb27k this video plays well with audio.

it is from the same author and channel and were published recently.

why is one playback with audio and the other not - constantly and so reproducable? how can i see the audio format of the video of YouTube video?


the hint with killing and restarting PulseAudio broke the audio entirely of all applications - i had to reboot the RPi to have audio back. (at least to have the state as before with the issue of firefox-esr and no audio for some videos)

EDIT: oops, there was VLC open in the background, maybe that prevent PA from stopping or restarting. but that workaround did not made a difference with that video from the initial post.

spl237 commented 3 years ago

To be honest, I'd suggest raising this as an issue against Firefox itself rather than here. We don't modify or customise Firefox - we just allow the standard package from Debian to be installed. As Chromium, VLC, etc all work properly with PulseAudio on Pi, finding out why Firefox behaves differently really won't be a priority for us, and we don't have anyone who knows the Firefox code and who could start to investigate without a very steep learning curve and a lot of time.

beta-tester commented 3 years ago

i opened an a bug report https://bugzilla.mozilla.org/show_bug.cgi?id=1682779

beta-tester commented 3 years ago

i opend an isuue report at https://bugs.launchpad.net/raspbian, because at Debian it is not an issue. https://bugs.launchpad.net/raspbian/+bug/1921778

mrusli70 commented 3 years ago

I having the same problem with my Raspberry Pi 4B. And it too cannot run youtube on Firefox with raspbianOS version 5.10. Tested on Kali LInux works well running on youtube with Firefox. Chromium and VLC works well. But not on Firefox with youtube with RaspbianOS.

spl237 commented 3 years ago

As above - please report as an issue with Mozilla against Firefox. We don't provide maintenance for Firefox, and audio does work with our supported browser, which suggests that this is a Firefox-specific issue. As per the link above, there are known problems with Firefox and pulseaudio.

mrusli70 commented 3 years ago

Please be informed unable to submit Feedback to Firefox at this time as it indicates Please check back soon as they, mozilla paused submission.

beta-tester commented 3 years ago

i it really an issue that mozilla can fix? i opend an issue report there and did some logs they requested, but there was nothing that could explain the behavior. and Firefox-ESR under other OS'es Debian, Ubuntu, Fedora, ... does work well in combination with PulseAudio. only Raspberry Pi OS with PulseAudio seems to be affected from the issue at the moment. isn't the issue more somewhere in between Raspbian Pi OS dristro and Debian distro... that could be Raspbian. there i opend an issue as well, but that report did not reached priority yet, maybe because nobory else reported and/or confirmed the issue there... Bug #1921778: audio problems for some videos in Firefox-ESR after PulseAudio is used

beta-tester commented 3 years ago

i guess YouTube recently changed their encoder settings. now nearly all videos have non-100% volume/normalized values. they are all at 95%/95%, that means Firefox-ESR on Raspberry Pi is absolute useless for YouTube videos

beta-tester commented 3 years ago

there is a similar issue reported at https://github.com/webcompat/web-bugs/issues/88543

there the issue is with audio playback at the webpage https://sndtst.com/ where you normally can listen to in-game sound-tracks of some video-games.

on Raspberry Pi 10 Buster (2021-04-07) with chromium they play well, but with firefox-esr you will hear nothing at all.

beta-tester commented 2 years ago

i tried the new RaspiOS Bullseye ("Normal" and Full) images on my RPi3B and RPi4B and there it seems Firefox-ESR has its sound back again :D