Skip to content

Commit

Permalink
add speex, alas (linux only)
Browse files Browse the repository at this point in the history
  • Loading branch information
oznu committed May 21, 2020
1 parent 864ce21 commit 87f626e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -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 /

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
42 changes: 35 additions & 7 deletions build-ffmpeg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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} \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion install.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit 87f626e

@shamoon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README should also indicate --enable-libspeex \ =)

Please sign in to comment.