From c3332a9f36fdbb75e32018e8ff002d97b3787340 Mon Sep 17 00:00:00 2001 From: Ld-Hagen <34414986+Ld-Hagen@users.noreply.github.com> Date: Sun, 29 Aug 2021 15:08:44 +0300 Subject: [PATCH 1/3] Changed API URL Now it will download latest version --- fix-opera.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fix-opera.sh b/fix-opera.sh index ef68a2b..b40bf7b 100644 --- a/fix-opera.sh +++ b/fix-opera.sh @@ -13,11 +13,11 @@ readonly ZIP_FILE='.zip' readonly TEMP_FILE="$TEMP_FOLDER$FILE_NAME" readonly OPERA_FILE="$OPERA_FOLDER$FILE_NAME" -readonly GIT_API=https://api.github.com/repos/iteufel/nwjs-ffmpeg-prebuilt/releases/21966820 +readonly GIT_API=https://api.github.com/repos/iteufel/nwjs-ffmpeg-prebuilt/releases printf '\nGetting Url ...\n' -readonly OPERA_FFMPEG_URL=$(curl -s $GIT_API | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64) +readonly OPERA_FFMPEG_URL=$(curl -s $GIT_API | grep browser_download_url | cut -d '"' -f 4 | grep linux-x64 | head -n 1) printf '\nDownloading ffmpeg ...\n' From a4de55b969c5d7635bf2e2fc219b7ab7502fbe0b Mon Sep 17 00:00:00 2001 From: Ld-Hagen <34414986+Ld-Hagen@users.noreply.github.com> Date: Mon, 30 Aug 2021 18:52:41 +0300 Subject: [PATCH 2/3] Using WidevineCdm from Crome installation --- fix-opera.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fix-opera.sh b/fix-opera.sh index b40bf7b..2c6b886 100644 --- a/fix-opera.sh +++ b/fix-opera.sh @@ -12,6 +12,7 @@ readonly FILE_NAME='libffmpeg.so' readonly ZIP_FILE='.zip' readonly TEMP_FILE="$TEMP_FOLDER$FILE_NAME" readonly OPERA_FILE="$OPERA_FOLDER$FILE_NAME" +readonly WIDEVINE_FOLDER='/opt/google/chrome/WidevineCdm' readonly GIT_API=https://api.github.com/repos/iteufel/nwjs-ffmpeg-prebuilt/releases @@ -34,3 +35,14 @@ mv -f "$TEMP_FILE/$FILE_NAME" $OPERA_FILE printf '\nDeleting Temporary files ...\n' find $TEMP_FOLDER -name "*$FILE_NAME*" -delete + +if test -d $WIDEVINE_FOLDER + then + rm -rf "$OPERA_FOLDER/lib_extra" + mkdir "$OPERA_FOLDER/lib_extra" + cp -R $WIDEVINE_FOLDER "$OPERA_FOLDER/lib_extra/" + printf "[\n {\n "preload": "/usr/lib/x86_64-linux-gnu/opera/lib_extra/WidevineCdm"\n }\n]\n" > "$OPERA_FOLDER/resources/widevine_config.json" + else + printf "There should be Google Chrome installed to /opt/google/chrome to use its WidevineCdm\n" + exit 1 +fi From 67ded4844620921af0231356248dbebc0a30dc3e Mon Sep 17 00:00:00 2001 From: Ld-Hagen <34414986+Ld-Hagen@users.noreply.github.com> Date: Mon, 30 Aug 2021 18:59:18 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 777c2a1..c48a750 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ * Fix Opera html5 media content. * It script must be execute all times opera will fails on showing html5 media content. +* Now it also fixes WidevineCdm support for DRM video. You can try it on Vevo youtube channel for example. (Requires Chrome installation in /opt/google/chrome) ## Index @@ -21,11 +22,11 @@ 1. Clone this repo - ```git clone https://github.com/nicolas-meilan/fix-opera-linux-ffmpeg.git``` + ```git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git``` 2. Go to the repo root folder - ```cd ./fix-opera-linux-ffmpeg``` + ```cd ./fix-opera-linux-ffmpeg-widevine``` 3. Give execute permissions to the script file @@ -39,19 +40,19 @@ 1. Clone this repo - ```git clone https://github.com/nicolas-meilan/fix-opera-linux-ffmpeg.git``` + ```git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git``` 2. Create a **script** folder on your **home** - ```mkdir ~/.script``` + ```mkdir ~/.scripts``` 3. Copy the script into the **script** folder - ```cp ./fix-opera-linux-ffmpeg/fix-opera.sh ~/.script``` + ```cp ./fix-opera-linux-ffmpeg-widevine/fix-opera.sh ~/.scripts``` 4. Give execute permissions to the script file - ```chmod +x ~/.script/fix-opera-linux-ffmpeg/fix-opera.sh``` + ```chmod +x ~/.scripts/fix-opera.sh``` 5. Create an **alias** on the **.bashrc** file (Remember replace **** for your linux user) @@ -63,4 +64,4 @@ 7. Delete the repo - ```rm -rf ./fix-opera-linux-ffmpeg``` \ No newline at end of file + ```rm -rf ./fix-opera-linux-ffmpeg-widevine```