An easy fix for the sound problems( ie noise ) that occur when playing youtube
and other videos in firefox ( and within browser, rather than an external player ) is
to to enter about:config in the address bar and then type mp4 in the search field and navigate down to the preference " media.mp4.enabled " and then toggle it to the value false. After doing this mp4 video files eg h.264 aac audio will stll play fine within the browser but the audio will now play clearly as intended.
While most times I prefer to use an external video player to render video, such as omxplayergui or smplayer with harware accelerated mpv as its engine, at times I also like to have the ability to play videos within browser. Another way to play videos within browser on firefox is via the ViewTube user script:
. Among other useful features It enables you to chose the codec you wish to play the video with.
One thing that firefox does have going for it is configurabilty and extensibility with a bewildering number of extensions. One very neat extension that I very often use when I do use firefox is the " open with " ( currently version 6.8.1 ) extension by Geoff Lankow.
You can configure this extension so as to direct firefox through multiple right click context menus to play video links( and not just youtube) in a capable external video player of your choosing ie. the aforementioned hardware accelerated omxplayergui or smplayer.
Another neat firefox extension is Open Livestreamer by Armin. It can be configured to open video links via livestreamer and direct livestreamer to again use a capable video player. Having a hardware accelerated version of ffmpeg installed on my system that includes the player ffplay, I designate the hardware accelerated ffplay which loads very quickly with livestreamer and configure it as follows:
--player=ffplay -vcodec h264_mmal -threads 4
Another video workaround is directing the flashgot extension to use a specified video player(instead of a downloader). And you can also use one of the many user agent switcher extensions to avoid flash video by masking your browser as a mobile version and have the video site provide you with a html5 version of the video instead.
One thing that seems to have dramatically improved the web browsing experience on all of the web browsers that I use on my pi namely: Kweb, Chromium and Firefox is by using the zram " hack" described here:
viewtopic.php?f=62&t=169608&p=1132543&h ... m#p1132543
And also by using the hosts file " trick " described here :
viewtopic.php?f=29&t=174034&p=1111559&h ... S#p1111559
While off topic but in the same vein of improving browser performance, I found Chromium's browsing experience dramatically improved for me when I disabled the Ublock Origin extension that Pixel enables by default. It can easily be re-enabled on sites where it might appear useful. It is especially easy to disable and re-enable by use of the Chromium extension- SimpleExtManager.
I hope I have not strayed too far off topic but I have found all these little " tricks" very useful, hopefully others users may as well. I certainly always find it immensely helpful when other users post their hints etc on the forum. I have found that with all these little " hacks " Firefox becomes quite a useful browser ( and I had previously almost written it off). For example unless my memory betrays me, a few days back I was surprised and gratified to look up and find I
was browsing with 5 or 6 tabs open in each of firefox and chromium. ( I know this isn't entirely wise because you risk an unresponsive freeze).If I recall correctly I think was also listening to web radio at the time and I think I may have even had synaptic open! I think I may even have paused the radio and played a video. I knows this almost strains credulity! Granted I recently uograded to a pi 3 from a pi 2 and that definitetly accounts for some of this improved performance. But without all the little tricks my Pi 2 would usually become very sluggish or even unresponsive after about 4 or 5 tabs depending on how complex the web pages.