web-dev-qa-db-fra.com

Utilisation du paquet Debian chrome-widevine

Depuis au moins Debian 9 (stretch), Debian contient le paquet contrib chromium-widevine. La description de ce package est:

Ce package prend en charge le module de décryptage de contenu Widevine.

Cependant, après avoir installé ce package, je ne trouve aucun signe que Chromium reconnaît ou charge ce plugin. L'emplacement de Widevine dans ce package est /usr/lib/chromium/libwidevinecdmadapter.so.

Mon utilisation actuelle de ce package est de lire Amazon Prime Video sur Chromium. Actuellement, je reçois l'erreur:

Votre navigateur Web manque un composant de droits numériques. Accédez à Chrome: // composants et sous WidevineCdm, cliquez sur Rechercher les mises à jour.

les composants chrome: // ne répertorient pas WidevineCdm sous Chromium.

Pour extra bizarre, je reçois:

root@orwell:/usr/lib/chromium# ldd libwidevinecdmadapter.so 
        linux-vdso.so.1 (0x00007ffccbfad000)
        libwidevinecdm.so => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08c6e5b000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f08c6ad3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08c6733000)
        /lib64/ld-linux-x86-64.so.2 (0x000055e84bdbe000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f08c642b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08c6213000)

Donc libwidevinecdm.so ne résout rien?

Une idée de ce que je suis censé faire ici? Le chromium-widevine n'a aucune documentation ni indication sur la façon dont on est censé procéder.

REMARQUE: cette question est obsolète, au moins depuis Debian 10/buster, car le paquet chrome-widevine n'existe plus.

10
Faheem Mitha

Je n'ai pas eu de chance avec Netflix avec chromium-widevine sur debian 9.3 du repo contrib. Ce que j'ai fait, c'est:

wget https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.Zip
unzip 1.4.8.1008-linux-x64.Zip
Sudo mkdir /usr/lib/chromium
Sudo mv libwidevinecdm.so /usr/lib/chromium
Sudo chmod 644 /usr/lib/chromium/libwidevinecdm.so
9
a_z

J'ai mis à jour un script trouvé sur Arch Linux pour télécharger et installer Widevine en chrome. Il vous suffit de mettre à jour le chemin d'accès au répertoire d'installation de chrome. La principale différence est qu'il installera également le manifeste inclus dans l'archive téléchargée et de cette façon peut afficher la version Widevine via les composants chrome: // en chrome. C'est ici:

#!/bin/sh

# For ARM use this instead
# https://Gist.github.com/ruario/19a28d98d29d34ec9b184c42e5f8bf29

available () {
  command -v "$1" >/dev/null 2>&1
}

# Make sure we have wget or curl
if available wget; then
  SILENT_DL="wget -qO-"
  LOUD_DL="wget"
Elif available curl; then
  SILENT_DL="curl -s"
  LOUD_DL="curl -O"
else
  echo "Install wget or curl" >&2
  exit 1
fi

# Set Output dir
#WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/opt/google/chrome}"
#WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/usr/lib/chromium}"
WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/usr/lib/chromium-browser}"

# Use the architecture of the current machine or whatever the user has set
# externally
Arch="${Arch:-$(uname -m)}"
case "$Arch" in
  x86_64) WIDEVINE_Arch="x64" 
          WIDEVINE_INSTALL_DIR="$WIDEVINE_DIR/WidevineCdm/_platform_specific/linux_x64" ;;
    i?86) WIDEVINE_Arch="ia32" 
          WIDEVINE_INSTALL_DIR="$WIDEVINE_DIR/WidevineCdm/_platform_specific/linux_x86" ;;
    arm*) echo "For ARM use https://Gist.github.com/ruario/19a28d98d29d34ec9b184c42e5f8bf29 instead" >&2 ; exit 1 ;;
       *) echo "The architecture $Arch is not supported." >&2 ; exit 1 ;;
esac

# Set temp dir
TMP="${TMP:-/tmp}"

# Set staging dir
STAGINGDIR="$TMP/widevine-staging"

# Work out the latest Widevine version
#WIDEVINE_VERSION="${WIDEVINE_VERSION:-$($SILENT_DL https://dl.google.com/widevine-cdm/current.txt)}"
WIDEVINE_VERSION="${WIDEVINE_VERSION:-$($SILENT_DL https://dl.google.com/widevine-cdm/versions.txt | tail -n1)}"
echo latest Version: $WIDEVINE_VERSION

