Merge pull request #2 from Ld-Hagen/patch-1

Changed API URL
This commit is contained in:
Nicolas Meilan
2021-08-30 14:12:53 -03:00
committed by GitHub
2 changed files with 22 additions and 9 deletions

View File

@@ -2,6 +2,7 @@
* Fix Opera html5 media content. * Fix Opera html5 media content.
* It script must be execute all times opera will fails on showing 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 ## Index
@@ -21,11 +22,11 @@
1. Clone this repo 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 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 3. Give execute permissions to the script file
@@ -39,19 +40,19 @@
1. Clone this repo 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** 2. Create a **script** folder on your **home**
```mkdir ~/.script``` ```mkdir ~/.scripts```
3. Copy the script into the **script** folder 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 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 **<YOUR_USER>** for your linux user) 5. Create an **alias** on the **.bashrc** file (Remember replace **<YOUR_USER>** for your linux user)
@@ -63,4 +64,4 @@
7. Delete the repo 7. Delete the repo
```rm -rf ./fix-opera-linux-ffmpeg``` ```rm -rf ./fix-opera-linux-ffmpeg-widevine```

View File

@@ -12,12 +12,13 @@ readonly FILE_NAME='libffmpeg.so'
readonly ZIP_FILE='.zip' readonly ZIP_FILE='.zip'
readonly TEMP_FILE="$TEMP_FOLDER$FILE_NAME" readonly TEMP_FILE="$TEMP_FOLDER$FILE_NAME"
readonly OPERA_FILE="$OPERA_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/21966820 readonly GIT_API=https://api.github.com/repos/iteufel/nwjs-ffmpeg-prebuilt/releases
printf '\nGetting Url ...\n' 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' printf '\nDownloading ffmpeg ...\n'
@@ -34,3 +35,14 @@ mv -f "$TEMP_FILE/$FILE_NAME" $OPERA_FILE
printf '\nDeleting Temporary files ...\n' printf '\nDeleting Temporary files ...\n'
find $TEMP_FOLDER -name "*$FILE_NAME*" -delete 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