# youtube not playing videos in firefox



## Terpentijn (Oct 3, 2019)

Anybody has this  problem? I use the latest firefox on FreeBSD-12-RELEASE and every video I chose on youtube does not play. Weird. What am I missing?


----------



## Deleted member 30996 (Oct 3, 2019)

I'm using FreeBSD 12.0-RELEASE-p10 with www/firefox-esr 68.1.0 and not having any problems with youtube videos playing. I played several just to make sure and this one should play without needing to leave the site.





Rainbow - Man on the Silver Mountain Live


----------



## Geezer (Oct 3, 2019)

I saw Rainbow in concert some forty years ago. I am not proud of it. My ears were screaming for five days afterwards, and I think that did some permanent damage to my hearing.

Terpentijn, did you check that within Youtube's settings, that you are viewing video as HTML5 rather than Flash?


----------



## userxbw (Oct 3, 2019)

Mine was doing just fine(yesterday-ish). Until I seen this post then went and checked it. Now I'm getting this some sounds are ok, and others are a  gargling wheezily muffled sounds.

Firefox 69.0.1
FreeBSD 12.0-RELEASE-p10

It's also with reg movies I play in mpv.. now I got a investigate further..

it's like the bckground music is set higher then the vocals which are now muffeled and lower in volume, and just generally screwed up.

MOD:
said screw it, got a go into Linux to watch anything now, then when I was in Linux I discovered my headphone jack wasn't plugged in completely. 

now it is and its back to working again... 
go figure... 👁


----------



## Terpentijn (Oct 6, 2019)

OK. An update. I installed fbsd from scratch. Updated it. Installed Xorg and Xfce. Add drm-kmod for my Intel on board videocard. Runs like a champ. Alas! No video playback on YouTube. Not in Firefox. Not in chromium. I can play normal local movies from my mediatheek. I had a free drive and installed GhostBSD. Same hardware. Same videocard. YouTube works just fine! I want fbsd and am convinced that something is wrong there. I have no idea where to look though. I'm a member of the right groups. The hardware and settings are the same afa I know. What oh what can it be? Any suggestions on things that differ so much between fbsd and Ghost that one does work and one does not?


----------



## k.jacker (Oct 6, 2019)

I had that same problem, too, for about a week after I upgraded all packages via `pkg upgrade`.
While suddenly www/firefox and multimedia/mpv refused to play whatever type of video, www/iridium played anything as expected. I compared all libs and dependencies of the 3, but wasn't able to find the cause.

Anyway, I did not get nervous and just ran `pkg upgrade` every day since then.
Everything is back to normal since a lot of stuff got upgraded about 2 hours ago.


```
Oct  6 16:44:17 pico pkg[58277]: mpv reinstalled: 0.29.1_11,1 -> 0.29.1_11,1
Oct  6 16:44:56 pico pkg[58277]: firefox upgraded: 69.0.1,1 -> 69.0.2,1
```

I use regular quarterly repo.


----------



## Terpentijn (Oct 6, 2019)

k.jacker said:


> I had that same problem, too, for about a week after I upgraded all packages via `pkg upgrade`.
> While suddenly www/firefox and multimedia/mpv refused to play whatever type of video, www/iridium played anything as expected. I compared all libs and dependencies of the 3, but wasn't able to find the cause.
> 
> Anyway, I did not get nervous and just ran `pkg upgrade` every day since then.
> ...


Glad to hear your problems are solved. Mine are not. I use the same firefox version. Just to check if it would make a difference I changed back to quarterly, but only xorg-libraries needed installing. I did not do so, because, being on latest, I allready had that version. I will give it more time. If it's something in one of the packages, it will be solved. I guess it must be. I have no other explanation. The rest of the system, including Xfce, runs perfectly.


----------



## Phishfry (Oct 6, 2019)

k.jacker said:


> Everything is back to normal since a lot of stuff got upgraded about 2 hours ago.





k.jacker said:


> I use regular quarterly repo.


I think it would really be useful to have an announcement when we roll into the next quarterly repo.
Especially seeing how it takes some time for the packages to build on the cluster from the ports tree.
Some might expect to see the new packages on the 1st day of the new quarter.


----------



## Terpentijn (Oct 6, 2019)

k.jacker said:


> I had that same problem, too, for about a week after I upgraded all packages via `pkg upgrade`.
> While suddenly www/firefox and multimedia/mpv refused to play whatever type of video, www/iridium played anything as expected. I compared all libs and dependencies of the 3, but wasn't able to find the cause.
> 
> Anyway, I did not get nervous and just ran `pkg upgrade` every day since then.
> ...


