Improve YouTube's performance with h264ify for Firefox - gHacks Tech News

Improve YouTube's performance with h264ify for Firefox

YouTube works well most of the time if you use a relatively new device to access the site even if you push the available video resolution to the maximum.

The same cannot be said for low power devices, for instance the majority of computers that are five or even ten years old.

While YouTube works when you access the site, you may experience full load on the cpu, your laptop becoming hot like crazy, video stutter, battery drain, or other issues.

While you may be able to reduce some by lowering the video resolution on YouTube, some issues might not go away even if you set the resolution to 320p or even 144p.

Besides, while it may reduce the impact that the playing of videos has on the hardware, it may reduce the viewing experience at the same time.

H264ify

youtube-reduce-cpu-load

We talked about H264ify before here on Ghacks, when we reviewed the browser extension for Google Chrome. The Firefox add-on is developed by the same author using the same technology.

Basically, what h264ify does to improve the YouTube experience is to switch the YouTube video stream from using VP8/VP9 to H.264 instead.

The change is instant and not visible or noticeable to the user's eye. One of the main reasons why h.264 streams may be better is that the format is commonly accelerated by the graphics processing unit (gpu) whereas the VP8 or VP9 formats are not usually.

Hardware acceleration using the gpu reduces the load on the cpu which in term is beneficial to the viewing experience.

You can check which format YouTube uses to stream videos by right-clicking on the video and selecting the "stats for nerds" option.

This displays various information about the video stream including the mime type. This mime type should read video/mp4 when the extension is used, or video/webm when VP8 or VP9 are used.

Options

As far as options are concerned, there are only two. The first enables or disables the switching to h.264 which you may find useful at times. You can disable the extension as well for the same effect. The second setting blocks 60fps videos.

Closing Words

If you are experiencing issues when playing videos on YouTube, you may want to try h264ify for Firefox or Google Chrome to see if it resolves or at the very least reduces the issue.

While there is no guarantee that the extension will resolve it, it is one of the better options in this regard.

It may also help users who try to play high resolution video on YouTube, say 1080p video, and notice dropped frames or jerkey playback.

Now You: How is the performance for you on YouTube?

Summary
software image
Author Rating
1star1star1star1stargray
4.5 based on 12 votes
Software Name
H264ify
Software Category
Browser
Landing Page

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. King Arthur ofthe Saxons said on June 26, 2016 at 11:38 pm
    Reply

    FOR LINUX USERS ONLY:

    The best way to view Youtube is view an external player, such as SMplayer (with the mpv engine linked to youtube-dl- see Preferences- General tab, and Network tab).

    Video links can be dragged into the SMplayer screen to play immediately.

    RECOMMENDED PREFERENCES FOR YOUTUBE_DL (in the youtube-dl.conf file)

    60fps videos can be avoided by setting -f “[fps <=? 59]" in the youtube-dl.conf file or any other figure below 60.

    Buffer size can also be altered with –buffer-size 16K or whatever figure suits the user.

    Preference –prefer-ffmpeg is also needed to view the maximum resolution, because the updated avconv is not usually available in Linux distros. Whereas, ffmpeg can be updated easily.

    Preferences –youtube-skip-dash-manifest and –no-check-certificate can also speed things up in my opinion.

    1. FU_EU said on June 27, 2016 at 2:24 pm
      Reply

      I use “Open With” add-on and play YT videos on SMplayer/VLC or any other media player or browser which IMO is much quicker method than dragging links on youtube-dl

      https://addons.mozilla.org/en-US/firefox/addon/open-with/

  2. mikef90000 said on June 27, 2016 at 1:18 am
    Reply

    Can anyone confirm that the Firefox addon will or will not work on an older CPU (say AMD Socket A) without SSE2 instruction support? The authors website does mention this issue.
    TIA, Mike

  3. Tom Hawack said on June 27, 2016 at 9:57 am
    Reply

    I’ve been using for some time now a javascript performing the same as this h264ify add-on, ‘Youtube H.264’ at https://greasyfork.org/en/scripts/8128-youtube-h-264 — Much less cpu stress, no side-effect, perfect. I prefer scripts to add-ons when available with no loss.

    1. kc1127 said on June 27, 2016 at 12:57 pm
      Reply

      Thx for the script info. I prefer a script rather than an addon.

    2. Jojo said on June 27, 2016 at 5:52 pm
      Reply

      I’m a bit cluless when it comes to using scripts….
      How do I know its safe\reliable [in general, not comparing to an ad-on which is worse of crs]
      The source code shown is the only code used?
      Would there be way to disable the script’s action [with a click or so, or only ‘complicated long way’]? ‘cuz if it will fail to improve performance \worse – that wpuld be needed…

      Thanks in advance!!!

      1. Tom Hawack said on June 27, 2016 at 7:15 pm
        Reply

        You need a “script runner” (or whatever it’s called) for your browser. One of the very few is the GreaseMonkey add-on.

        You are right, be careful with scripts, even if those found on the Greasyfork site (same boss as UserStyles) are verified, as far as I know.

        Whatever script running, if you disable the browser’s javascript (javascript.enabled set to ‘false’ in Firefox) no script will run, including those added by the user with GreaseMonkey.

        GreaseMonkey add-on has a toolbar button where you can enable/disable all scripts or each individually (if running on the page) OR you have GreaseMonkey’s Options where all scripts appear and can be disabled/enabled/removed.

    3. chuck- said on June 28, 2016 at 11:17 am
      Reply

      this script is extracted by the addon javascript.
      anyway, it does not allow to ignore 60fps videos, which someone may need.

      i modified the script to do so, but for a less ‘power-user’ the addon is preferable.

      1. Tom Hawack said on June 28, 2016 at 2:54 pm
        Reply

        What script are you referring to, chuck- ? The one I mentioned, at GreasyFork, developed by wazz up, is dated (updated) 2015-03-09.

  4. locanda said on June 27, 2016 at 1:12 pm
    Reply

    Apparently not useful on my old machine, even with NVidia graphics acceleration (Firefox Advanced options set to use hardware acceleration if available). More dropped frames, greater lag of video to audio.

  5. Jeff-FL said on June 27, 2016 at 2:47 pm
    Reply

    Does this require ‘use hardware acceleration when available’ be checked in Firefox options to get the benefit from?

  6. King Arthur of the Saxons said on June 27, 2016 at 11:17 pm
    Reply

    Fair and useful point. I also used to use that “open with” extension for about a year. It worked, but later I got into the habit of dragging things about the screen, and after that it seemed easier for me to drag the video link. That way I do not have to right click and open the menu. It is a personal choice, I suppose. It also meant that I had one less extension in Firefox.

  7. King Arthur of the Saxons said on June 27, 2016 at 11:24 pm
    Reply

    FU_EU, that is a fair and useful comment for those who did not know about that particular extension. I also used to use that “open with”extension for about a year. Then, I got into the habit of dragging other things about the screen and then felt that I preferred dragging video links. It saved me the trouble of right clicking. It also meant one less extension in Firefox. It is a personal choice, I suppose. Some people like to right click; others prefer dragging.

  8. King Arthur of the Saxons said on June 27, 2016 at 11:28 pm
    Reply

    Sorry, FU_EU, I forgot to add something for other people’s benefit.
    Incidentally, I meant dragging links into the screen of SMplayer; not into the terminal. I am not sure that works for everybody.

  9. Okana said on June 27, 2016 at 11:41 pm
    Reply

    He did not say “dragging links on youtube-dl”.

    He said “dragged into the SMplayer screen”. That is different.

    SMplayer still has its own internal Youtube code, but recently it has begun not be as good as SMplayer with the linked MPV – youtube-dl part. I think the intention is to replace SMplayer with the MPV/youtube-dl part only.

  10. Moftare said on August 11, 2016 at 7:37 am
    Reply

    Users can also improve firefox speed by optimizing RAM when it is minimize and reduce page rendering duration!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.