# Error out if $CDMVERISON is unset, e.g. because previous command failed
if [ -z "$WIDEVINE_VERSION" ]; then
  echo "Could not work out the latest version; exiting" >&2
  exit 1
fi

# Find current installed version
INSTALLED_VERSION=$(grep '"version":' $WIDEVINE_DIR/WidevineCdm/manifest.json|cut -f4 -d'"')

# Don't start repackaging if the same version is already installed
if [ $WIDEVINE_VERSION = $INSTALLED_VERSION ]; then
  echo "The latest Widevine ($WIDEVINE_VERSION) is already installed"
  exit 0
fi

# If the staging directory is already present from the past, clear it down and
# re-create it.
if [ -d "$STAGINGDIR" ]; then
  rm -fr "$STAGINGDIR"
fi

# Stop on any error
set -eu

# Make and switch to the staging directory
mkdir -p "$STAGINGDIR"
cd "$STAGINGDIR"

# Now get the latest widevine Zip for the users architecture
$LOUD_DL "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip"

# Extract the contents of Widevine package
if available unzip; then
  unzip "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" libwidevinecdm.so
  unzip "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" manifest.json 
Elif available bsdtar; then
  bsdtar xf "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" libwidevinecdm.so
  bsdtar xf "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" manifest.json
else
  # The user's system has no obvious handler for Zip files. GZip can extract
  # the first entry from a Zip. If libwidevinecdm.so is the first entry, we
  # might just pull this off! ;)
  missing_extractor_error () {
    echo "Install InfoZip Unzip or BSD tar" >&2
    exit 1
  }
  # Look in first 50 bytes for libwidevinecdm.so as it'll be mentioned there
  # if it is the first entry in the Zip
  if head -c50 "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" | grep -Fq libwidevinecdm.so; then
    # Hide the warning about multiple entries and ensure an exit code of 0
    gzip -d < "${WIDEVINE_VERSION}-linux-${WIDEVINE_Arch}.Zip" > libwidevinecdm.so 2> /dev/null ||:
    # Check that it looks like an executable
    if ! file libwidevinecdm.so | grep -Fq ELF; then
      missing_extractor_error
    fi
  else
    missing_extractor_error
  fi
fi

# Add version number file
#touch "widevine-$WIDEVINE_VERSION"
#SED_PAR="s/\"version\": \".*\"/\"version\": \"$WIDEVINE_VERSION\"/"
#if [ -e $WIDEVINE_DIR/WidevineCdm/manifest.json ]; then
#  sed $WIDEVINE_DIR/WidevineCdm/manifest.json -e "$SED_PAR" >$STAGINGDIR/manifest.json
#fi

# Escalate privileges if needed and copy files into place
#SED_PAR="s/\"version\": \".*\"/\"version\": \"$WIDEVINE_VERSION\"/"
if [ "$USER" = "root" ]; then
  install -Dm644 libwidevinecdm.so "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so"
  if [ -e $STAGINGDIR/manifest.json ]; then
#     mv $WIDEVINE_DIR/WidevineCdm/manifest_neu.json $WIDEVINE_DIR/WidevineCdm/manifest.json
     install -Dm644 manifest.json "$WIDEVINE_DIR/WidevineCdm/manifest.json"
  fi
Elif [ -r /etc/os-release ] && grep -qxE 'ID=((ubuntu)|(debiiian))' /etc/os-release; then
  echo "Calling Sudo ... If prompted, please enter your password so Widevine can be copied into place"
  Sudo  install -Dm644 libwidevinecdm.so "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so"
  if [ -e "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so" ]; then
    if [ -e $STAGINGDIR/manifest.json ]; then
      Sudo install -Dm644 manifest.json "$WIDEVINE_DIR/WidevineCdm/manifest.json"
    fi
  else
    echo "Something went wrong installing libwidevinecdm.so" >&2
    exit 1
  fi
else
  echo "Please enter your root password so Widevine can be copied into place"
  su -c "sh -c \"install -Dm644 libwidevinecdm.so $WIDEVINE_INSTALL_DIR/libwidevinecdm.so && install -Dm644 manifest.json $WIDEVINE_DIR/WidevineCdm/manifest.json\""
fi

# Tell the user we are done
echo "Widevine ($WIDEVINE_VERSION) installed into $WIDEVINE_INSTALL_DIR/"
0
trupf

Debian déclare que tous les paquets inclus dans la distribution officielle sont des logiciels libres, mais les bibliothèques Widevine CDM ne sont pas dans cette catégorie. Il y a un blob binaire disponible dans le Build de référence Chrome cependant.

0
Fox