Giter Site home page Giter Site logo

proprietary / chromium-widevine Goto Github PK

View Code? Open in Web Editor NEW
153.0 2.0 23.0 20 KB

How to install Widevine on Chromium on Linux; how to watch Netflix on Chromium Ubuntu or Debian

License: Apache License 2.0

Shell 66.26% HTML 33.74%
chromium widevine drm linux google-chrome debian chromium-browser ungoogled-chromium

chromium-widevine's Introduction

Installing Widevine on Chromium on GNU/Linux

Or: How to get Spotify/Netflix working on Chromium in Linux

Most distributions' package managers come with Chromium but without Widevine, a proprietary binary blob required for DRM protected content (e.g., Netflix or Spotify). Normally your only option to access DRM-protected content would be to use Google Chrome or Mozilla Firefox, but here are some alternate ways you can keep using stock Chromium.

Instructions are for Debian GNU/Linux amd64; should work for other Debian-based distros like Ubuntu.

(easiest) Install Google Chrome and use its Widevine distribution

Install Google Chrome stable (beta or unstable won't work)

Skip this if you already have it.

$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$ echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
$ sudo apt update && sudo apt install -y google-chrome-stable

Run script

The following script symlinks Google Chrome's Widevine library to Chromium's directory.

Paste this into your terminal:

git clone https://github.com/proprietary/chromium-widevine.git && \
	cd chromium-widevine && \
	./use-from-google-chrome.sh

Test Widevine

Paste into terminal (warning: restarts Chromium):

killall -q -SIGTERM chromium-browser || \
	killall -q -SIGTERM chromium && \
	exec $(command -v chromium-browser || command -v chromium) ./test-widevine.html &

…Or manually:

  1. Restart Chromium. If it was already open, then go to chrome://restart.
  2. Make sure Protected Content is enabled in settings: chrome://settings/content/protectedContent.
  3. Open test-widevine.html from this cloned repo in Chromium.

…Alternatively, visit Netflix, Spotify, or $DEGENERATE_DRM_CONTENT_PROVIDER to see if it works directly.

Limitations

  • Some streaming sites refuse to run at all on Linux because the kernel does not provide access to chipset-level fencing of DRM decryption as provided by Microsoft and Apple systems.
  • These scripts assume a standard instlalation from Debian/Ubuntu packages. If you installed Google Chrome or Chromium manually, you might have to edit the scripts.
  • Because we are installing files directly to /usr (as opposed to the more appropriate /usr/local), and we have to for Chromium to find Widevine, on system upgrades your package manager might clobber these files, and you will have to redo these steps.
  • These instructions only work for amd64 (64-bit x86_64) on GNU/Linux. For alternate architectures like ARM or i386 (32-bit x86), please fork this and submit a pull request.

(alternative) Install Widevine alone without Google Chrome

Paste this into your shell:

git clone https://github.com/proprietary/chromium-widevine.git && \
	cd chromium-widevine && \
	./use-standalone-widevine.sh && \
	killall -q -SIGTERM chromium-browser || \
	killall -q -SIGTERM chromium && \
	exec $(command -v chromium-browser || command -v chromium) ./test-widevine.html &

The first method using Google Chrome just copied one directory from its installation. Observe the Widevine directory in the Google Chrome distribution:

/opt/google/chrome/WidevineCdm
├── LICENSE
├── manifest.json
└── _platform_specific
    └── linux_x64
	        └── libwidevinecdm.so

We don't actually need the whole Google Chrome installation. We can recreate that tree in the Chromium directory (i.e., /usr/lib/chromium) with a standalone distribution of the Widevine shared library. Copying just libwidevinecdm.so into /usr/lib/chromium doesn't work.

N.B. Disadvantage of this method: You might have to manually re-run this script whenever Chromium updates to get the latest Widevine. The first method piggybacks Google Chrome's distribution which is assumed to be up-to-date and updated by the same package manager that updates Chromium. Use that method unless you really don't want Google Chrome on your system.

chromium-widevine's People

Contributors

bernardkkt avatar jarrellmark avatar proprietary 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

chromium-widevine's Issues

Not working on Fedora 32

I ran use-standalone-widevine.sh but it's not detecting the plugin.
FYI Chromium is installed in the /usr/lib64/chromium-browser on Fedora 32.

Ungoogled Chromium Flatpak support

I tried this for ungoogled chromium flatpak and it is not working. Any suggestion on how to get it working?
Also the ungoogled chromium website has a guide but not for flaptak
Thank you

It doesn't work

Yea it doesn't work. Netflix isn't working. Using ubuntu 20.04 with chromium beta PPA.

Running on Debian - dash doesn't support double bracket

Please adjust the scripts so it doesn't throw errors like [[: not found
On my Debian machine, /bin/sh is a link to dash, not bash

Thank you.

$ ./use-standalone-widevine.sh
./fetch-latest-widevine.sh: 13: [[: not found
/usr/bin/wget
/usr/bin/curl
./fetch-latest-widevine.sh: 19: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 133 100 133 0 0 621 0 --:--:-- --:--:-- --:--:-- 618
./fetch-latest-widevine.sh: 25: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6561k 100 6561k 0 0 9163k 0 --:--:-- --:--:-- --:--:-- 9163k

Update script for Python3

This script does the trick, but does not work on Ubuntu 22.04 since 'python' (python 2.7) is not installed.

If you install the python-is-python3 package it works, but maybe the script could be updated to call python3 instead of 'python' does not exist. Since it's just a one-liner it works fine with a python 3.x interpretter.

Arguments for curl are incorrect.

I needed to edit this script as follows before it would download correctly:

diff --git a/fetch-latest-widevine.sh b/fetch-latest-widevine.sh
index 5d31ffe..99c2c25 100755
--- a/fetch-latest-widevine.sh
+++ b/fetch-latest-widevine.sh
@@ -14,8 +14,11 @@ esac
 
 # Detect wget/curl
 DLTOOL=""
-which wget && DLTOOL="wget -O -"
-which curl && DLTOOL="curl -L"
+if which wget; then
+    DLTOOL="wget -O -"
+elif which curl; then
+    DLTOOL="curl --remote-name -L"
+fi
 [[ -z ${DLTOOL} ]] && echo "No download tool found on this system" 1>&2 && exit 1
 
 # Begin download

I must assume that most people are using wget, and do not have curl installed on their systems.

fetch-latest-widevine.sh - not found?

Hello,

i tried your alternative route for chromium

however, i get errors on ubuntu 20.04

`npacking objects: 100% (36/36), 14.36 KiB | 1.79 MiB/s, done.
./fetch-latest-widevine.sh: 13: [[: not found
/usr/bin/wget
/usr/bin/curl
./fetch-latest-widevine.sh: 19: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 145 100 145 0 0 1450 0 --:--:-- --:--:-- --:--:-- 1450
./fetch-latest-widevine.sh: 25: [[: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6180k 100 6180k 0 0 11.2M 0 --:--:-- --:--:-- --:--:-- 11.2M

[1]+ Stopped git clone https://github.com/proprietary/chromium-widevine.git && cd chromium-widevine && ./use-standalone-widevine.sh && killall -q -SIGTERM chromium-browser || killall -q -SIGTERM chromium && exec $(command -v chromium-browser || command -v chromium) ./test-widevine.html
`

How to do this on Windows?

I am running ungoogled chromium 101.0.4951.41, is there a way to link or add the extension/module into it from normal chrome on Windows?
It seems I'm unable to find anything about it.

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.