libffmpeg.so from the Saikrishna Arcot PPA (saiarcot895).
-
#!/bin/sh # Warn the user that this might not be the appropriate script cat <<EOW >&2 This script installs the Chromium beta libffmpeg.so from the Saikrishna Arcot PPA (saiarcot895). You only need to do this if you are running a Vivaldi Snapshot with a newer Chromium engine that the current Chromium stable. If this is not the case you should use "latest-proprietary-media.sh" instead. EOW sleep 1 available () { command -v $1 >/dev/null 2>&1 } # Make sure we have wget or curl if available wget; then SILENT_DL="wget -qO-" LOUD_DL="wget" elif available curl; then SILENT_DL="curl -sL" LOUD_DL="curl -O" else echo "Install Wget or cURL" >&2 exit 1 fi # Set temp dir TMP=${TMP:-/tmp} # Set staging dir STAGINGDIR=$TMP/chromium-codecs-ffmpeg-extra-staging-future # Setup Arch case $(uname -m) in x86_64) ARCH=x86_64; DEB_ARCH=amd64 ;; i?86) ARCH=i386; DEB_ARCH=i386 ;; armhf) ARCH=armhf; DEB_ARCH=armhf ;; arm64) ARCH=arm64; DEB_ARCH=arm64 ;; esac # Use a PPA containing Chromium beta as the source of libs REPO=http://ppa.launchpad.net/saiarcot895/chromium-beta/ubuntu/pool/main/c/chromium-browser/ # Work out the VERSION # Limit the UBUNTU version to 16.04 to avoid the glibc bump in 18.04, so that this works for older distros UBUNTU_PACKAGE=$(${SILENT_DL} $REPO | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_([0-9]+\.){3}[0-9]+-[0-9]ubuntu[0-9]\~ppa[12]\~16\.04\.[1-9]_$DEB_ARCH.deb).*/\1/p" | sort | tail -n 1) ## The original match was ## UBUNTU_PACKAGE=$(${SILENT_DL} $REPO | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_([0-9]+\.){3}[0-9]+-[0-9]ubuntu[0-9]\~ppa[12]\~([0-9]{2}\.){2}[0-9\.]*_$DEB_ARCH.deb).*/\1/p" | sort | tail -n 1) VERSION=$(echo "${UBUNTU_PACKAGE}" | sed -rn "s/.*_(([0-9]+\.){3}[0-9]+)-.*/\1/p") # Error out if $VERISON is unset, e.g. because previous command failed if [ -z "$VERSION" ]; then echo "Could not work out the latest version; exiting" >&2 exit 1 fi # Don't start repackaging if the same version is already installed if [ -r "/var/tmp/vivaldi-snapshot--x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt" ]; then . "/var/tmp/vivaldi-snapshot-.1-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt" if [ "$INSTALLED_VERSION" = "$VERSION" ]; then echo "The latest chromium-codecs-ffmpeg-extra ($VERSION) is already installed" exit 0 fi fi # Now we could screw things up so exit on first error set -e # If the staging directory is already present from the past, clear it down # and re-create it. if [ -d "$STAGINGDIR" ]; then rm -fr "$STAGINGDIR" fi mkdir "$STAGINGDIR" cd "$STAGINGDIR" # Now get the deb package $LOUD_DL "$REPO$UBUNTU_PACKAGE" # Extract the contents of the chromium-codecs-ffmpeg-extra package if available bsdtar; then DEB_EXTRACT_COMMAND='bsdtar xOf' elif available ar; then DEB_EXTRACT_COMMAND='ar p' else echo 'You must install BSD tar or GNU binutils to use this script.' >&2 exit 1 fi $DEB_EXTRACT_COMMAND ${UBUNTU_PACKAGE} data.tar.xz | tar xJf - ./usr/lib/chromium-browser/libffmpeg.so --strip 4 echo "INSTALLED_VERSION=$VERSION" > chromium-codecs-ffmpeg-extra-version.txt # Escalate privileges if needed and install the files if [ "$(whoami)" = "root" ]; then install -m644 libffmpeg.so /var/tmp/vivaldi-snapshot-.1288.1-x64-lamarca/opt/vivaldi-snapshot install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot-88.1-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt rm -r "$STAGINGDIR" # Cleanup if root to prevent the script running as a regular user in the future elif [ -r /etc/os-release ] && grep -qx 'ID=ubuntu' /etc/os-release; then echo "Calling sudo ... (if prompted, please enter your password, so files can be copied into place)" sudo install -m644 libffmpeg.so /var/tmp/vivaldi-snapshot-.1288.1-x64-lamarca/opt/vivaldi-snapshot sudo install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot-288.1-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt else echo "Please enter your root password so files can be copied into place (or re-run this script via sudo)" su -c "sh -c \"install -m644 libffmpeg.so /var/tmp/vivaldi-snapshotx64-lamarca/opt/vivaldi-snapshot && install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt\"" fi # Tell the user we are done cat <<EOF The following files were installed onto your system: /var/tmp/vivaldi-snapshot-4-lamarca/opt/vivaldi-snapshot/libffmpeg.so /var/tmp/vivaldi-snapshot-.1-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt Restart Vivaldi and test H.264/MP4 support via this page: http://www.quirksmode.org/html5/tests/video.html EOF
-
My yestersay's workaround
#!/bin/sh # Warn the user that this might not be the appropriate script cat <<EOW >&2 This script installs the Chromium beta libffmpeg.so from the Ubuntu Chromium team's beta PPA. You only need to do this if you are running a Vivaldi Snapshot with a newer Chromium engine that the current Chromium stable. If this is not the case you should use "latest-proprietary-media.sh" instead. EOW sleep 1 available () { command -v $1 >/dev/null 2>&1 } # Make sure we have wget or curl if available wget; then SILENT_DL="wget -qO-" LOUD_DL="wget" elif available curl; then SILENT_DL="curl -sL" LOUD_DL="curl -O" else echo "Install Wget or cURL" >&2 exit 1 fi # Set temp dir TMP=${TMP:-/tmp} # Set staging dir STAGINGDIR=$TMP/chromium-codecs-ffmpeg-extra-staging-future # Setup Arch case $(uname -m) in x86_64) ARCH=x86_64; DEB_ARCH=amd64 ;; i?86) ARCH=i386; DEB_ARCH=i386 ;; armhf) ARCH=armhf; DEB_ARCH=armhf ;; arm64) ARCH=arm64; DEB_ARCH=arm64 ;; esac # Use a PPA containing Chromium beta as the source of libs REPO=http://ppa.launchpad.net/chromium-team/beta/ubuntu/pool/main/c/chromium-browser/ # Work out the VERSION # Limit the UBUNTU version to 16.04 to avoid the glibc bump in 18.04, so that this works for older distros UBUNTU_PACKAGE=$(${SILENT_DL} $REPO | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_([0-9]+\.){3}[0-9]+-[0-9]ubuntu[0-9]\.16\.04\.[1-9]_$DEB_ARCH.deb).*/\1/p" | sort | tail -n 1) ## The original match was ## UBUNTU_PACKAGE=$(${SILENT_DL} $REPO | sed -rn "s/.*(chromium-codecs-ffmpeg-extra_([0-9]+\.){3}[0-9]+-[0-9]ubuntu[0-9]\~ppa[12]\~([0-9]{2}\.){2}[0-9\.]*_$DEB_ARCH.deb).*/\1/p" | sort | tail -n 1) VERSION=$(echo "${UBUNTU_PACKAGE}" | sed -rn "s/.*_(([0-9]+\.){3}[0-9]+)-.*/\1/p") # Error out if $VERISON is unset, e.g. because previous command failed if [ -z "$VERSION" ]; then echo "Could not work out the latest version; exiting" >&2 exit 1 fi # Don't start repackaging if the same version is already installed if [ -r "/var/tmp/chromium-codecs-ffmpeg-extra-version.txt" ]; then . "/var/tmp/chromium-codecs-ffmpeg-extra-version.txt" if [ "$INSTALLED_VERSION" = "$VERSION" ]; then echo "The latest chromium-codecs-ffmpeg-extra ($VERSION) is already installed" exit 0 fi fi # Now we could screw things up so exit on first error set -e # If the staging directory is already present from the past, clear it down # and re-create it. if [ -d "$STAGINGDIR" ]; then rm -fr "$STAGINGDIR" fi mkdir "$STAGINGDIR" cd "$STAGINGDIR" # Now get the deb package $LOUD_DL "$REPO$UBUNTU_PACKAGE" # Extract the contents of the chromium-codecs-ffmpeg-extra package if available bsdtar; then DEB_EXTRACT_COMMAND='bsdtar xOf' elif available ar; then DEB_EXTRACT_COMMAND='ar p' else echo 'You must install BSD tar or GNU binutils to use this script.' >&2 exit 1 fi $DEB_EXTRACT_COMMAND ${UBUNTU_PACKAGE} data.tar.xz | tar xJf - ./usr/lib/chromium-browser/ --strip 4 echo "INSTALLED_VERSION=$VERSION" > chromium-codecs-ffmpeg-extra-version.txt # Escalate privileges if needed and install the files if [ "$(whoami)" = "root" ]; then install -m644 libffmpeg.so /var/tmp/vivaldi-snapshot-.1289.4-x64-lamarca/opt/vivaldi-snapshot/libffmpeg.so install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot1289.4-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt rm -r "$STAGINGDIR" # Cleanup if root to prevent the script running as a regular user in the future elif [ -r /etc/os-release ] && grep -qx 'ID=ubuntu' /etc/os-release; then echo "Calling sudo ... (if prompted, please enter your password, so files can be copied into place)" sudo install -m644 libffmpeg.so /var/tmp/vivaldi-snapshot-.1289.4-x64-lamarca/opt/vivaldi-snapshot/libffmpeg.so sudo install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot--x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt else echo "Please enter your root password so files can be copied into place (or re-run this script via sudo)" su -c "sh -c \"install -m644 libffmpeg.so /var/tmp/vivaldi-snapshot-1289.4-x64-lamarca/opt/vivaldi-snapshot/ && install -m644 chromium-codecs-ffmpeg-extra-version.txt /var/tmp/vivaldi-snapshot-1289.4-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt\"" fi # Tell the user we are done cat <<EOF The following files were installed onto your system: /var/tmp/vivaldi-snapshot-1289.4-x64-lamarca/opt/vivaldi-snapshot/libffmpeg.so /var/tmp/vivaldi-snapshot-1289.4-x64-lamarca/opt/vivaldi-snapshot/chromium-codecs-ffmpeg-extra-version.txt Restart Vivaldi and test H.264/MP4 support via this page: http://www.quirksmode.org/html5/tests/video.html EOF