truedread / netflix-1080p

Chrome extension to play Netflix in 1080p and 5.1
MIT License
2.76k stars 303 forks source link

Test patterns work, "Black Lightning" doesn't. #2

Closed rmontale closed 6 years ago

rmontale commented 6 years ago

Hi,

Just yesterday I tried watching the "Black Lightning" TV Show and it wasn't running in 1080p. When I ran the test patterns they worked in 1080p just fine and I assumed everything would be running in 1080p, but the show didn't.

Do you have any idea why? For the record, I went to my PS4's Netflix app and the show was running in 1080p there.

I believe it can be easily reproduced (I wasn't able to check any other videos but "Black Lightning" TV show, so I can't say for real if others are working or not).

Thanks,

Rod

truedread commented 6 years ago

What region is this show available in? It doesn't seem to be in US.

Also, what might be occurring is that Netflix is enforcing a harder restriction on 1080p for that video. I saw it months ago with Malcolm in the Middle, where even with my mod Chrome would not play 1080p unless I modded the core player heavily. If that's the case, I can look into updating the extension to handle such videos but it would be a very extensive mod, but possible.

rmontale commented 6 years ago

I'm in Brazil. It's probably Netflix's hard enforcing then. If you ever feel bored or just want to create that heavy modded extension, I'm all in. If you don't, thanks anyway for your current extension.

dirrgang commented 6 years ago

Same is happening for me. 1080p didn't work for various movies and TV shows. Works for: Altered Carbon Black Mirror

Doesn't work for: Monsters University Wreck-It Ralph Grimm Zootopia

At first glance it seems like only Netflix productions work.

truedread commented 6 years ago

@aneyeforsecrets For the ones that don't work in Chrome, have you checked Edge to make sure Netflix even has the licensing to stream such videos in 1080p? If not, there's nothing I can do about that.

dirrgang commented 6 years ago

I know for certain that the videos in question are available in 1080p - which is why I used them to test if it works.

Verequies commented 6 years ago

I think that the modified version would be great, I also noticed a few shows that did not play in 1080p on Chrome.

truedread commented 6 years ago

I’ll look into it then - it would involve getting a manifest twice, once with the Edge ESN for proper 1080p links, and another with the Chrome ESN so the JS could have a proper PlaybackContextID to use for license acquisition with the widevine CDM (the MSL api won’t allow clients authenticated with the Edge ESN to acquire licenses with a widevine license request). Due to the obfuscation that is the cadmium playercore JS, I would likely need to implement my own manifest acquisition function, either that or do some more research into how the JS obtains its manifests. Either way, I’ll try my best to get it done.

truedread commented 6 years ago

So I finally got around to writing an MSL client in JavaScript since I didn't want to meddle with the obfuscated mess that is the cadmium playercore. I committed it to a new beta branch; you can find the release here: https://github.com/truedread/netflix-1080p/releases/tag/1.2.9. I have not updated the extension on the Chrome webstore because I don't believe my update is production ready yet. However if you enable Chrome developer mode you can load unpacked extensions to test. Please let me know how the tests go with the new update!

Verequies commented 6 years ago

Awesome work! On some quick testing it seems to be working great so far :D Will do some more testing later on.

fariss commented 6 years ago

If I hit Alt+Ctrl+Shift+S, does that mean the extensions is going to unlock more video bitrates? I usually get 3000 kbps but after this extension I noticed that high bitrates were available. Thank you.

truedread commented 6 years ago

@soufianefariss Yes this extension plays videos in 1080p.

@rmontale and @aneyeforsecrets, do the videos now play in 1080p with the beta branch?

dirrgang commented 6 years ago

Monsters University - Playing bitrate (a/v): 64 / 6810 (1920x1080) Wreck-It Ralph - Playing bitrate (a/v): 96 / 4036 (1920x1080) Grimm - Playing bitrate (a/v): 96 / 5360 (1920x1080) Zootopia - Playing bitrate (a/v): 96 / 4640 (1920x1080)

Looking good!

ypnos commented 6 years ago

Can confirm, it works great. An occasional page reload is necessary as was mentioned.

Finally I get the service that I am already paying for. Why the nonsense, Netflix?

dikamilo commented 6 years ago

1.2.9 beta version is not working:

There was an unexpected error. Please reload the page and try again.

Error Code: M7111-1309

In dev tools console: VM685:1 POST https://customerevents.netflix.com/track/debug net::ERR_CERT_AUTHORITY_INVALID

ypnos commented 6 years ago

Hello @dikamilo, did you try to reload the page? I always get this error on the very first video I want to watch only.

dikamilo commented 6 years ago

@ypnos yep, reloaded and cleaned cookies/sessions etc. and still the same

truedread commented 6 years ago

@dikamilo Is that the only error in the console?

kostasvl commented 6 years ago

This beta version fixed Thor 2 for me. Thanks!

Cysioland commented 6 years ago

Came here from #7. Tried beta, now it causes #8, with the exception of refresh fixing only audio, and video just constantly loading and loading.

On master it simply doesn't do any good. Moana/Vaiana: Playing bitrate (a/v): 96 / 2260 (853x480) The Good Place S01E01: Playing bitrate (a/v): 96 / 1540 (853x480)

ypnos commented 6 years ago

I have the same problem. This release doesn't work anymore (only audio works), and current (newer) release seems to have no effect.

Cysioland commented 6 years ago

Also, oddly, on Chrome Web Store version, on Aggretsuko I get Playing bitrate (a/v): 96 / 5110 (1920x1080). So, it's some movie studio politics, probably, which determines, how much they secure the content.

truedread commented 6 years ago

