Skip to content
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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ Certain external libraries require additional software to be installed. Check th

## Features

**Pass extra FFmpeg configuration flags**. You can pass additional flags directly to FFmpeg's `./configure` script using the `--extra-ffmpeg-config-flags` argument. For example:
```bash
./ffmpeg-android-maker.sh --extra-ffmpeg-config-flags="--disable-programs --disable-doc"
```
This allows you to customize the FFmpeg build without modifying the build scripts.

**Add an arbitrary external library that FFMpeg supports to the building process**. Just specify how the source code needs to be downloaded and how to perform the build operation. More about this is [here](https://github.com/Javernaut/ffmpeg-android-maker/wiki/External-libraries-integration).

**Setting your own FFmpeg version and origin**. You can actually override the version of FFmpeg used by the script. See details [here](https://github.com/Javernaut/ffmpeg-android-maker/wiki/Setting-the-FFmpeg-version).
Expand Down
3 changes: 2 additions & 1 deletion scripts/export-build-variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export FAM_YASM=${TOOLCHAIN_PATH}/bin/yasm
export FFMPEG_EXTRA_LD_FLAGS=

# A variable to which certain dependencies can add addtional arguments during ffmpeg build.sh
export EXTRA_BUILD_CONFIGURATION_FLAGS=
# Also includes any user-provided extra configuration flags
export EXTRA_BUILD_CONFIGURATION_FLAGS=${USER_EXTRA_FFMPEG_CONFIG_FLAGS}

export INSTALL_DIR=${BUILD_DIR_EXTERNAL}/${ANDROID_ABI}

Expand Down
10 changes: 9 additions & 1 deletion scripts/parse-arguments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SOURCE_TYPE=TAR
SOURCE_VALUE=7.1.2
EXTERNAL_LIBRARIES=()
FFMPEG_GPL_ENABLED=false
USER_EXTRA_CONFIG_FLAGS=""

# All FREE libraries that are supported
SUPPORTED_LIBRARIES_FREE=(
Expand Down Expand Up @@ -121,7 +122,7 @@ for argument in "$@"; do
;;
--enable-libbluray | -bluray)
EXTERNAL_LIBRARIES+=("libbluray")
;;
;;
--enable-libxml2 | -xml2)
EXTERNAL_LIBRARIES+=("libxml2")
;;
Expand All @@ -132,6 +133,10 @@ for argument in "$@"; do
EXTERNAL_LIBRARIES+=" ${SUPPORTED_LIBRARIES_GPL[@]}"
FFMPEG_GPL_ENABLED=true
;;
# Pass extra FFmpeg configuration flags directly to ./configure
--extra-ffmpeg-config-flags=*)
USER_EXTRA_CONFIG_FLAGS="${argument#*=}"
;;
*)
echo "Unknown argument $argument"
;;
Expand Down Expand Up @@ -159,3 +164,6 @@ export FFMPEG_EXTERNAL_LIBRARIES=${EXTERNAL_LIBRARIES[@]}
# Desired Android API level to use during compilation
# Will be replaced with 21 for 64bit ABIs if the value is less than 21
export DESIRED_ANDROID_API_LEVEL=${API_LEVEL}

# User-provided extra configuration flags for FFmpeg's ./configure
export USER_EXTRA_FFMPEG_CONFIG_FLAGS=${USER_EXTRA_CONFIG_FLAGS}