From 87f626eba7bf34eac6300b3981419a48f2a9fc69 Mon Sep 17 00:00:00 2001 From: oznu Date: Thu, 21 May 2020 19:07:53 +1000 Subject: [PATCH] add speex, alas (linux only) --- Dockerfile.debian | 2 +- README.md | 2 +- build-ffmpeg | 42 +++++++++++++++++++++++++++++++++++------- install.js | 2 +- 4 files changed, 38 insertions(+), 10 deletions(-) diff --git a/Dockerfile.debian b/Dockerfile.debian index f79b341..63a4c05 100644 --- a/Dockerfile.debian +++ b/Dockerfile.debian @@ -3,7 +3,7 @@ FROM ${BASE_IMAGE:-balenalib/raspberry-pi-debian:stretch} COPY qemu /usr/bin/ -RUN apt-get update && apt-get install -y build-essential curl g++ +RUN apt-get update && apt-get install -y build-essential curl g++ autoconf COPY build-ffmpeg / diff --git a/README.md b/README.md index 1d08f0c..23d7aa8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This project provides static `ffmpeg` binaries for multiple platforms and archit | OS | Supported Architectures | |---------------------|-------------------------| -| Raspbian Linux | armv6l (armv7l) | +| Raspbian Linux (9+) | armv6l (armv7l) | | Debian/Ubuntu Linux | x86_64, armv7l, aarch64 | | Alpine Linux | x86_64, armv6l, aarch64 | | macOS (10.14+) | x86_64 | diff --git a/build-ffmpeg b/build-ffmpeg index 72873ef..e213902 100755 --- a/build-ffmpeg +++ b/build-ffmpeg @@ -265,7 +265,7 @@ if build "x264"; then fi if build "libogg"; then - download "http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz" "libogg-1.3.3.tar.gz" + download "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.3.tar.gz" "libogg-1.3.3.tar.gz" cd $PACKAGES/libogg-1.3.3 || exit execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static execute make -j $MJOBS @@ -274,7 +274,7 @@ if build "libogg"; then fi if build "libvorbis"; then - download "http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz" "libvorbis-1.3.6.tar.gz" + download "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.6.tar.gz" "libvorbis-1.3.6.tar.gz" cd $PACKAGES/libvorbis-1.3.6 || exit execute ./configure --prefix=${WORKSPACE} --with-ogg-libraries=${WORKSPACE}/lib --with-ogg-includes=${WORKSPACE}/include/ --enable-static --disable-shared --disable-oggtest execute make -j $MJOBS @@ -283,7 +283,7 @@ if build "libvorbis"; then fi if build "libtheora"; then - download "http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz" "libtheora-1.1.1.tar.bz" + download "https://ftp.osuosl.org/pub/xiph/releases/theora/libtheora-1.1.1.tar.gz" "libtheora-1.1.1.tar.bz" cd $PACKAGES/libtheora-1.1.1 || exit # update config.guess to support aarch64 builds @@ -321,8 +321,8 @@ fi # fi if build "fdk_aac"; then - download "https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-2.0.0.tar.gz/download?use_mirror=gigenet" "fdk-aac-2.0.0.tar.gz" - cd $PACKAGES/fdk-aac-2.0.0 || exit + download "https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-2.0.1.tar.gz/download?use_mirror=gigenet" "fdk-aac-2.0.1.tar.gz" + cd $PACKAGES/fdk-aac-2.0.1 || exit execute ./configure --prefix=${WORKSPACE} --disable-shared --enable-static execute make -j $MJOBS execute make install @@ -347,9 +347,36 @@ if build "openssl"; then build_done "openssl" fi +if build "speex"; then + download "https://downloads.xiph.org/releases/speex/speex-1.2.0.tar.gz" "speex-1.2.0.tar.gz" + cd $PACKAGES/speex-1.2.0 || exit + execute ./configure --prefix=${WORKSPACE} --enable-static --disable-shared + execute make -j $MJOBS + execute make install + build_done "speex" +fi + +# +# Linux only packages +# +if [ "$(uname)" = "Linux" ]; then + + if build "alsa"; then + download "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.2.2.tar.bz2" "alsa-lib-1.2.2.tar.bz2" + cd $PACKAGES/alsa-lib-1.2.2 || exit + execute ./configure --prefix=${WORKSPACE} --enable-static --disable-shared + execute make -j $MJOBS + execute make install + build_done "alsa" + fi + + EXTRA_FLAGS="$EXTRA_FLAGS --enable-indev=alsa --enable-outdev=alsa" +fi + + build "ffmpeg" -download "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/47773f7979d77c1fcd08b57e85af1ad08d9248c8.tar.gz" "ffmpeg-snapshot.tar.bz2" -cd $PACKAGES/ffmpeg-47773f7/ || exit +download "https://git.ffmpeg.org/gitweb/ffmpeg.git/snapshot/d1e8be34114d5782a5a4ea79ef0b9e92b6b37bc7.tar.gz" "ffmpeg-snapshot.tar.bz2" +cd $PACKAGES/ffmpeg-d1e8be3/ || exit ./configure $ADDITIONAL_CONFIGURE_OPTIONS \ --pkgconfigdir="$WORKSPACE/lib/pkgconfig" \ --prefix=${WORKSPACE} \ @@ -382,6 +409,7 @@ cd $PACKAGES/ffmpeg-47773f7/ || exit --enable-decoder=h264 \ --enable-network \ --enable-protocol=tcp \ + --enable-libspeex \ --enable-demuxer=rtsp $EXTRA_FLAGS execute make -j $MJOBS diff --git a/install.js b/install.js index d53c182..86b9a32 100755 --- a/install.js +++ b/install.js @@ -39,7 +39,7 @@ function getDownloadFileName() { switch (os.platform()) { case 'darwin': // only x64 is supported - if (process.arch === 'x64') { + if (process.arch === 'x64' && parseInt(os.release()) >= 18) { return 'ffmpeg-darwin-x86_64.tar.gz' } else { return null;