Firefox lags with 4K YouTube videos

Sharks445

Reputable
Mar 10, 2014
168
0
4,690
When I try to play 4K YouTUbe videos on Firefox, (60FPS to be exact) It lags like crazy, and the CPU usage goes to full. 4K 60 becomes more like 4K 10-20. It is not a network issue, since more video is buffered than played, so I don't have buffering issues. I have a r9 390, but I doubt Firefox uses HA for YouTube anyways. If I download the 4K60 video and play it using Windows Media Player, It plays perfectly at 60FPS. Google Chrome also works fine. It is an issue that I have only with Firefox. I even tried to disable Webm, enable Flash, or change the browser session saving interval, downloading the nightlies, and nothing worked. Is this a bug with Firefox? Do I have to download 4K videos to play them now?
 
Quick search shows Firefox has
"VP9 decoding but it is disabled by default, perhaps because the mediasource feature still has bugs. If you want to try it, you can toggle this setting:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste media and pause while the list is filtered

(3) Double-click the media.mediasource.webm.enabled preference to toggle it from false to true"
 

Sharks445

Reputable
Mar 10, 2014
168
0
4,690

I've done that already. (4K won't work without it)
 

Sharks445

Reputable
Mar 10, 2014
168
0
4,690


Like I mentioned, this is not a network issue. I have 160Mbps so I don't deal with buffering. I even tried to open a Webm file from my local drive and it was lagging, while chrome displayed it properly.
This is not even a YouTube issue anymore, it's a codec issue
 
I gave up trying to play videos directly in the browser. I get better performance and playback features with mpv+youtube-dl

mpv supports it with just:
mpv <youtube url>

also supports any of the 100's of websites that youtube-dl supports

I use livestreamer+mpv for streaming services such as twitch