Giter Club home page Giter Club logo

fix-opera-linux-ffmpeg-widevine's Introduction

Fix Opera Linux libffmpeg & WidevineCdm

  • Fixes Opera html5 media content including DRM-protected one.
  • This script must be executed all times opera fails on showing html5 media content.
  • On Debian-based, RedHat-based and Arch-based distributions it could be started automatically after Opera each update or reinstall.
  • Works only with native versions of Opera. Won't work with flatpak/snap releses.
  • May not work with opera-beta and opera-develper.

Requirements

  1. curl (Is needed for downloading the ffmpeg lib and widevine)

    unzip (Is needed for unpacking the downloaded file)

    git (Is needed for fetching this script)

    jq (Is needed for parsing JSON from github)

    For Debian-based systems: sudo apt install curl unzip git jq

    For Arch-based systems: sudo pacman -S curl unzip git jq

    For RedHat-based systems: sudo dnf install curl unzip git jq

  2. (Optional) python3-dnf-plugin-post-transaction-actions (Is needed for autoupdate in RedHat-based systems) dnf install python3-dnf-plugin-post-transaction-actions

Usage

  1. Clone this repo

    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-widevine

  3. (Optional) Run script. And if it works well go to next step.

    sudo ./scripts/fix-opera.sh

  4. Run install script and answer few questions.

    sudo ./install.sh

How to uninstall

  1. Clone this repo

    cd /tmp && git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.git

  2. Go to the repo root folder

    cd /tmp/fix-opera-linux-ffmpeg-widevine

  3. Make uninstall.sh executable

    chmod +x uninstall.sh

  4. Run uninstallation script. And if it works well go to next step.

    sudo ./uninstall.sh

fix-opera-linux-ffmpeg-widevine's People

Contributors

arielj avatar fishyw avatar kaptcha0 avatar kyrbrbik avatar ld-hagen avatar leonmcar1 avatar nicolas-meilan 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fix-opera-linux-ffmpeg-widevine's Issues

Crashes with Slimjet playing WAV files

Linux Mint Cinnamon 64 bit 20.2

downloaded slimjet 33 - slimjet_amd64.deb from https://www.slimjet.com/en/dlpage.php?update=1
downloaded 0.59.0-linux-x64.zip from https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine/releases

installed slimjet from terminal using sudo dpkg -i slimjet_amd64.deb
per slimjet instructions unzipped ffmpeg and ran sudo cp libffmpeg.so /opt/slimjet/

slimjet 33 without ffmpeg plays wav files. with ffmpeg trying to play wav files comes back with Error code: SIGSEGV
it might do it on other pages that do not have wav files but have not done that much testing.

you could try it on the following site by playing the wav files
https://www.wavsource.com/movie_stars/cagney.htm
https://www.wavsource.com/

Script might not work on fedora

Hey, the script doesn't seem to work on fedora, script output doens't look bad but when restarting the browser videos still don't work, script output:

which: no pacman in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/lib/snapd/snap/bin)
Getting download links...
Downloading files...
/tmp/opera-fix/ffmpeg.zip                            100%[=====================================================================================================================>]   5.06M  8.03MB/s    in 0.6s    
/tmp/opera-fix/widevine.zip                          100%[=====================================================================================================================>]  13.28M  15.9MB/s    in 0.8s    
Extracting files...
Removing temporary files...

I've ran this on ubuntu before and it worked well, not sure why it doens't on fedora, the only weird thing I see is the pacman message, but I don't think that could break the script, any idea?

Opera: 103.0.4928.34
Fedora: 39 beta
Linux: Linux fedora 6.5.7-300.fc39.x86_64

Updated: Sorry for the noise, but I installed opera using flatpak and the installation path is not the same.

when used for opera-developer and opera-beta breaks apt-get install

hello, great work this fixed the issue

the problem, as described in the title, i use opera developer

i selected to use the script whenever opera si updated or installed thus the following apt commands were not working
sudo apt install ffmpeg
sudo apt install opera-beta
sudo apt install vlc
sudo apt install opera-stable

all were failing with Problem executing scripts DPkg::Pre-Invoke so i had to remove the script from apt dir

Noticed this err while installing
Kazam_screenshot_00000
received this when using for opera developer and opera but i don t think they are important
Kazam_screenshot_00005

anyway thank you and have a nice day

Origin of libffmpeg.so?

Hi there!

Nice script. But i was wondering from where the released libffmpeg.so files come from?

I don't want to accuse you of anything, but technically it could contain arbitrary code that is executed on my machine. So it would be nice if this repo would be more transparent.

wget2 compatibility issues

As an opera user, I've been using this fix for a while now, and I encountered an issue... There was a similar error in a previous issue, but seems like the cause may be different?

image

I managed to fix it by piping it to jq.

But then afterwards, I ran into another problem with wget

image

seems like this is an issue with different wget versions.

No such file or directory: Incorrect Path to Opera?

When I installed the fix for Opera One(version: 107.0.5045.15) on Ubuntu 20.04 LTS , I get this error install scripts:
START-OF-SCRIPT
Getting download links...
Downloading files...
/tmp/opera-fix/ffmpeg.zip 100%[=====================================================>] 4.97M 1.53MB/s in 3.3s
/tmp/opera-fix/widevine.zip 100%[=====================================================>] 13.28M 1.49MB/s in 9.6s
Extracting files...
Doing opera
Removing old libraries & making directories...
Moving libraries to their places...
/root/.scripts/fix-opera.sh: line 126: /usr/bin/resources/widevine_config.json: No such file or directory
Removing temporary files...
END-OF-SCRIPT

My install path is:
Install: /snap/opera/289/usr/lib/x86_64-linux-gnu/opera
Is the snap install the problem?

System:Ubuntu Core 18 (x86_64; ubuntu:GNOME)
Chromium version:121.0.6167.140

Browser identification
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0

basename: missing operand error

Sorry, I am not very proficient in this and hope I ask in the right place:
When I run the script, I get "basename: missing operand ... Failed to get ffmpeg download URL. Exiting ..."
How to fix this?
Thanks in advance for your response!

Got error on running fix script: $OPERA_WIDEVINE_DIR is empty

Can't fix Opera got error with unknown variable
Why it is empty?

OS: Linux Mint 21.2 Cinnamon

~:$ sudo apt reinstall opera-stable
The following packages will be REINSTALLED:
opera-stable
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded.
Need to get 106 MB of archives. After unpacking 0 B will be used.
Get: 1 https://deb.opera.com/opera-stable stable/non-free amd64 opera-stable amd64 102.0.4880.51 [106 MB]
Fetched 106 MB in 10s (10,6 MB/s)
Preconfiguring packages ...
(Reading database ... 572003 files and directories currently installed.)
Preparing to unpack .../opera-stable_102.0.4880.51_amd64.deb ...
Unpacking opera-stable (102.0.4880.51) over (102.0.4880.51) ...
Setting up opera-stable (102.0.4880.51) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for shared-mime-info (2.1-2) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26+mint3+victoria) ...
Getting download links...
Downloading files...
/tmp/opera-fix/ffmpeg.zip 100%[==========================================================>] 4,97M 8,15MB/s in 0,6s
/tmp/opera-fix/widevine.zip 100%[==========================================================>] 8,04M 8,01MB/s in 1,0s
Extracting files...
Doing opera
grep: (standard input): binary file matches
dirname: missing operand
Try 'dirname --help' for more information.
Removing old libraries & making directories...
Moving libraries to their places...
/root/.scripts/fix-opera.sh: line 126: /resources/widevine_config.json: No such file or directory
Removing temporary files...

Widevine Support Considerations

In fix-opera.sh, I see you already put the WidevineCDM folder for Opera in the lib_extra folder so that Opera has its own copy somewhere and modify widevine_config.json to search in that WidevineCDM folder. Just note though that it used to be the case that widevine_config.json would be overwritten on update of Opera and you'd have to re-do changes to the file after each Opera update. So, I would double-check that the file survives an update.

Note though that since Opera 76.0.3981.0, Opera doesn't come with a widevine_config.json file by default because it's not needed. Instead, Widevine is automatically fetched and the WidevineCDM folder is put in the Opera profile folder that's in /home/username/.config. You can check and update Widevine by going to the URL opera://components in Opera. To refetch Widevine, you can delete that WidevineCDM folder (while Opera is closed) and go back to opera://components and click "update".

With that said, it might not be necessary to even worry about Widevine. However, if you still want to anyway, it might be better if the script checked for Widevine in the Opera users's profile folder and only put a new one there if there isn't one (as the user, not sudo). Something to think about. You might also want to check that Opera still uses widevine_config.json if you put it there.

Custom libffmpeg.so file should go in lib_extra folder

If I read fix-opera.sh correctly, you're overwriting Opera's default "libffmpeg.so" that's in "/usr/lib/x86_64-linux-gnu/opera/" instead of leaving it alone and putting the custom one (one with support for proprietary codecs you fetch) in "/usr/lib/x86_64-linux-gnu/opera/lib_extra/" (after you make sure the "lib_extra" folder exists).

If so, while that will work, your custom libffmpeg.so can get overwritten if Opera is updated or Opera updates its default libffmpeg.so for some reason. If you put the custom one in the lib_extra folder (per Opera's recommendations), it'll survive an update and you'll only have to update the file when Opera updates to a new major version of Chromium. Otherwise, you might have to re-run fix-opera.sh after each time you update Opera.

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.