Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] No audio for HTML5 in firefox
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Sat Aug 15, 2015 3:13 pm    Post subject: [solved] No audio for HTML5 in firefox Reply with quote

Hi,

firefox (v 38.1) plays HTML5 videos without sound. Other sound apps (including flash player) work like a charm. It's probably irrelevant, but I do not have compiled snd_hda_intel.

Here is what I tried (and what did not help)

  1. I double checked that /etc/asound.conf uses the correct sound card (however, other audio apps work, so this is probably not the problem)
  2. Like suggested here, I tried to use puls in /etc/asound.conf.
  3. Another thread suggested to install gst-plugins-meta and gst-plugins-ffmpeg.

For all tests, I restarted firefox and /etc/init.d/alsasound, and I also tried new firefox prefixes.

fuser seems to indicate that firefox does not use ALSA at all while playing html5!
Code:
$ fuser -fv /dev/snd/* /dev/dsp*
                     BEN.        PID ZUGR.  BEFEHL
/dev/snd/controlC0:  johannes   2601 F.... kded4
                     johannes   2829 F.... kmix
/dev/snd/pcmC0D0p:   johannes   6939 F...m mplayer
                     johannes  26867 F...m steam

So why doesn't it?

Many thanks on advance.
- Johannes


Last edited by CPUFan on Fri Jan 08, 2016 1:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
trippels
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2010
Posts: 137
Location: Berlin

PostPosted: Sat Aug 15, 2015 3:35 pm    Post subject: Reply with quote

It's an old Firefox bug that never got fixed:

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

I recommend Chromium. It has no sound issues even with a custom asound.conf.
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2657

PostPosted: Sat Aug 15, 2015 3:43 pm    Post subject: Re: No audio for HTML5 in firefox Reply with quote

CPUFan wrote:
Hi,

firefox (v 38.1) plays HTML5 videos without sound. Other sound apps (including flash player) work like a charm. It's probably irrelevant, but I do not have compiled snd_hda_intel.

Here is what I tried (and what did not help)

  1. I double checked that /etc/asound.conf uses the correct sound card (however, other audio apps work, so this is probably not the problem)
  2. Like suggested here, I tried to use puls in /etc/asound.conf.
  3. Another thread suggested to install gst-plugins-meta and gst-plugins-ffmpeg.

What about media.mediasource.enabled?
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Sat Aug 15, 2015 3:46 pm    Post subject: Reply with quote

trippels wrote:
It's an old Firefox bug that never got fixed


I used openSuSE before 2 months, and it worked there. So why did it work there?
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Sat Aug 15, 2015 3:49 pm    Post subject: Re: No audio for HTML5 in firefox Reply with quote

charles17 wrote:
What about media.mediasource.enabled?

It's enabled, however, I can play HTML5 videos, it's just that there's no sound.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Aug 15, 2015 5:10 pm    Post subject: Reply with quote

Code:
[U] www-client/firefox-bin
     Available versions:  38.1.1^ms (~)38.2.0^ms (~)40.0.2^ms {selinux startup-notification LINGUAS="af ar as ast be bg bn_BD bn_IN br bs ca cs cy da de el en_GB en_ZA eo es_AR es_CL es_ES es_MX et eu fa fi fr fy_NL ga_IE gd gl gu_IN he hi_IN hr hu hy_AM id is it ja kk kn ko lt lv mai mk ml mr nb_NO nl nn_NO or pa_IN pl pt_BR pt_PT rm ro ru si sk sl son sq sr sv_SE ta te tr uk vi zh_CN zh_TW"}
     Installed versions:  39.0.3^ms(21:06:05 08.08.2015)(startup-notification -selinux LINGUAS="-af -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fr -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -kn -ko -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -te -tr -uk -vi -zh_CN -zh_TW")
     Homepage:            http://www.mozilla.com/firefox
     Description:         Firefox Web Browser


why dont use newest version? any reason?

I am sure when you go http://www.mozilla.com/firefox the page will tell you to download 40 version or am i wrong?


Some packages should be unmasked on any box, and thats firefox too.


Basically you ask why something does not work on an outdated version...

And than you compare apples with banana.

you never know which version the other linx distro uses with which patches on teh single packages ...
Audio is quite complicated => starts with hardware + kernel + userspace + audio server + desctop + application (and i am sure i missed something =)
Back to top
View user's profile Send private message
ceric35
Tux's lil' helper
Tux's lil' helper


Joined: 27 Aug 2006
Posts: 114

PostPosted: Sun Aug 16, 2015 4:57 pm    Post subject: Reply with quote

Same bug for me, and i can confirm that it's related to bug this bug with multiple audio cards.

I fixed it following this post.

It changed complicated file from:
Code:
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}

pcm.headset {
     type hw
     card 1
}
ctl.headset {
     type hw
     card 1
}


to
Code:
defaults.pcm.card 1
defaults.ctl.card 1


And youtube is working again in firefox \o/
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7099

PostPosted: Mon Aug 17, 2015 9:58 am    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/ALSA#HTML5_does_not_play_in_the_Firefox_browser
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Sun Oct 18, 2015 11:50 am    Post subject: Reply with quote

I've tried all the hints, updating firefox, changing ALSA configuration etc. - it did not help.

Then I tried to play an OGG file - http://www.tryad.org/ogg/Tryad_-_Empty.ogg. It did not work either. The position marker stays at 0:00 and I hear no sound. So I thought I'd have a general gstreamer problem. However, gstreamer works:

Code:
gst-launch-1.0 playbin uri=file:///usr/share/sounds/KDE-Sys-Trash-Emptied.ogg


So, something must be wrong between firefox and gstreamer. So I tried

Code:
strace firefox 2>&1 | grep libgst | grep -v ENOENT


Which outputs this (for both .ogg or html5):

Code:
open("/usr/lib64/libgstreamer-1.0.so.0", O_RDONLY|O_CLOEXEC) = 52
open("/usr/lib64/libgstapp-1.0.so.0", O_RDONLY|O_CLOEXEC) = 52
open("/usr/lib64/libgstbase-1.0.so.0", O_RDONLY|O_CLOEXEC) = 52
open("/usr/lib64/libgstvideo-1.0.so.0", O_RDONLY|O_CLOEXEC) = 52
stat("/usr/lib64/gstreamer-1.0/libgstmad.so", {st_mode=S_IFREG|0755, st_size=18888, ...}) = 0
# more stat() calls, but no more open() calls


Someone I know has it working (on OpenSuSE, same firefox version), and for him, the output from the above command looks like this:

Code:
open("/usr/lib64/libgstreamer-1.0.so.0", O_RDONLY|O_CLOEXEC) = 39
open("/usr/lib64/libgstapp-1.0.so.0", O_RDONLY|O_CLOEXEC) = 39
open("/usr/lib64/libgstbase-1.0.so.0", O_RDONLY|O_CLOEXEC) = 39
open("/usr/lib64/libgstvideo-1.0.so.0", O_RDONLY|O_CLOEXEC) = 39
open("/usr/share/locale/de/LC_MESSAGES/gstreamer-1.0.mo", O_RDONLY) = 39
open("/home/philipp/.cache/gstreamer-1.0/registry.x86_64.bin", O_RDONLY) = 39
openat(AT_FDCWD, "/usr/lib64/gstreamer-1.0", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 39
open("/home/philipp/.cache/gstreamer-1.0/registry.x86_64.bin.tmpT70Z6X", O_RDWR|O_CREAT|O_EXCL, 0600) = 39
Back to top
View user's profile Send private message
Poum
n00b
n00b


Joined: 27 Oct 2015
Posts: 38
Location: Onnaing France

PostPosted: Tue Oct 27, 2015 9:49 pm    Post subject: Reply with quote

firefox looks for the default card whitch is usualy the firts given by:
cat /proc/asound/cards

Writing an alsa plugin to revert alsa plugs is sometimes the only solution but
it takes ressources and can bring other problems.

When firefox doesn't play sound it is often that it plays on
a no sound device or another sound device even if you have
only one sound card because you can have additionnal
virtuel cards, pulseaudio, and others things no needeed.

For me it is always pulseaudio the guilty : i stop it and all becomes right.

Another better solution to reverse globally is to play with indexes options
of alsa driver in /etc/modutils/alsa when the driver support it.
options snd_ice1712 order=1,0
_________________
Didon dina dit-on du dos d'un dodu dindon
Back to top
View user's profile Send private message
dark-wulf
n00b
n00b


Joined: 02 Feb 2006
Posts: 40

PostPosted: Thu Jan 07, 2016 11:03 am    Post subject: Reply with quote

Hi,
I don't know if your problem is fixed but i had the same since some month and was using chrome for all video stuff.
And you pointed me just in the right direction.
As a last try I removed all alsa and gst packages including all configs and what did i found.... there was some old gst librarys in lib directory.
I Deleted them reinstall alsa and needed gstreamer stuff and all fine now :-)
_________________
Gentoo rulez!!!
Gentoo for every one!!!
Gentoo for president!!!
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Thu Jan 07, 2016 5:30 pm    Post subject: Reply with quote

dark-wulf wrote:
As a last try I removed all alsa and gst packages including all configs and what did i found....


Wow, I just deleted /etc/asound.conf and now it works! Thanks for the hint!

It's strange that removing that file worked because I've tried all possibile values for the sound cards there and nothing helped.

Further note: Before I removed the asound.conf, I installed snd-hda-intel and switched its index on boot via snd-hda-intel.index=1,0 (as suggested in the Gentoo Wiki). This did not help at that time, but it might have been necessary.
Back to top
View user's profile Send private message
dark-wulf
n00b
n00b


Joined: 02 Feb 2006
Posts: 40

PostPosted: Fri Jan 08, 2016 12:19 am    Post subject: Reply with quote

:lol: :lol: :lol:
good to know, maybe deleting tha asound.conf would have been enough for me too, but never the less i cleaned up some old libs.
You should an an "solved" to the title
_________________
Gentoo rulez!!!
Gentoo for every one!!!
Gentoo for president!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum