DavidBuchanan314 / Turbo-Recadmiumator

A remake of truedread/netflix-1080p which auto-patches cadmium-playercore at runtime to enable enhanced playback features. (NOTE: still working in 2024 😎)
MIT License
154 stars 18 forks source link

Install in firefox #4

Open drhashes opened 3 months ago

drhashes commented 3 months ago

How do we install this addon for firefox? The below firefox doc did not help.

From: https://support.mozilla.org/en-US/kb/find-and-install-add-ons-add-features-to-firefox

"For advanced users: You can also install add-ons from a file. If you saved the installer file to your computer, (for example, an .xpi or .jar file) you can install the add-on using the gear icon in the upper-right area of the Add-ons Manager Extensions panel. Select Install Add-on from file... from the menu, then find and select the file."

DavidBuchanan314 commented 3 months ago

I do it through "Load Temporary Add-on" via about:debugging#/runtime/this-firefox

DavidBuchanan314 commented 3 months ago

btw, I might think about repackaging this as a TamperMonkey userscript, which would be easier to install on a permanent basis

22raider commented 3 months ago

Thanks a lot for the work. A more permanent installation method would be greatly appreciated for Firefox, Chome or even Edge.

Moreover, it would be great to have a signed version so that in future browser versions this extension would not be blocked.

drhashes commented 3 months ago

Thx! Netflix 1080 resolution works again now in netflix with firefox.

gnafrgb commented 3 months ago

I do it through "Load Temporary Add-on" via about:debugging#/runtime/this-firefox

Thank you sir. You make Netflix FHD possible again on Firefox!

Do I need to do this every time I open Firefox? Is it possible to install it permanently like a normal add-on? and how do I enable 5.1 audio?

I am a newbie to this. Please excuse me if I asked some stupid question.

DavidBuchanan314 commented 3 months ago

To enable 5.1, set this to true https://github.com/DavidBuchanan314/Turbo-Recadmiumator/blob/50dff66f61a08b95c3206e2766ad4ed8e9bfe706/src/cadmium-playercore-shim.js#L6 (not been tested for a while, no idea if it still works)

gnafrgb commented 3 months ago

Firefox_Screenshot_2024-03-21T17-29-35 007Z

It works. Thank you!

nitz commented 3 months ago

1, thanks for the work in putting this together!

2,

btw, I might think about repackaging this as a TamperMonkey userscript, which would be easier to install on a permanent basis

This would be pretty fantastic for me, would love this approach.

fifv commented 3 months ago

I packed all files in src/ in a zip (the manifest.json at root of the zip), then follow the Firefox add-on Self-distribution documention to sign the add-on, downloaded signed version and added it to firefox, it works!

mattfbacon commented 3 months ago

I was not able to get that to work. When I tried to add the zip file firefox told me that the addon is corrupted.

ashchan commented 3 months ago

@mattfbacon make sure uh are zipping the src files, not the src folder. As mentioned the json file will sit in the zip file root.

mattfbacon commented 3 months ago
/tmp/Turbo-Recadmiumator/src $ zip /tmp/ext.zip *
  adding: background.js (deflated 53%)
  adding: cadmium-playercore-shim.js (deflated 59%)
  adding: manifest.json (deflated 49%)
/tmp/Turbo-Recadmiumator/src $ unzip -l /tmp/ext.zip
Archive:  /tmp/ext.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
     1254  2024-03-26 14:47   background.js
     4166  2024-03-26 14:47   cadmium-playercore-shim.js
      579  2024-03-26 14:47   manifest.json
---------                     -------
     5999                     3 files
fifv commented 3 months ago

@mattfbacon Due to security reason, Firefox can't add unsigned zip as an addon (update: or using some developer flags, see @mattfbacon below), normally we can upload the zip to their website and they will sign the addon (add some certificates to the zip) automatically, the signed zip (normally use .xpi as the extension) can be added to Firefox without warning.

mattfbacon commented 3 months ago

Turns out it was missing the Gecko ID. You can add it as described at https://extensionworkshop.com/documentation/publish/distribute-sideloading/#preparing-your-addon. After adding this I was able to load the unsigned addon (firefox developer edition, where I disabled xpinstall.signatures.required)

k939kk commented 3 months ago

I packed all files in src/ in a zip (the manifest.json at root of the zip), then follow the Firefox add-on Self-distribution documention to sign the add-on, downloaded signed version and added it to firefox, it works!

@fifv would it be possible for you to share the signed version?

ComfortableMilk4454 commented 2 months ago

@k939kk cuz @fifv hasnt given the signed version, i decided to do the same thing as them and share it with yall. heres the link https://addons.mozilla.org/firefox/downloads/file/4269206/42dca5394f5c4c919bc6-0.0.1.xpi. enjoy!

ComfortableMilk4454 commented 2 months ago

@DavidBuchanan314 u should add that link to the readme or sum so ppl can permanently get the extension (as long as mozilla doesnt remove it or something that is)

k939kk commented 2 months ago

@k939kk cuz @fifv hasnt given the signed version, i decided to do the same thing as them and share it with yall. heres the link https://addons.mozilla.org/firefox/downloads/file/4269206/42dca5394f5c4c919bc6-0.0.1.xpi. enjoy!

@ComfortableMilk4454 The link seems to be a zero byte file. Can you recheck or share through any other file sharing site?

ComfortableMilk4454 commented 2 months ago

huh weird it works for me. could u send a screen recording of what happens when u click on it? this is what happens when i click it:

https://github.com/DavidBuchanan314/Turbo-Recadmiumator/assets/43555540/48856283-a93b-4c71-9ee6-e2af4d217659

ComfortableMilk4454 commented 2 months ago

forgot to @ u @k939kk

fifv commented 2 months ago

@k939kk sorry for the late reply, Here's my signed version, Turbo-Recadmiumator-firefox-6f3ad90e4653469ca4e5-0.0.1.zip

with some personal customizations:

I have used this for weeks and it seems work the same as the netlfix-1080p on my machine.

ComfortableMilk4454 commented 2 months ago

@k939kk i could also try to upload it to addons.mozilla.org, i just dont know how to do that as it asks me to choose a license "appropriate for the rights you grant". if you know how to do it let me know and i can get it uploaded to addons.mozilla.org so that you can add it the normal way (see image). i also dont know how to upload the xpi to another file sharing site as i dont actually have the xpi as its hosted on the addon developer hub.

image

ComfortableMilk4454 commented 2 months ago

Here's my signed version, Turbo-Recadmiumator-firefox-6f3ad90e4653469ca4e5-0.0.1.zip

oh sick ty @fifv! don't we need the xpi tho not a zip? cuz when i unzipped this is all i see:

image image
ComfortableMilk4454 commented 2 months ago

also @fifv can u send the signed addon with the default configuration?

fifv commented 2 months ago

@ComfortableMilk4454 Sure, here is the default configuration version, Turbo-Recadmiumator-firefox-default-f8c32ea7f3e3423d9ac1-0.0.1.xpi.zip

The .xpi is actually a zip, I renamed it because github doesn't accept upload .xpi but .zip is okay. I have tried add the renamed .zip to firefox and seems works.

ComfortableMilk4454 commented 2 months ago

@fifv adding the default config version worked by going to the firefox add-ons & themes page by pressing ⌘ ⇧ A (or on windows, Ctrl ⇧ A) -> clicking the settings cog -> "install add-on from file" and selecting the zipped file. thanks so much! have a great one!

ComfortableMilk4454 commented 2 months ago

ok so @k939kk & anyone else wondering how to get this program permanently on your firefox (unless you choose to remove it, which you would do by following these directions)—here's how you do it (big thanks to @fifv for getting the xpi signed by firefox):

  1. on your browser of choice, download the zipped version of the xpi but do not unzip it
  2. navigate to a firefox window (make sure its focused)
  3. press ⌘ ⇧ A (or on windows, Ctrl ⇧ A)
  4. click the settings cog at the top
  5. "install add-on from file"
  6. select the zipped file you downloaded
  7. click add
  8. (optional)—choose if you want the extension to run in private windows
  9. click ok
  10. (optional)—remove the zip file from your computer
k939kk commented 2 months ago

@k939kk sorry for the late reply, Here's my signed version, Turbo-Recadmiumator-firefox-6f3ad90e4653469ca4e5-0.0.1.zip

with some personal customizations:

* Use text-based subtitles (`'imsc1.1'`). (So I can style them using CSS)

* Prefer VP9. (So episodes load seamlessly on my machine)

I have used this for weeks and it seems work the same as the netlfix-1080p on my machine.

@fifv Thank you for the version. Just a headsup, probably because of preferring VP9, the max bitrate available is quite low compared to normal setting. ( eg 880 instead of 2400or 3900). Do you think this affects the picture quality or is it the nature of VP9 itself?

fifv commented 2 months ago

@fifv Thank you for the version. Just a headsup, probably because of preferring VP9, the max bitrate available is quite low compared to normal setting. ( eg 880 instead of 2400or 3900). Do you think this affects the picture quality or is it the nature of VP9 itself?

I think 30% difference in bitrate is normal given VP9's theoretically superior efficiency and won't affect quality too much (But if I compress video using ffmpeg, AVC's quality is way better than VP9). But in your case the difference is too large and I suspect there should be a notable gap in quality.

I mostly watch animes and their bitrate are quite low (e.g. 660 for VP9, 900 for AVC), both of them have ringing effects especially in darker scenes. However some series will get way higher bitrate in a AVC mode, (e.g. Vinland Saga, 780 for VP9, 2000 for AVC), I can see the difference if I watch the screen up close.