1 TERMUX_PKG_HOMEPAGE=https://ffmpeg.org
2 TERMUX_PKG_DESCRIPTION="Tools and libraries to manipulate a wide range of multimedia formats and protocols"
3 # NOTE: mpv has to be rebuilt and version bumped after updating ffmpeg.
4 TERMUX_PKG_VERSION=3.4.2
5 TERMUX_PKG_SHA256=2b92e9578ef8b3e49eeab229e69305f5f4cbc1fdaa22e927fc7fca18acccd740
6 TERMUX_PKG_SRCURL=https://www.ffmpeg.org/releases/ffmpeg-${TERMUX_PKG_VERSION}.tar.xz
7 # libbz2 is used by matroska decoder:
8 # libvpx is the VP8 & VP9 video encoder for WebM, see
9 # https://trac.ffmpeg.org/wiki/Encode/VP8 and https://trac.ffmpeg.org/wiki/Encode/VP9
10 TERMUX_PKG_DEPENDS="libbz2, libsoxr, libx264, libx265, xvidcore, libvorbis, libmp3lame, libopus, libvpx, libgnutls, libandroid-glob"
11 TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/ffmpeg/examples"
12 TERMUX_PKG_CONFLICTS="libav"
14 termux_step_configure () {
15 cd $TERMUX_PKG_BUILDDIR
17 export ASFLAGS="-no-integrated-as"
19 local _EXTRA_CONFIGURE_FLAGS=""
20 if [ $TERMUX_ARCH = "arm" ]; then
22 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
23 elif [ $TERMUX_ARCH = "i686" ]; then
25 # Specify --disable-asm to prevent text relocations on i686,
26 # see https://trac.ffmpeg.org/ticket/4928
27 _EXTRA_CONFIGURE_FLAGS="--disable-asm"
28 elif [ $TERMUX_ARCH = "x86_64" ]; then
30 elif [ $TERMUX_ARCH = "aarch64" ]; then
32 _EXTRA_CONFIGURE_FLAGS="--enable-neon"
34 termux_error_exit "Unsupported arch: $TERMUX_ARCH"
37 # --disable-lzma to avoid problem with shared library clashes, see
38 # https://github.com/termux/termux-packages/issues/511
39 # Only used for LZMA compression support for tiff decoder.
40 $TERMUX_PKG_SRCDIR/configure \
45 --cross-prefix=${TERMUX_HOST_PLATFORM}- \
51 --enable-cross-compile \
63 --prefix=$TERMUX_PREFIX \
65 --extra-libs="-landroid-glob" \
66 $_EXTRA_CONFIGURE_FLAGS