Skip to content

Instantly share code, notes, and snippets.

@alexolinux
Last active November 5, 2025 23:52
Show Gist options
  • Select an option

  • Save alexolinux/0a97e338410fe975ad4ddfccd77f0e67 to your computer and use it in GitHub Desktop.

Select an option

Save alexolinux/0a97e338410fe975ad4ddfccd77f0e67 to your computer and use it in GitHub Desktop.
Fixing for "Opera Browser video not supported" in Linux Platforms
#!/bin/bash
ARCH="x64"
FFMPEG_VER="0.105.0"
FFMPEG_URL="https://github.com/nwjs-ffmpeg-prebuilt/nwjs-ffmpeg-prebuilt/releases/download/$FFMPEG_VER/$FFMPEG_VER-linux-$ARCH.zip"
OPERA_LIB="/usr/lib64/opera"
TMP_DIR="/tmp/operalib"
if [ -f "${OPERA_LIB}/libffmpeg.so" ]; then
echo "libffmpeg.so already exists in ${OPERA_LIB}. Making backup..."
sudo cp "${OPERA_LIB}/libffmpeg.so" "${OPERA_LIB}/libffmpeg.so.save"
fi
if [ ! -d "${OPERA_LIB}" ]; then
echo "Creating Opera extra library directory..."
sudo mkdir -p "${OPERA_LIB}"
else
echo "Opera extra library directory already exists."
fi
mkdir -p "${TMP_DIR}"
echo "Downloading ffmpeg..."
cd "${TMP_DIR}" || exit 1
wget "${FFMPEG_URL}" -O "$FFMPEG_VER-linux-$ARCH.zip"
echo "Extracting zipped ffmpeg library file..."
if unzip "$FFMPEG_VER-linux-$ARCH.zip"; then
echo "Successfully extracted ffmpeg. Installing Opera extra library..."
sudo cp -f "${TMP_DIR}/libffmpeg.so" "${OPERA_LIB}"
else
echo "Failed to extract ffmpeg."
exit 1
fi
echo "Cleaning up..."
rm -rf "${TMP_DIR}"
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment