Решение проблемы браузера Opera с воспроизведением видео в Ubuntu и подобных дистрибутивах (Linux Mint, KDE neon)
Ошибки воспроизведения выглядят следующим образом:
В настоящий момент ваш браузер не распознаёт ни один из доступных видеоформатов
Именно такую ошибку можно увидеть при попытке просмотра прямого эфира в Youtube. При этом некоторые другие видео могут быть доступны только в качестве 360, без возможности повысить качество воспроизведения.
Невозможно воспроизвести видео в данном браузере. Попробуйте другой браузер
Такое сообщение можно встретить при просмотре видео в Twitter. Браузер менять мы не будем, это не наш путь. Зато мы расскажем о легком решении данной проблемы.
Исправляем ошибку воспроизведения видео браузером Opera в дистрибутивах Ubuntu и подобных
- Нам нужно заменить предустановленную браузером библиотеку libffmpeg.so на соответствующую библиотеку с поддержкой нужных кодеков. Есть несколько способов как получить libffmpeg.so, но мы воспользуемся способом, который поддерживаем максимальное количество дистрибутивов. В терминале выполняем следующие команды:
Таким образом решается проблема с воспроизведением видео браузером Opera. Способ рабочий, проверен на различных системах, в том числе и на Deepin 20 Beta.
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’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!
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.
@bert56237 You are welcome.
Just remember to install the most updated version here: https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/
Today it is 0.47.2 and not 0.39.2, that I wrote a year ago. Today you have to do it:
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
@pinportal Thanks again. I just updated, working perfectly.
@pinportal
Hi!
There’s an even better way:
Opera will automatically use the version in lib_extra and the mod will survive opera upgrades. So you’ll only need to do this once.
@red Hey, thank you very very much for your help!
I didnt know it. I hope that one day Opera for linux will offer this natively. Many lay users do not see these forums and do not even know how to use the terminal.
@bert56237 Hello, see the @red comment. You will have to do this only once. Even if Opera update the browser, h.264 will continue being support:
sudo mkdir /usr/lib/x86_64-linux-gnu/opera/lib_extra