Just to make sure. I installed www/iridium-browser but as I already feared, it shows the same problem. Like I wrote, chromium has this problem too. And since iridium is based on chromium...  Ah well, this maybe the prize one pays for running 'latest' pkgs.


----------



## joplass (Oct 6, 2019)

I don't get sound from youtube but videos play fine.  I might have another issue tho, as I always have to run 
	
	



```
sysctl hw.snd.default_unit=0
```
 before getting any sound from the sound card.  I don't know if this is an issue others have experienced.  I will open another thread on that one.


----------



## userxbw (Oct 6, 2019)

I never hd any sound issues, other then that ooops posted above. but I used portsnap to update everything, using its conf to tell it to use pkg first for the latest version and build whatever next. and video and sound and everything has and still is working ok, but I got a  HP EliteBook 840 G2 CPU: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (2294.74-MHz K8-class CPU) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs  system, as everything depends on the Hardware I do suppose it plays a big deal in all of this.


----------



## Terpentijn (Oct 6, 2019)

joplass said:


> I don't get sound from youtube but videos play fine.  I might have another issue tho, as I always have to run
> 
> 
> 
> ...


If you always have to do this, why don't you put this line in /etc/sysctl.conf then?


----------



## joplass (Oct 7, 2019)

Terpentijn said:


> If you always have to do this, why don't you put this line in /etc/sysctl.conf then?



Never thought of that.  Thanks will be adding that now.


----------



## `Orum (Oct 7, 2019)

What GPU are you using?  I ask because, IIRC, you may need to install the VAAPI drivers for yours to work for playback within Firefox (or possibly other browsers).  For example, on my laptop with an Intel GPU, I installed multimedia/libva-intel-driver and things are working fine.

Other than that, did you install Firefox from ports, and if so, what options did you pick?  I'm using the esr version (as I don't need the "latest new features" and it lets me rebuild the port less often), and as I recall you need to leave the PULSEAUDIO option on for sound to work.


----------



## Terpentijn (Oct 7, 2019)

I have a second generation intel (sandy bridge?). The libva-intel-driver states it does not  support this chipset. This morning I installed it anyway. got no error msgs, but the results were the same. No YouTube videos. All I get is this spinning circle in the video. Nothing happens. This evening I'm on a fresh install, with pkg set to quarterly (the default). No videos in YouTube. I hope the 12.1 release will solve the problem.


----------



## `Orum (Oct 8, 2019)

I doubt it, as the problem is likely with the ports side of things.  Have you tried the ESR release to see if that works?


----------



## Terpentijn (Oct 8, 2019)

`Orum said:


> I doubt it, as the problem is likely with the ports side of things.  Have you tried the ESR release to see if that works?


Yes I've tried the ESR version. Same problem.


----------



## Terpentijn (Dec 7, 2019)

Update Dec 6th: I give up. It's my hardware. FreeBSD in VirtualBox runs perfectly fine, including YouTube movies. But hey. VB is different hardware  On my barebone laptop it keeps having this YouTube problem. I tried every tip on the internet. From sound related issues to driverless xorg. Nothing works. Have to look for a new laptop.


----------



## jflores (Dec 21, 2019)

Have you tried switching the audio card through pavucontrol ?


----------



## Terpentijn (Dec 21, 2019)

jflores said:


> Have you tried switching the audio card through pavucontrol ?


No, I haven't. What exactly do you mean by 'switching' ?


----------



## fernandel (Dec 21, 2019)

I think you shoud rebuild www/youtube_dl and it will work again - related for default Python 3.7.


----------



## Terpentijn (Dec 21, 2019)

fernandel said:


> I think you shoud rebuild www/youtube_dl and it will work again - related for default Python 3.7.


What has youtube-dl to do with in browser view of youtube clips?


----------



## fernandel (Dec 21, 2019)

Terpentijn said:


> What has youtube-dl to do with in browser view of youtube clips?


I am sorry. I thought thay you are using multimedia/mpv and Firefox extension for Mpv. IMO multimedia/mpv and plugin has something to do with youtube-dl.


----------



## shkhln (Dec 21, 2019)

Is that modesetting or xf86-video-intel driver? Try PR 236003.


----------



## jflores (Dec 22, 2019)

pavucontrol is a pulseaudio utility and allows you to switch the default audio card for firefox.


----------



## jacekkowalczyk82 (Feb 9, 2020)

All, 
I had the very similar problem. videos on youtube did not want to play at all (it was spinning and nopt moving forward)
It turned out that it is very important to select correct graphics divers
I will put here three different settings of kld_list option


```
# for graphics for Intel HD graphics 4400 Haswell

# youtube does not work in firefox
#kld_list="/boot/modules/i915kms.ko fuse" 

# firefox wikth youtube works but logitech nano receiver not  :-(
#kld_list="/boot/kernel/i915kms.ko fuse"

#everything works, youtube and logitech nano receiver
kld_list="i915kms.ko fuse"
```

I am running FreeBSD 12.1 at Lenovo ThinkPad x240 with Haswell-ULT Integrated Graphics Controller, Intel® HD4400 Graphics. 

BR Jacek Kowalczyk


----------



## Terpentijn (Feb 9, 2020)

So, the driver from boot/modules didn't work, the one from boot/kernel did work partly and now you are running i915kms.ko? But which one is actually loaded now?


----------



## Sevendogsbsd (Feb 9, 2020)

Pretty sure the video driver has zero to do with whether or not www/firefox can play videos. The only thing I can think of that may be related is the system was running under vesa mode, but I have never actually run anything in that mode so can't speak to how it would affect www/firefox.


----------



## Terpentijn (Feb 9, 2020)

It's not only Firefox. I used all kind of browsers and none of them were able to play YouTube videos. Normal videos (local) were no problem.


----------



## eternal_noob (Feb 9, 2020)

Just a guess:
Are these H.264 encoded videos and you are missing
`pkg install openh264`?


----------



## free-and-bsd (Feb 9, 2020)

So, to sum it up, the only problem you have is your _browsers_ not being able to play YouTube videos? With your soundcard working fine and video stuff performing as well in all other things except playing videos on YouTube?

You may try to refresh Firefox settings. Although Firefox is _supposed_ to come with normal defaults, this option is to set things right in case it doesn't.
Another guess is -- network connectivity problems. Yes, because YouTube videos play well in VB, which has networking settings of its own, doesn't it. And YouTube videos playback firstly depends on networking. So then, something that blocks _network_ videos in your normal installation doesn't block them for VB. That's reasonable because VB takes care of its network.
Because _hardware_ doesn't seem to have anything to do with browser's inability to play videos when other programs in the same installation play video all right.


----------



## scottro (Feb 9, 2020)

I'd be curious if they'd play using mpv--maybe download the video with youtube-download or similar then see if it plays. Firefox has done some dumb things with audo. I thought it was reserved for Linux, but for one, you had to recompile if not using pulse audio.

And never mind, you answered my question.


----------



## nonfatmatt (Feb 19, 2020)

Just thought I would bump this thread, as I am having this problem too. The video images show up but the videos won't play in Chromium or Firefox (including ESR).

Stats:
FreeBSD 12.1 
Radeon R9 Nano on drm-kmod 4.16 out of the repos.

I think I will try to build drm-kmod-devel from ports and see if it works, as it seems to be a hardware/driver issue.


----------



## nonfatmatt (Feb 26, 2020)

Can confirm that this is solved by upgrading to 13.0-CURRENT and using the drm-devel-kmod package out of ports. When I go back to 12, interestingly, the video works when I'm only running fluxbox. However, when I install MATE (with pulseaudio, of course) it doesn't work. So, i'm assuming it's a driver issue or perhaps a pulseaudio issue.. Perhaps with HDMI / DP output.


----------



## free-and-bsd (Feb 27, 2020)

nonfatmatt said:


> ...So, i'm assuming it's a driver issue or perhaps a pulseaudio issue.. Perhaps with HDMI / DP output.


Firefox builds by default have pulseaudio support for sound. So, perhaps, MATE and other _complex_ DEs install some pulseaudio configuration that prevents your sound from working with Firefox. I haven't used GNOME & friends for several years now, and for that same reason: debugging problems becomes very difficult. Simple FVWM2 leaves things simple, doesn't install any additional configuration for applications... and they all "just work" .
In any case, I wouldn't blame _audio_ playback problems on drm-kmod . Correct me if I'm wrong, but it stands to reason that drm-kmod driver enables graphical functionality in general -- your X server either will or will not start. If it will, then your apps will as well. But video/audio playback is application level. And _audio_ part depends on audio codecs installed or linked to on your system and the sound system config in general.


----------



## the3ajm (Oct 14, 2020)

I've noticed that on 12.1 I've upgraded to my version of Firefox 78 ESR whenever the video goes to an ad or me skipping the ad, the video will keeps on loading with the spinning wheel. If I choose a random video it'll play the video but when it bumps to an ad it'll usually stuck at the wheel buffer again. It seems this issue occurs when I've upgraded from 11.4 after I loaded the i915.ko driver to set to the correct resolution.

I'm using Konqueror to see if I can reproduce the issue but so far it can handle the ad segment fine with little buffer in between so this seems to be a firefox respective issue.


----------



## rpowell47 (Oct 14, 2020)

I just carried out a fresh 12.1 install yesterday and one of first pkg installs is xorg and the second one is pkg install firefox gimp rhythmbox vlc. And all is well with audio and video when viewing youtube. Maybe this may help after you want to deinstall and then reinstall firefox gimp rhythmbox and vlc if you even use those ports. I use MATE as the GUI.


----------



## the3ajm (Oct 14, 2020)

I did a refresh after laying out my options of playing around with autoplay feature and putting the browser into safe mode but the refresh didn't help so I reinstalled firefox to a slightly updated version and it's now able to start playing videos at the beginning and after skipping an ad in between.


----------



## Abraham79 (Oct 24, 2020)

Firefox will not play videos in FreeBSD-12.1 installation. This started a few days back, perhaps related to my problem with Gnome session loading getting delayed from GDM screen. Weird! This is a SandyBridge desktop using i915kms from /boot/modules.


----------



## drhowarddrfine (Oct 24, 2020)

Abraham79 Possibly. Don't know. No problems  with Firefox here but I'm not using Gnome


----------



## free-and-bsd (Oct 24, 2020)

Abraham79 said:


> This started a few days back


Does it play them for root user?


----------



## Abraham79 (Oct 25, 2020)

drhowarddrfine said:


> @Abraham79 Possibly. Don't know. No problems with Firefox here but I'm not using Gnome


Now, Firefox can play video fine. It seems like the offending line was that of making HDMI audio as default. I removed `hw.snd.default_unit=4` from /etc/sysctl.conf and now firefox plays video and audio fine. However, totem and other media players have no audio output. In VLC, if I select audio device > pcm4:virtual:dsp4:vp1 , then audio plays. It's a tricky situation. If I make /dev/dsp4 as default sound output, Firefox stops playing videos.

```
~% cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec) default
pcm1: <Realtek ALC892 (Front Analog)> (play/rec)
pcm2: <Realtek ALC892 (Rear Digital)> (play)
pcm3: <Realtek ALC892 (Rear Digital)> (play)
pcm4: <Intel Cougar Point (HDMI/DP 8ch)> (play)
No devices installed from userspace.
```


----------



## free-and-bsd (Oct 25, 2020)

Abraham79 said:


> However, totem and other media players have no audio output


Now I have given up on Totem long time ago. Somehow it NEVER worked for me for some reason or other. VLC works fine, don't even have to select/deselect different devices. Default configuration works fine as well (in my case, it's  hw.snd.default_unit=4 that works)!
In your case, complications seem to stem from your using Gnome. BTW, one of the reasons I stopped using Gnome and other DEs: they screw things up while the installation defaults work fine with some basic minimal desktop.

Then the question is, does your system use ALSA, pulseaudio? These complicate matters further... For me, that is. There are experts of pulseaudio, of course. But since its OSS on FreeBSD and it doesn't need any pulseaudios nor gstreamers to do the job just fine, then why bother, I reason.


----------



## the3ajm (Feb 11, 2021)

After updating from 12.1 to 12.2, I'm still experiencing a behavior where the videos will buffer and won't play whether from YouTube or twitch, I tried open Midori to play a video and causes screen to go black with message saying gpu hung. The only workaround I've tried was logging out of DE and going back reloading the session.


----------



## free-and-bsd (Feb 11, 2021)

Well I'm having trouble (at times) with YouTube in firefox. Unrelated to which OS version it is. And Yahoo! mail nearly hangs while loading folders. Don't know which it is, the amazing firefox or equally amazing Yahoo! mail service. I suspect both.


----------



## free-and-bsd (Feb 11, 2021)

Maybe use seamonkey, as some have suggested in some other thread? That one will end up in message like "you need to upgrade your browser to display this page CORRECTLY". Then it will load an older version of Yahoo! mail which works fine without any hangs.


----------



## the3ajm (Feb 11, 2021)

You can switch between modern and classic look of Yahoo! as with Gmail it will ask you to switch if it detects that loading is taking a longer time. Your problem seems more related to loading content from the site mine is from playing videos fine to being stuck but content loads fine.


----------

