Commit 8ae8bf7b by olly Committed by Oliver Woodman

Split fetching FFmpeg from build_ffmpeg.sh

It makes it harder to work with a different branch. Also make
the FFmpeg instructions consistent with those of the other
extensions (e.g., by removing the "jni" part of the path from
the FFMPEG_EXT_PATH variable.

PiperOrigin-RevId: 310937751
parent 0fb4ba78
......@@ -25,7 +25,7 @@ follows:
```
cd "<path to exoplayer checkout>"
FFMPEG_EXT_PATH="$(pwd)/extensions/ffmpeg/src/main/jni"
FFMPEG_EXT_PATH="$(pwd)/extensions/ffmpeg/src/main"
```
* Download the [Android NDK][] and set its location in a shell variable.
......@@ -41,6 +41,21 @@ NDK_PATH="<path to Android NDK>"
HOST_PLATFORM="linux-x86_64"
```
* Fetch FFmpeg:
```
cd "${FFMPEG_EXT_PATH}/jni" && \
git clone git://source.ffmpeg.org/ffmpeg ffmpeg
```
* Checkout an appropriate branch of FFmpeg. We cannot guarantee compatibility
with all versions of FFmpeg. We currently recommend version 4.2:
```
cd "${FFMPEG_EXT_PATH}/jni/ffmpeg" && \
git checkout release/4.2
```
* Configure the decoders to include. See the [Supported formats][] page for
details of the available decoders, and which formats they support.
......@@ -48,12 +63,12 @@ HOST_PLATFORM="linux-x86_64"
ENABLED_DECODERS=(vorbis opus flac)
```
* Fetch and build FFmpeg. Executing `build_ffmpeg.sh` will fetch and build
FFmpeg 4.2 for `armeabi-v7a`, `arm64-v8a`, `x86` and `x86_64`. The script can
be edited if you need to build for different architectures.
* Execute `build_ffmpeg.sh` to build FFmpeg for `armeabi-v7a`, `arm64-v8a`,
`x86` and `x86_64`. The script can be edited if you need to build for
different architectures:
```
cd "${FFMPEG_EXT_PATH}" && \
cd "${FFMPEG_EXT_PATH}/jni" && \
./build_ffmpeg.sh \
"${FFMPEG_EXT_PATH}" "${NDK_PATH}" "${HOST_PLATFORM}" "${ENABLED_DECODERS[@]}"
```
......@@ -62,7 +77,7 @@ cd "${FFMPEG_EXT_PATH}" && \
built in the previous step. For example:
```
cd "${FFMPEG_EXT_PATH}" && \
cd "${FFMPEG_EXT_PATH}/jni" && \
${NDK_PATH}/ndk-build APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" -j4
```
......
......@@ -41,10 +41,7 @@ for decoder in "${ENABLED_DECODERS[@]}"
do
COMMON_OPTIONS="${COMMON_OPTIONS} --enable-decoder=${decoder}"
done
cd "${FFMPEG_EXT_PATH}"
(git -C ffmpeg pull || git clone git://source.ffmpeg.org/ffmpeg ffmpeg)
cd ffmpeg
git checkout release/4.2
cd "${FFMPEG_EXT_PATH}/jni/ffmpeg"
./configure \
--libdir=android-libs/armeabi-v7a \
--arch=arm \
......
......@@ -42,9 +42,8 @@ cd "${VP9_EXT_PATH}/jni" && \
git clone https://chromium.googlesource.com/webm/libvpx libvpx
```
* Checkout the appropriate branch of libvpx (the scripts and makefiles bundled
in this repo are known to work only at specific versions of the library - we
will update this periodically as newer versions of libvpx are released):
* Checkout an appropriate branch of libvpx. We cannot guarantee compatibility
with all versions of libvpx. We currently recommend version 1.8.0:
```
cd "${VP9_EXT_PATH}/jni/libvpx" && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment