Решение проблемы браузера Opera с воспроизведением видео в Ubuntu и подобных дистрибутивах (Linux Mint, KDE neon)
Ошибки воспроизведения выглядят следующим образом:
В настоящий момент ваш браузер не распознаёт ни один из доступных видеоформатов
Именно такую ошибку можно увидеть при попытке просмотра прямого эфира в Youtube . При этом некоторые другие видео могут быть доступны только в качестве 360, без возможности повысить качество воспроизведения.
Невозможно воспроизвести видео в данном браузере. Попробуйте другой браузер
Такое сообщение можно встретить при просмотре видео в Twitter. Браузер менять мы не будем, это не наш путь. Зато мы расскажем о легком решении данной проблемы.
Исправляем ошибку воспроизведения видео браузером Opera в дистрибутивах Ubuntu и подобных
- В первую очередь нужно установить пакет chromium-codecs-ffmpeg-extra. Сделать это можно с помощью терминала следующей командой:
- Обычно вторым этапом идет создание симлинка для файла libffmpeg.so, но так как теперь браузер Opera поставляет файл с таким названием (но не решающим проблему), то мы его удалим и затем создадим симлинк на новый файл. Удаление файла:
- Создаём симлинк:
Таким образом решается проблема с воспроизведением видео браузером Opera в Ubuntu.
Продолжительное время данная проблема была актуальна и для линукс версии Яндекс браузера (как минимум в течении нескольких последних релизов в ЯБ проблема не повторяется). Там она решалась аналогичным способом. Файл libffmpeg.so в Яндекс браузере расположен в каталоге /opt/yandex/browser-beta/lib/. Соответственно симлинк нужно было создавать по следующему пути:
Нашли опечатку? Выделите и нажмите Ctrl + Enter
Источник
Opera h 264 linux
Currently, Opera on Linux (for example, Ubuntu or OpenSUSE distributions) cannot play h264 videos by default.
For example, consider this YouTube video, which happens to be served with the h264 codec:
This is really a big downside — for many users, YouTube is a heavily used service, and everybody plays videos on websites every once in a while. There should be a relatively smooth method of making this work.
I understand that not including the proper ffmpeg libraries in the distribution is a result of licensing issues, but could you please include clear, up-to-date instructions (for each release) on the Opera website about:
- Where to download ffmpeg libraries.
- How to install them so that they work with Opera.
- Anything else that is needed to make this work.
A multitude of different how-tos exists on the web, but most of it is outdated, or does not work.
Note that you need the correct version; most distros will list several versions which you must choose from based on the version of Chromium that Opera uses. That is the hard part.
You put the libffmpeg.so you download at «/usr/lib/x86_64-linux-gnu/opera/lib_extra/libffmpeg.so». If you haven’t created the «lib_extra» folder yet, you’ll need to create it first. You’re not supposed to replace the libffmpeg.so that’s included with Opera. Leave that one alone and let Opera update it when it needs to.
For what one you download, you have to goto the URL opera://about and take note of the Chromium major version. Then, you can search for and find a libffmpeg.so that’s built for that major version of Chromium. Don’t install any packages or anything, which might interfere with other programs. Find the file in a tar.gz file for example, extract it and put it in the lib_extra folder.
Then, you’ll be good to go until Opera jumps to a new major version of Chromium. When that happens, you repeat the steps and replace the libfmpeg.so in the lib_extra folder with the new one.
As for where to find the right ffmpeg, try https://repo.herecura.eu/herecura/x86_64/ There are Vivaldi and Opera ones for Chromium 71 and Opera ones for Chromium 72. I think these get updated. You might also try http://security.ubuntu.com/ubuntu/pool/universe/c/chromium-browser/.
As for widevine installation, I’m not sure.
Thank you for the instructions!
From what I can tell, I seem to have Chromium version 70:
Browser identification
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.116
I tried extracting both the libffmpeg.so file from version 69 and from the version 71 (extracted from the Ubuntu repos with deb files):
I copied both the the said path:
$ sudo ls -la /usr/lib/x86_64-linux-gnu/opera/lib_extra/
Mo 21 Jan 2019 19:48:47 CET
total 1980
drwxr-xr-x 2 root root 4096 Jan 21 19:48 .
drwxr-xr-x 6 root root 4096 Jan 20 17:32 ..
-rw-r—r— 1 root root 2015256 Jan 21 19:48 libffmpeg.so
Neither of those 2 versions of seems to work (Opera was restarted, and I checked the process list after turning Opera off and on).
Apparently, these help:
Thank you for your instructions again.
I still find it strange that I’d have to download a random so file from some guy’s GitHub repo, and sudo-copy that into my usr folders.
Which version of libffmpeg.so do the Opera developers use when they build and test their software?
Do they download it from somewhere, or build it from source?
Why couldn’t we (the Opera users) do the same after installing Opera?
From what I can tell, I seem to have Chromium version 70
Then you’d need one for 70. Surprised the one you downloaded for 70 didn’t work.
Which version of libffmpeg.so do the Opera developers use when they build and test their software?
Do they download it from somewhere, or build it from source?
They build ffmpeg included in the Chromium source with proprietary codecs disabled for legal reasons. You just have to download a libffmpeg that supports everything to make the extra, proprietary codecs work.
I suppose the best way (but probably a pain) would be to fetch the latest Chromium source of the major version you need, build it with proprietary codecs enabled and then grab the produced libffmpeg.so from it. Not sure how much of Chromium you can avoid building just to produce libffmpeg, but that’s something to investigate. But, finding the libffmpeg.so from an official chromum ffmpeg extra package might be easier.
Thanks for your answers!
It sounds like it might be useful to have some instructions on the Opera website about (or an automated script that does this, assuming that this does not breach the legal restrictions), since it’s a frequent issue (and it’s pushing away some Opera users). It looks like the Python script in this repo seems to be doing exactly that: https://github.com/iteufel/nwjs-ffmpeg-prebuilt
As far as I’m personally concerned, the solution of running the script from iteufel’s repo seems to work for me.
I see that the script makes use of https://nwjs.io/versions.json to figure out what version of the Chromium source to work with.
Sorry for digging an old thread, but I just stumbled upon this issue while trying to watch a video from https://lbry.tv on Linux Mint 19.2 with Opera 68 Stable.
Finding the correct libffmpeg.so fixed it. Many thanks.
I had video issue updating Linux Mint from 19.3 to 20.
Upgrade process discarted Opera Dev, I reinstalled v.71.0.3742.0 but I got in trouble with video reproduction.
https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/tag/0.31.5
solved for me.
Thanx
I create a script that install the broken library and fix the opera bug.
Источник
Opera h 264 linux
The Linux community has long been asking Opera to support the h.264 codec in Opera Browser for Linux.
We know that h.264 is a proprietary format. However, Firefox browser worked around this problem, it uses the codec x264 (free and open-source software library which uses GNU General Public License and it is developed by VideoLAN)
The x264 codec allows browsers to support h.264 codec videos.
For my Opera browser to support h.264, I need to open the terminal and type this command with each new Opera browser update:
curl -L -O https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.39.2/0.39.2-linux-x64.zip
sudo mv libffmpeg.so /usr/lib/x86_64-linux-gnu/libffmpeg_h264.so
sudo mv /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.orig
sudo ln -s /usr/lib/x86_64-linux-gnu/libffmpeg_h264.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
But less experienced users don’t even know there is this option, they simply can’t watch videos on Facebook.com, Twitter.com and Youtube.com Live videos, as they rely on the h.264 codec
That’s why Opera Browser needs to support the h.264 codec or at least x264 codec (which will not generate license costs for Opera and will once and for all solve this problem that only affects Opera Browser on Linux since Google Chrome and Firefox have been supporting the h.264 codec for a long time, even indirectly via the x264 codec)
I have Lubuntu 18.04.3 LTS (based on Ubuntu 18.04.3 LTS) 64bits and Linux 4.15.0-58 kernel
First, x264 is an encoder, aka the «tool» you will need to convert a video file to h264, not an actual lib for playing (= decoding) that file.
https://www.videolan.org/developers/x264.html
Second, firefox uses libopenh264 for its h264 needs, which is made by cisco.
http://www.openh264.org/
And that lib is also a direct dependency of ffmpeg’s libav* libs.
Third. howtos like this one should start with «proceed at your own risk», and let me explain why in detail.
As I have analysed in detail on the post on my signature, the overall «problem» of the average opera user in linux is finding that «magical» libffmpeg compiled in such a way so it plays everything.
However, most of those are not supposed to be used in opera, because they were compiled with a different set of compilers, libs etc.
The one in your howto is the libffmpeg from nwjs, but there are others too. In fact, every electron-based (-poor-excuse-for-an-) app ships with its own libffmpeg. Skypeforlinux, atom, vs code, spotify and so on, ALL have a libffmpeg in their package (regardless if they need it for their usage or not).
But no one has ever mentioned them on a similar howto.
So, as I have also said in the post on my signature, if you are on ubuntu or some derivative, install chromium ffmpeg codecs and you are done.
That’s why Opera Browser needs to support the h.264 codec or at least x264 codec (which will not generate license costs for Opera
It is not true. Chrome use built in codecs (ffmpeg+x264). But Google paid royalty for it.
Open Source it’s not kind sort of «I don’t care about any patents and licenses».
Second, firefox uses libopenh264 for its h264 needs, which is made by cisco.
No. OpenH264 in Firefox is only for WebRTC Calling.
i totally agree.
i’ve had to change to the Snap package to get around this situation.
plus, Vivaldi on Linux doesn’t have this problem.
My fault. x264 it’s only ENCODER.
Read my comment as:
It is not true. Chrome use built in open source codecs (ffmpeg). But Google paid royalty for it.
Vivaldi is an electon app, so it may use electron’s libffmpeg, like the other electron based apps do.
plus, Vivaldi on Linux doesn’t have this problem.
It’s hard to say «doesn’t have this problem»
plus, Vivaldi on Linux doesn’t have this problem.
It’s hard to say «doesn’t have this problem»
i should of said: «i’ve never had this problem with Vivaldi»
So Opera can introduce OpenH264 codec inside Opera browser. It is open source and free too.
So Opera can introduce OpenH264 codec inside Opera browser. It is open source and free too.
No.. It’s described in Bugzilla bugreport (link is upper in this thread).
The are not any free and normal codecs to use for commercial browser.
Hi, first post here
@pinportal Thanks for the solution. It worked!
Hope this helps!
M.
The Linux community has long been asking Opera to support the h.264 codec in Opera Browser for Linux.
We know that h.264 is a proprietary format. However, Firefox browser worked around this problem, it uses the codec x264 (free and open-source software library which uses GNU General Public License and it is developed by VideoLAN)
The x264 codec allows browsers to support h.264 codec videos.
For my Opera browser to support h.264, I need to open the terminal and type this command with each new Opera browser update:
curl -L -O https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/0.39.2/0.39.2-linux-x64.zip
sudo mv libffmpeg.so /usr/lib/x86_64-linux-gnu/libffmpeg_h264.so
sudo mv /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.orig
sudo ln -s /usr/lib/x86_64-linux-gnu/libffmpeg_h264.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
But less experienced users don’t even know there is this option, they simply can’t watch videos on Facebook.com, Twitter.com and Youtube.com Live videos, as they rely on the h.264 codec
That’s why Opera Browser needs to support the h.264 codec or at least x264 codec (which will not generate license costs for Opera and will once and for all solve this problem that only affects Opera Browser on Linux since Google Chrome and Firefox have been supporting the h.264 codec for a long time, even indirectly via the x264 codec)
I have Lubuntu 18.04.3 LTS (based on Ubuntu 18.04.3 LTS) 64bits and Linux 4.15.0-58 kernel
Thank you for this information! I have Linux Mint LTS 20.0 Cinnamon 64B. I just followed your directions and all videos are now working perfectly including on Twitter.
Earlier I had also installed the following packages, so I just left them and followed your directions.
Источник