-
-
Save ruario/fd278f3fdc947e045f3b09b3ad792588 to your computer and use it in GitHub Desktop.
The script sources a libffmpeg.so that supports "proprietary media" for use on Linux distros running Vivaldi 4.2+ on x86_64/amd64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
# This script fetches the chromium-ffmpeg snap package and extracts a suitable | |
# libffmpeg.so with proprietary media support. | |
# x86_64 (amd64) chromium-ffmpeg snap from 2021-09-02T21:00:25.927144+00:00 | |
SNAP_NAME=XXzVIXswXKHqlUATPqGCj2w2l7BxosS8_23.snap | |
# Fetch the snap if not already present | |
if [ ! -e $SNAP_NAME ]; then | |
if command -v wget >/dev/null 2>&1; then | |
DL='wget -O-' | |
elif command -v curl >/dev/null 2>&1; then | |
DL='curl -L' | |
else | |
echo 'Install Wget or cURL first' >&2; exit 1 | |
fi | |
$DL https://api.snapcraft.io/api/v1/snaps/download/$SNAP_NAME > $SNAP_NAME | |
fi | |
# Extract libffmpeg.so for Vivaldi 4.2 and 4.3 | |
tail -c+97 $SNAP_NAME | xz -d | head -c19451350 > libffmpeg.so.4.2 | |
tail -c+97 $SNAP_NAME | xz -d | tail -c+19451351 | head -c19448325 > libffmpeg.so.4.3 | |
# Check libs are as expected | |
cat <<EOF | md5sum -c | |
42e4b8dac1913ff16f12d2779f0c2b72 libffmpeg.so.4.2 | |
8fd8dbce1487ca71db3f7bb14f770eec libffmpeg.so.4.3 | |
EOF | |
# Inform the user how to proceed | |
cat <<EOF | |
Copy a suitable libffmpeg.so.X.X to your install directory (X.X = Vivaldi version), e.g: | |
sudo mv libffmpeg.so.4.2 /opt/vivaldi | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment