Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upd ffmpeg to v 3.3 #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ libpng-*
expat-*
fribidi-*
lame-*
ffmpeg-3.*
freetype-*
libass-*

# Created by http://www.gitignore.io

Expand Down
18 changes: 9 additions & 9 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[submodule "ffmpeg"]
path = ffmpeg
url = git://source.ffmpeg.org/ffmpeg.git
# [submodule "ffmpeg"]
# path = ffmpeg
# url = git://source.ffmpeg.org/ffmpeg.git
[submodule "x264"]
path = x264
url = git://git.videolan.org/x264.git
[submodule "freetype2"]
path = freetype2
url = git://git.sv.nongnu.org/freetype/freetype2.git
[submodule "libass"]
path = libass
url = https://github.com/libass/libass.git
# [submodule "freetype2"]
# path = freetype2
# url = git://git.sv.nongnu.org/freetype/freetype2.git
# [submodule "libass"]
# path = libass
# url = https://github.com/libass/libass.git
[submodule "fontconfig"]
path = fontconfig
url = git://anongit.freedesktop.org/fontconfig
14 changes: 7 additions & 7 deletions android_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ do
# $1 = architecture
# $2 = base directory
# $3 = pass 1 if you want to export default compiler environment variables
# ./libpng_build.sh $i $BASEDIR 1 || exit 1
# ./freetype_build.sh $i $BASEDIR 1 || exit 1
# ./expat_build.sh $i $BASEDIR 1 || exit 1
# ./fribidi_build.sh $i $BASEDIR 1 || exit 1
# ./fontconfig_build.sh $i $BASEDIR 1 || exit 1
# ./libass_build.sh $i $BASEDIR 1 || exit 1
# ./lame_build.sh $i $BASEDIR 1 || exit 1
./x264_build.sh $i $BASEDIR 0 || exit 1
./libpng_build.sh $i $BASEDIR 1 || exit 1
./freetype_build.sh $i $BASEDIR 1 || exit 1
./expat_build.sh $i $BASEDIR 1 || exit 1
./fribidi_build.sh $i $BASEDIR 1 || exit 1
./fontconfig_build.sh $i $BASEDIR 1 || exit 1
./libass_build.sh $i $BASEDIR 1 || exit 1
./lame_build.sh $i $BASEDIR 1 || exit 1
./ffmpeg_build.sh $i $BASEDIR 0 || exit 1
done

Expand Down
2 changes: 1 addition & 1 deletion expat_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. abi_settings.sh $1 $2 $3

pushd expat-2.1.0
pushd expat-2.2.0

make clean

Expand Down
1 change: 0 additions & 1 deletion ffmpeg
Submodule ffmpeg deleted from fda00a
File renamed without changes.
19 changes: 10 additions & 9 deletions ffmpeg_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. abi_settings.sh $1 $2 $3

pushd ffmpeg
pushd ffmpeg-3.3.5

case $1 in
armeabi-v7a | armeabi-v7a-neon)
Expand All @@ -22,13 +22,7 @@ make clean
--cpu="$CPU" \
--enable-runtime-cpudetect \
--sysroot="$NDK_SYSROOT" \
--enable-pic \
--enable-libx264 \
--enable-libass \
--enable-libfreetype \
--enable-libfribidi \
--enable-libmp3lame \
--enable-fontconfig \
--enable-pthreads \
--disable-debug \
--disable-ffserver \
Expand All @@ -41,13 +35,20 @@ make clean
--disable-doc \
--disable-shared \
--enable-static \
--pkg-config="${2}/ffmpeg-pkg-config" \
--enable-small \
--disable-network \
--pkg-config="${2}/ffmpeg-pkg-config-for-3.3" \
--prefix="${2}/build/${1}" \
--extra-cflags="-I${TOOLCHAIN_PREFIX}/include $CFLAGS" \
--extra-ldflags="-L${TOOLCHAIN_PREFIX}/lib $LDFLAGS" \
--extra-libs="-lpng -lexpat -lm" \
--extra-libs="-lx264" \
--extra-cxxflags="$CXX_FLAGS" || exit 1

make -j${NUMBER_OF_CORES} && make install || exit 1

popd


# TODO: ENABLE ONLY FILTERS THAT WE USE. NOW GIVES ERROR WHEN USING CONVERT
# --disable-filters \
# --enable-filter=crop,scale,acopy,format,trim,rotate \
1 change: 0 additions & 1 deletion freetype2
Submodule freetype2 deleted from 44accb
2 changes: 1 addition & 1 deletion freetype_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. abi_settings.sh $1 $2 $3

pushd freetype2
pushd freetype-2.7.1

make clean

Expand Down
22 changes: 14 additions & 8 deletions init_update_libs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ echo "Updating submodules"
git submodule update --init
echo "============================================"
echo "Updating libpng, expat and fribidi"
rm -rf libpng-*
rm -rf expat-*
rm -rf fribidi-*
rm -rf lame-*
# rm -rf libpng-*
# rm -rf expat-*
# rm -rf fribidi-*
# rm -rf lame-*
# rm -rf freetype-*
# rm -rf libass-*
rm -rf ffmpeg-*

wget -O- ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.21.tar.xz | tar xJ
wget -O- http://downloads.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz | tar xz
wget -O- http://fribidi.org/download/fribidi-0.19.7.tar.bz2 | tar xj
wget -O- http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz | tar xz
# wget -O- ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.29.tar.xz | tar xJ
# wget -O- https://downloads.sourceforge.net/project/expat/expat/2.2.0/expat-2.2.0.tar.bz2 | tar xj
# wget -O- http://fribidi.org/download/fribidi-0.19.7.tar.bz2 | tar xj
# wget -O- http://sourceforge.net/projects/lame/files/lame/3.99/lame-3.99.5.tar.gz | tar xz
# wget -O- http://download.savannah.gnu.org/releases/freetype/freetype-2.7.1.tar.bz2 | tar xz
# wget -O- https://github.com/libass/libass/releases/download/0.13.6/libass-0.13.6.tar.xz | tar xz
wget -O- https://www.ffmpeg.org/releases/ffmpeg-3.3.5.tar.bz2 | tar xz
echo "============================================"
1 change: 0 additions & 1 deletion libass
Submodule libass deleted from 7c30fe
2 changes: 1 addition & 1 deletion libass_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. abi_settings.sh $1 $2 $3

pushd libass
pushd libass-0.13.6

make clean

Expand Down
2 changes: 1 addition & 1 deletion libpng_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. abi_settings.sh $1 $2 $3

pushd libpng-1.6.21
pushd libpng-1.6.29

make clean

Expand Down
7 changes: 4 additions & 3 deletions settings.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/bash

SUPPORTED_ARCHITECTURES=(armeabi-v7a armeabi-v7a-neon x86)
# SUPPORTED_ARCHITECTURES=(armeabi-v7a armeabi-v7a-neon x86)
SUPPORTED_ARCHITECTURES=(armeabi-v7a)
ANDROID_NDK_ROOT_PATH=${ANDROID_NDK}
if [[ -z "$ANDROID_NDK_ROOT_PATH" ]]; then
echo "You need to set ANDROID_NDK environment variable, please check instructions"
exit
fi
ANDROID_API_VERSION=9
ANDROID_API_VERSION=17
NDK_TOOLCHAIN_ABI_VERSION=4.8

NUMBER_OF_CORES=$(nproc)
NUMBER_OF_CORES=$(sysctl -n hw.ncpu)
HOST_UNAME=$(uname -m)
TARGET_OS=linux

Expand Down