Skip to content

Instantly share code, notes, and snippets.

@SebastianGiro
Forked from mcarletti/opera_x264_support.sh
Last active September 7, 2020 11:52
Show Gist options
  • Save SebastianGiro/af5bba0cd8456b232663c0ab0ed3c523 to your computer and use it in GitHub Desktop.
Save SebastianGiro/af5bba0cd8456b232663c0ab0ed3c523 to your computer and use it in GitHub Desktop.
Enable H.264 codec support for Opera browser
#!/bin/bash
# Source:
# https://forums.opera.com/topic/34659/opera-linux-browser-h-264-support-through-x264-open-source-codec
# Tested on:
#
# Ubuntu 18.04.3 LTS (x86_64; ubuntu:GNOME)
# Opera 62.0.3331.116
# 63.0.3368.66
#
# Ubuntu 20.04
# Opera 70.0.3728.95
# retrieve latest ffmpeg release version
URL=`curl https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/latest`
FFMPEGVER=${URL%\"*}
FFMPEGVER=${FFMPEGVER##*/}
FFMPEGZIP=${FFMPEGVER}-linux-x64.zip
# download library
curl -L -O https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/download/${FFMPEGVER}/${FFMPEGZIP}
unzip ${FFMPEGZIP}
rm ${FFMPEGZIP}
# overwrite opera libffmpeg
sudo mkdir /usr/lib/x86_64-linux-gnu/opera/lib_extra
sudo mv libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/lib_extra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment