Last active
September 20, 2022 18:33
-
-
Save Nottt/f55dd79ca235d8add67423a76b304961 to your computer and use it in GitHub Desktop.
Compile Opus-Tools in Ubuntu 18.04
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/bash | |
# Install opus-tools | |
# Latest releases: opus 1.3.1, opus-tools 0.2, opusfile 0.11, libopusenc 0.2.1 | |
set -e | |
set -o pipefail | |
# Install packages needed | |
apt update > /dev/null 2>&1 && apt install -y curl libflac-dev > /dev/null 2>&1 | |
# Remove packages that can cause issues | |
apt -y purge opus* > /dev/null 2>&1 && apt -y purge libopus-dev > /dev/null 2>&1 | |
# Download necessary files | |
TEMP_FOLDER="$(mktemp -d)" | |
# Opusfile 0.11 | |
curl -Ls https://downloads.xiph.org/releases/opus/opusfile-0.11.tar.gz | tar xz -C "$TEMP_FOLDER" | |
# Opus 1.3.1 | |
curl -Ls https://archive.mozilla.org/pub/opus/opus-1.3.1.tar.gz | tar xz -C "$TEMP_FOLDER" | |
# Libopusenc 0.2.1 | |
curl -Ls https://archive.mozilla.org/pub/opus/libopusenc-0.2.1.tar.gz | tar xz -C "$TEMP_FOLDER" | |
# Opus Tools 0.2 | |
curl -Ls https://archive.mozilla.org/pub/opus/opus-tools-0.2.tar.gz | tar xz -C "$TEMP_FOLDER" | |
# Compile | |
cd "$TEMP_FOLDER"/opus-1.3.1 || exit | |
./configure | |
make && sudo make install | |
cd "$TEMP_FOLDER"/opusfile-0.11 || exit | |
./configure | |
make && sudo make install | |
cd "$TEMP_FOLDER"/libopusenc-0.2.1 || exit | |
./configure | |
make && sudo make install | |
cd "$TEMP_FOLDER"/opus-tools-0.2 || exit | |
./configure | |
make | |
sudo make install | |
sudo ldconfig | |
# Cleanup | |
rm -rf "$TEMP_FOLDER" |
Feel free to use it :)
I am new for this how to use it after .sh file used
@Nottt Please update opusfile
to 0.12
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, what license was this released under? I'd like to create a Docker container with opus-tools based on this script, but thought I should check first. Thanks