Code Monkey home page Code Monkey logo

h264ify's Introduction

h264ify

About

h264ify is a Chrome/Firefox extension that makes YouTube stream H.264 videos instead of VP8/VP9 videos.

Try h264ify if YouTube videos stutter, take up too much CPU, eat battery life, or make your laptop hot.

By default, YouTube streams VP8/VP9 encoded video. However, this can cause problems with less powerful machines because VP8/VP9 is not typically hardware accelerated.

In contrast, H.264 is commonly hardware accelerated by GPUs, which usually means smoother video playback and reduced CPU usage.

Requirements

Google Chrome

Looking for the Firefox version? See: https://github.com/erkserkserks/h264ify-firefox

Installation

Install from here: https://chrome.google.com/webstore/detail/h264ify/aleakchihdccplidncghkekgioiakgal

Note: [You may need to enable GPU acceleration as well] (http://www.webupd8.org/2014/01/enable-hardware-acceleration-in-chrome.html)

If all goes well, when you visit https://www.youtube.com/html5, you should see this:

h264ify's People

Contributors

erkserkserks avatar kevinxucs avatar mikkcz avatar uwx avatar xbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

h264ify's Issues

No 4K Quality Option

I have no 4K quality option on YouTube when I enable this extension, please fix this 😕

Add h264ify for all websites?!

Can you add a option to enable h264 for all websites? I use chromium (win 8) and I find not a flag to disable webm vp stuff.
In firefox there is the possibility to do this in about:settings but not chromium.
Maybe you have a flag or could add it in your extension. :)
And thanks a lot for your work. Best regards.

ps sry for bad english, I'm german xD

Low Video Quality

Can you improve the video quality of the codec because when I enable the extension the YouTube videos get a little blurry and when I disable the extension and play YouTube videos with the VP9 codec the videos are sharp

Extension icon is greyed out and extension is not working

From what I've read, this means that the extension was installed from outside of the app store, but that's not true with how I installed this extension. Does it need an update? I've already updated chrome and uninstalled and reinstalled the extension.

Embed Into Website

Hello,

I am a developer of a game addon which uses YouTube embedded player as its video player. We host the embedded player on a site on GitHub Pages. However, the game in which it plays has a very outdated chromium that is very glitchy with any

<head>

<script>
function inject () {
console.log("MP4 / WEBM DISABLE RAN");
  // return a custom MIME type checker that can defer to the original function
  function makeModifiedTypeChecker(origChecker) {
    // Check if a video type is allowed
    return function (type) {
      if (type === undefined) return '';
      var disallowed_types = ['webm', 'vp8', 'vp9', 'mp4', 'video/mp4', 'avc1'];
      // If video type is in disallowed_types, say we don't support them
      for (var i = 0; i < disallowed_types.length; i++) {
        if (type.indexOf(disallowed_types[i]) !== -1) return '';
      }
      // Otherwise, ask the browser
      return origChecker(type);
    };
  }
  // Override video element canPlayType() function
  var videoElem = document.createElement('video');
  var origCanPlayType = videoElem.canPlayType.bind(videoElem);
  videoElem.__proto__.canPlayType = makeModifiedTypeChecker(origCanPlayType);
  // Override media source extension isTypeSupported() function
  var mse = window.MediaSource;
  // Check for MSE support before use
  if (mse === undefined) return;
  var origIsTypeSupported = mse.isTypeSupported.bind(mse);
  mse.isTypeSupported = makeModifiedTypeChecker(origIsTypeSupported);
}
	
inject();
</script>
</head>

By debugging and placing console.logs I have verified that it does indeed run, but it does not disable the video types. It works when in the addon but not embedded on the website, it is the same browser as well. Any help would be greatly appreciated!

Safari support?

Would it be possible to port the extension itself to safari or make it into a Greasemonkey script that way it can be installed on any browser

Forever loading

treat you better shawn mendes piano cover by maddie wilson youtube
download 2
Works great but some time when i play videoit keeps loading and loading. Is not connection problem because even video is buffered but video will keep on loading
I'm on windows 7 ultimate and chrome version is 56.0.2924.87

Blocks video on Twitter

For some reason I see “unable to play video” message in Twitter when this extension is on. Video plays if I turn it off.

searching wont load

if you search something it doesnt load, maybe add a toggle on/off to the icon too

Force Youtube to use 30fps version of 1080p and 720p?

For older AMD APUs such as the Zacate E350 which I personally have, hardware h264 decode supports end at 1080p 30fps.

So with any Youtube video that is 60fps, I am out of luck as video stutters like no tomorrow and is unwatchable.

I can watch these videos in 1080p30 in Internet Explorer so the streams are there, just not exposed to Chrome.

Is it possible to add an option to force videos to 30fps even when 60fps is available?

Suddenly can't seek through timeline.

I used this extension for a long time and I loved it but recently (yesterday?) videos started to lag and I couldn't seek through timeline. Disabling this extension makes me able to seek but my old laptop can't play 1080p@60 videos without it =(
Please help me.

[RESEARCH] Chromium support?

Dear @erkserkserks, could you investigate why h264ify makes no expected impact on Chromium 44? Yes, it disables WebM, but H264 is still not available. P.S. GPU page says acceleration’s enabled.

4k 60fps support?

I noticed that when I installed this extension 4k60fps option was removed on videos that have 4k60fps option.

Microsoft Edge support

I used this extension for Chrome but since, Edge has snatched me (Mainly because I agree that internet browsers should have a fair share of the browsing ecosystem and chrome owns more than 75% of it) and from what iv seen with the differences of the Chromes and Edges extension api's, they don't seem that different.

I would help make this but I know very little about video codecs and don't feel like I am skilled enough to contribute to this extension yet.

Quickly toggle H264ify by clicking on the toolbar icon

Now that H264 4K has been deprecated, I find myself wanting to disable H264ify / enable VPx for some videos.

Currently, if a user would like to watch a video in 4K (and can stand the additional CPU usage / battery drain), they would have to enter H264ify's options page to toggle the VPx support. It would be easier, and more intuitive, if clicking on the toolbar icon would toggle H264ify.

Remove unused files from Chrome Store

This extension is basically an injected script, but its size is 531KiB, 500KiB of it is noncode used to display readme. You already set a homepage in manifest, if anybody wants description or help, they should go there.

can't play 4k and 8k

h264ify is smoothly can play the low cpu so need the play the youtube to h264ify but h264ify can't play youtube 4k and 8k so surpport youtube 4k and 8k please!

Dropping frames and stuttering on 1080p@60fps videos

My PC is dropping frames and stuttering on 1080p@60fps videos with hardware acceleration enabled or disabled.

With hardware acceleration enabled, the CPU stays at 25% usage, but the stuttering gets worse than with hardware acceleration disabled, with 65% CPU usage. It makes no sense, but it's happening.

Firefox uses the same codec (AVC) and it plays the same videos smoothly with 25% CPU usage - the same as Chrome using H264ify and hardware acceleration enabled.

Do you have any idea what's going on?

Notebook ACER Aspire E1-571
i5-2450m, 6GB DDR3

Video Quality Issue

You can clearly see that the video quality is worse on H264, just look at the logo in the bottom right corner, can you please do something to improve the quality, both of the screenshoted images are in 1080p but the H264 one looks like it's in 720p

H264
h264
VP9
vp9

Option to force a resolution

perhaps i want 1080p forced on all videos where available, or 720p on my laptop so it uses less power?

keep up the good work, my laptop thanks you

Still High CPU Usage

I still have high CPU usage even with the extension enabled, I think that Chrome doesn't use my GPU for the hardware acceleration because it blacklisted it

Option to allow VP9 for 60 fps content

I have the following problem:

Everything plays flawlessly with this extension, except for 60 fps content.
Even with 4K I have no issues. But as soon as I play a 1080p 60fps or 4K 60fps video, it starts lagging.

Turning off h264ify entirely is no solution, because then I can't play 4K content smoothly anymore.

Resolution With h264ify Without h26ify
1080p30 smooth (20% CPU, 30% GPU) smooth (25% CPU, 10% GPU)
1080p60 laggy (10% CPU, 10% GPU) smooth (60% CPU, 20% GPU)
4K30 smooth (60% CPU, 40% GPU) laggy (90% CPU, 0% GPU)
4K60 not available laggy (95% CPU, 0% GPU)

it disables all resolutions above 1080p60

To my great surprise, having this extension active disables all resolutions greater than 1080p60. Disabling the extension immediately made accessible resolutions up to and including 5k, or 2880p60.

Video example: https://www.youtube.com/watch?v=7NicwNXSdbs

youtube-dl output for this video:

$ youtube-dl -F https://www.youtube.com/watch?v=7NicwNXSdbs
[youtube] 7NicwNXSdbs: Downloading webpage
[youtube] 7NicwNXSdbs: Downloading video info webpage
[youtube] 7NicwNXSdbs: Extracting video information
[youtube] 7NicwNXSdbs: Downloading MPD manifest
[info] Available formats for 7NicwNXSdbs:
format code  extension  resolution note
249          webm       audio only DASH audio    4k , opus @ 50k, 76.03KiB
250          webm       audio only DASH audio    4k , opus @ 70k, 76.03KiB
251          webm       audio only DASH audio    4k , opus @160k, 76.03KiB
171          webm       audio only DASH audio    6k , vorbis@128k, 55.29KiB
139          m4a        audio only DASH audio   48k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
140          m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2@128k (44100Hz)
242          webm       362x240    240p   10k , vp9, 30fps, video only, 188.33KiB
133          mp4        362x240    DASH video   10k , avc1.4d400d, 30fps, video only
160          mp4        218x144    DASH video   11k , avc1.4d400c, 30fps, video only
134          mp4        542x360    DASH video   12k , avc1.4d401e, 30fps, video only
278          webm       218x144    144p   16k , webm container, vp9, 30fps, video only, 269.03KiB
243          webm       542x360    360p   16k , vp9, 30fps, video only, 310.37KiB
135          mp4        724x480    DASH video   19k , avc1.4d401f, 30fps, video only
244          webm       724x480    480p   21k , vp9, 30fps, video only, 404.54KiB
136          mp4        1086x720   720p   33k , avc1.4d401f, 30fps, video only, 637.24KiB
247          webm       1086x720   720p   38k , vp9, 30fps, video only, 725.87KiB
302          webm       1086x720   720p60   86k , vp9, 60fps, video only, 1.60MiB
248          webm       1628x1080  1080p   86k , vp9, 30fps, video only, 1.62MiB
298          mp4        1086x720   DASH video  152k , avc1.4d4020, 60fps, video only
137          mp4        1628x1080  1080p  190k , avc1.640028, 30fps, video only, 3.73MiB
303          webm       1628x1080  1080p60  231k , vp9, 60fps, video only, 4.39MiB
271          webm       2170x1440  1440p  353k , vp9, 30fps, video only, 6.77MiB
299          mp4        1628x1080  DASH video  354k , avc1.64002a, 60fps, video only
264          mp4        2170x1440  DASH video  416k , avc1.640032, 30fps, video only
266          mp4        3256x2160  DASH video  803k , avc1.640033, 30fps, video only
308          webm       2170x1440  1440p60  925k , vp9, 60fps, video only, 18.16MiB
313          webm       3256x2160  2160p 2078k , vp9, 30fps, video only, 39.75MiB
138          mp4        4944x3280  DASH video 2449k , avc1.640033, 30fps, video only
315          webm       3256x2160  2160p60 4751k , vp9, 60fps, video only, 92.23MiB
272          webm       4944x3280  2880p60 6338k , vp9, 60fps, video only, 121.91MiB
17           3gp        176x144    small , mp4v.20.3, mp4a.40.2@ 24k
36           3gp        320x212    small , mp4v.20.3, mp4a.40.2
18           mp4        544x360    medium , avc1.42001E, mp4a.40.2@ 96k
43           webm       640x360    medium , vp8.0, vorbis@128k
22           mp4        1086x720   hd720 , avc1.64001F, mp4a.40.2@192k (best)

Blue screen of death

When playing video on YouTube, the computer sometimes (but on a periodic basis) goes to the blue screen of death (this only happens when playing video on YouTube with h264ify enabled)

Intel(R) HD Graphics (Gen7LP) - Intel(R) Atom(TM) CPU Z3795
Microsoft Windows 10 Home (64-bit) v1709 build 10.0.16299.192 (Win10 RS3)

Google Chrome v64.0.3282.140 (64-bit) - Last Stable

After forking and updating code, I'm realizing I should break this off into another project

I forked this project to solve an issue that can be found here with Vivaldi's UI. After playing with the code, I realized I needed to open the inspection of traffic to <all_urls> as opposed to just YouTube as the issue exists everywhere where mp4 files are served (CNN, Twitter Video, Youtube, and more). You can see my fork here and the code works great after some light testing, but I haven't cleaned it up yet to be more efficent since dropping mp4, webm, vp8, and vp9 just results in Flash Player coming up and I'm just making the world a worse place at that point.

Since this project is MIT licensed, I'm going to setup my own repository and work on establishing my own chrome store approval. Since this is the first time I've forked a project, set up a repository, and using a ton of code that was previously created, I wanted to see if you had any preferences in receiving credit for your work in addition to the light terms of the MIT. I'm planning on plugging your project and linking back to here for reference as this isn't possible without seeing this project, is there anything else I can do out of courtesy to you and the contributors? I'm more than happy keeping the code here and setting up a pull request once I clean-up the code to not modify as much as it does in comparison (my fault as a GitHub newbie), but I don't see a way we can be compatible with the need for <all_urls> being needed.

Regards,
Mike

Recent "An error has occurred. Please try again later" errors on Chrome

For the last ~month or so I've noticed YouTube videos would stop working if I seeked position too aggressively (eg, if I tap around on the playback bar to seek around to a different part in the video).

I'm running—

h264ify 1.0.4
Chrome 52.0.2739.2 dev (64-bit)

Disabling h264ify fixes the problem entirely... But it's something I'm reluctant to do since I really like the extension!

Permission to access your data ...

More info please about "... h264ify requires permission to access your data for sites in youtube.com domain...". Could you give more insight on this? With Firefox 57, would this data be also logged on the home computer's Firefox plugin data. Any insight on this matter would be appreciated. Sorry, i'm code illiterate. Using Win7 with Firefox 57.0 64bit. Regards and thank you.

Set only HTMLVideoElement and H.264

Hi guys,

I have a 2008 late macbook pro, this model have a Geforce 9400M i need turn off al the options (wish you can see on https://www.youtube.com/html5) except HTMLVideoElement and H.264.

The plugin work fine for turn off WebM VP8 and MSE & WebM VP9, but still on MSE & H.264 and Media Source Extensions, then my CPU still work a lot.

I have Safari 9.1.3 installed to, and there the only technology on are HTMLVideoElement and H.264 and work fine (the CPU not work).

Your thing is posible set this options?

PD: Sorry about my english, regards from Argentina.

Donate button?

Hey,
I'm really surprised I've never heard about this extension before.. It is a life saver!
Any chance I (and possibly others) can show my gratitude and buy you a beer or something?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.