@Cysioland and @ypnos the latest beta commit should fix the issues you are having.

Cysioland commented 6 years ago

@truedread Now it loads for a longer time, but, alas, it works. The Good Place S01E01: Playing bitrate (a/v): 96 / 7500 (1920x1080) Moana/Vaiana: Playing bitrate (a/v): 96 / 6190 (1920x1080)

truedread commented 6 years ago

@Cysioland it loads longer because it has to acquire two manifests, one with Chrome DRM info and another with 1080p links. Glad it works.

Cysioland commented 6 years ago

@truedread There seems to be a problem with it continuing to the next episode, it being fixed with a refresh

truedread commented 6 years ago

@Cysioland does the extension not auto refresh?

Cysioland commented 6 years ago

@truedread No, because it stays loading at 99% and not errors out

ypnos commented 6 years ago

Works great for me, also auto refresh works here as intended.

ObiWanTwo commented 6 years ago

Since you've added the acquisition of the license of Edge to the extension, is it possible to enforce the 5.1 also, or at least higher bitrates for the 2.0? Thanks

truedread commented 6 years ago

@Answer-Man I'd love to implement this, but unfortunately, Netflix only has three audio codecs: AAC (with and without SBR), AC-3, and E-AC-3. Chrome only supports demuxing and parsing non-SBR AAC. There are unofficial builds of Chromium that try to implement support for AC-3 and E-AC-3 along with HEVC, but I don't support these as they can cause extra issues. AAC has 64kbps and 96kbps bitrates on 2.0, AC-3 has 384kbps on 5.1, and E-AC-3 has 128kbps on 2.0, and 192kb/s on 5.1. While I'd love to up the bitrates for audio, it just simply isn't possible with the audio codecs that Chrome supports.

ObiWanTwo commented 6 years ago

I see, thank you for your detailed answer. Edit: On Edge this seems to work

var customProfiles=["playready-h264mpl30-dash",
    "playready-h264mpl31-dash",
    "playready-h264mpl40-dash",
    "heaac-2-dash",
    "ddplus-2.0-dash",
    "ddplus-5.1-dash",
    "dfxp-ls-sdh",
    "simplesdh",
    "nflx-cmisc",
    "BIF240",
    "BIF320"]

However adding "dd-5.1-elem" makes the player crash. Injecting the modified script through Fiddler for Edge works perfectly but not with the extension, even after modifying chrome calls by browser and setting the persistent tag to true.

browser.webRequest.onBeforeRequest.addListener(
    function(details) {
        return {
            redirectUrl: browser.extension.getURL("cadmium-playercore-6.0009.543.031-1080p-5.1")
        };
    }, {
        urls: [
            "*://assets.nflxext.com/*/ffe/player/html/*",
            "*://www.assets.nflxext.com/*/ffe/player/html/*"
        ]
    }, ["blocking"]
);

I'm notified by the console that the redirection worked as expected but the player loops indefinitely.

truedread commented 6 years ago

@Answer-Man Yes, because like I said, Chrome does not support any other codec that Netflix streams, only AAC. Edge supports it, but not Chrome. Netflix does its web streaming through something called MSE, in which streams are added as "source buffers". There's a way to check if a source buffer type is supported, it's by running the method MediaSource.isTypeSupported(). Netflix runs that for every video/audio profile in the array before it even streams a video, and if it returns false, it won't even try streaming it. Even if it did stream it, Chrome would refuse to play it since it doesn't support it. You can mess around with forcing those profiles in Edge, but in terms of Chrome, I won't be able to support it, unfortunately.

ObiWanTwo commented 6 years ago

@truedread I didn't explain myself well, I was in no way trying to make it work with Chrome. I just tried adapting your extension to make it work for Edge while pushing 5.1 profiles, but it didn't seem to work for whatever reason.

truedread commented 6 years ago

@Answer-Man Oh, if you want to have 5.1 profiles in edge you were doing it right. You just can't have both AC-3 and E-AC-3 playing at the same time, it messes things up for some reason. If you want 384kbps AC-3, use this profile set:

var customProfiles = [
    "playready-h264mpl30-dash",
    "playready-h264mpl31-dash",
    "playready-h264mpl40-dash",
    "dd-5.1-dash",
    "heaac-2-dash",
    "simplesdh",
    "nflx-cmisc",
    "BIF240",
    "BIF320"
]

If you would rather have 192kbps E-AC-3 5.1 with the possibility of 448kbps atmos E-AC-3 5.1, use this profile set:

var customProfiles = [
    "playready-h264mpl30-dash",
    "playready-h264mpl31-dash",
    "playready-h264mpl40-dash",
    "ddplus-atmos-dash",
    "ddplus-5.1-dash",
    "ddplus-2.0-dash",
    "heaac-2-dash",
    "simplesdh",
    "nflx-cmisc",
    "BIF240",
    "BIF320"
]

However, if you want to adapt this to some kind of extension for Edge, it won't work. I tried it a while ago and Edge wouldn't properly redirect traffic to a local file.

ObiWanTwo commented 6 years ago

@truedread Thanks. Even though it says that the redirection happened successfully, the player just won't start. There seems to be an issue with Edge's API.

truedread commented 6 years ago

I have finally implemented a decent method of dynamic manifest acquisition. If anyone is interested, I've updated the README with new info relating to it. As for the extension, the main version on the Chrome Webstore should work for any problematic videos. Finally closing this issue.

MoudiPuff commented 5 years ago

Anyone can give me a decent way to play the extension on chrome? or t least how to push 128kbps to play inside any browser? Im trying to get the raw files but all what I see available for stereo is 64k/96k, however it will be nice to have access to 128k, any help?