Compare commits

..

20 Commits

Author SHA1 Message Date
Taner Sener d8a902a405 Log active sdk version for IOS 2018-12-18 23:28:55 +03:00
Taner Sener 3a52290297 Reorganize Info.plist entries 2018-12-18 21:44:19 +03:00
Taner Sener 3390f7e076 Remove unused gnutls specific IOS_MIN_VERSION variable 2018-12-18 21:37:52 +03:00
Taner Sener 3bd8087fb2 add strip-frameworks.sh script to shared universal library, fixes #55 2018-12-18 21:01:15 +03:00
Taner Sener 776a14dd0b add ios-frameworks wiki assets 2018-12-18 18:12:39 +03:00
Taner Sener 5a2397f39c apply issue #18 patch in ios test application 2018-12-17 20:47:38 +03:00
Taner Sener 5d6b1341b2 add patch script for issue #18 2018-12-17 19:51:45 +03:00
Taner Sener 4ef0f24b1d Merge branch 'master' into dev-v3.x 2018-12-16 22:22:48 +03:00
Taner Sener af2d21458d disable unused devices for ffmpeg IOS build 2018-12-16 22:20:14 +03:00
Taner Sener 5bf6afe0bf disable assembly for xvidcore on IOS x86-64 2018-12-16 22:20:14 +03:00
Taner Sener ca562561e7 fix test errors 2018-12-16 22:20:14 +03:00
Taner Sener e20a27f60d disable unusable devices from ffmpeg android build 2018-12-16 11:53:50 +03:00
Taner Sener 23fecea67f decrease size of ios binaries 2018-12-14 15:11:15 +03:00
Taner Sener 4b1feed331 decrease size of android libraries 2018-12-12 19:17:00 +03:00
Taner Sener 6d5ffc8da0 update versions section as releases 2018-12-12 01:20:02 +03:00
Taner Sener 1cc5d7067c Merge pull request #52 from tanersener/dev-v3.x
fix github page errors
2018-12-12 00:34:27 +03:00
Taner Sener 6c799e4a2e fix github page errors 2018-12-12 00:32:43 +03:00
Taner Sener 28a61a4699 Set theme jekyll-theme-minimal 2018-12-11 22:44:18 +03:00
Taner Sener 99f08588e1 Set theme jekyll-theme-modernist 2018-12-11 22:41:28 +03:00
Taner Sener cd871f5ff8 Merge pull request #51 from tanersener/dev-v3.x
merge v3.1 to master
2018-12-11 00:37:40 +03:00
21 changed files with 243 additions and 124 deletions
+10 -11
View File
@@ -210,29 +210,29 @@ There are eight different binary packages. Below you can see which system librar
7. List enabled external libraries.
```
NASArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
NSArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
```
8. Enable log callback.
```
[MobileFFmpegConfig setLogDelegate:self];
- (void)logCallback: (int)level :(NSString*)message {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"%@", message);
});
}
...
[MobileFFmpegConfig setLogDelegate:self];
```
9. Enable statistics callback.
```
[MobileFFmpegConfig setStatisticsDelegate:self];
- (void)statisticsCallback:(Statistics *)newStatistics {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"frame: %d, time: %d\n", newStatistics.getVideoFrameNumber, newStatistics.getTime);
});
}
...
[MobileFFmpegConfig setStatisticsDelegate:self];
```
10. Set log level.
@@ -253,13 +253,12 @@ execution, video encoding, accessing https, encoding audio, burning subtitles an
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/master/docs/assets/ios_test_app.gif" width="240">
### 3. Versions
### 3. Releases
- `MobileFFmpeg v1.x` is the previous stable, includes `FFmpeg v3.4.4`
- `MobileFFmpeg v2.x` is the current stable, includes `FFmpeg v4.0.3`
- `MobileFFmpeg v3.x` is the next stable, includes `FFmpeg v4.1-10`
| | v1.0 | v1.1 | v1.2 | v2.0 | v2.1 | v2.2 | v3.0 | v3.1 |
| :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: | :----: |
| FFmpeg | 3.4.2 | 3.4.2 | 3.4.4 | 4.0.1 | 4.0.2 | 4.0.3 | 4.1-dev-1517 | v4.1-10 |
| packages | min<br/>full | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl | min<br/>min-gpl<br/>https<br/>https-gpl<br/>audio<br/>video<br/>full<br/>full-gpl |
### 4. Building
#### 4.1 Prerequisites
+57 -19
View File
@@ -211,20 +211,35 @@ get_size_optimization_cflags() {
ARCH_OPTIMIZATION=""
case ${ARCH} in
arm-v7a | arm-v7a-neon | arm64-v8a)
if [[ $1 -eq libwebp ]]; then
ARCH_OPTIMIZATION="-Os"
else
ARCH_OPTIMIZATION="-Os -finline-limit=64"
fi
arm-v7a | arm-v7a-neon)
case $1 in
ffmpeg)
ARCH_OPTIMIZATION="-flto -O2 -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
;;
arm64-v8a)
case $1 in
ffmpeg | nettle)
ARCH_OPTIMIZATION="-flto -fuse-ld=gold -O2 -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
;;
x86 | x86-64)
if [[ $1 -eq libvpx ]]; then
ARCH_OPTIMIZATION="-O2"
else
ARCH_OPTIMIZATION="-O2 -finline-limit=300"
fi
case $1 in
ffmpeg)
ARCH_OPTIMIZATION="-flto -Os -ffunction-sections -fdata-sections"
;;
*)
ARCH_OPTIMIZATION="-Os -ffunction-sections -fdata-sections"
;;
esac
;;
esac
@@ -277,16 +292,19 @@ get_cflags() {
get_cxxflags() {
case $1 in
gnutls)
echo "-std=c++11 -fno-rtti"
echo "-std=c++11 -fno-rtti -Os -ffunction-sections -fdata-sections"
;;
ffmpeg)
echo "-std=c++11 -fno-exceptions -fno-rtti -flto -O2 -ffunction-sections -fdata-sections"
;;
opencore-amr)
echo ""
echo "-Os -ffunction-sections -fdata-sections"
;;
x265)
echo "-std=c++11 -fno-exceptions"
echo "-std=c++11 -fno-exceptions -Os -ffunction-sections -fdata-sections"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti"
echo "-std=c++11 -fno-exceptions -fno-rtti -Os -ffunction-sections -fdata-sections"
;;
esac
}
@@ -310,10 +328,24 @@ get_common_linked_libraries() {
get_size_optimization_ldflags() {
case ${ARCH} in
arm64-v8a)
echo "-Wl,--gc-sections"
case $1 in
ffmpeg | nettle)
echo "-Wl,--gc-sections -flto -fuse-ld=gold -O2 -ffunction-sections -fdata-sections -finline-functions"
;;
*)
echo "-Wl,--gc-sections -Os -ffunction-sections -fdata-sections"
;;
esac
;;
*)
echo "-Wl,--gc-sections,--icf=safe"
case $1 in
ffmpeg)
echo "-Wl,--gc-sections,--icf=safe -flto -O2 -ffunction-sections -fdata-sections -finline-functions"
;;
*)
echo "-Wl,--gc-sections,--icf=safe -Os -ffunction-sections -fdata-sections"
;;
esac
;;
esac
}
@@ -340,7 +372,7 @@ get_arch_specific_ldflags() {
get_ldflags() {
ARCH_FLAGS=$(get_arch_specific_ldflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags)
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags $1)
COMMON_LINKED_LIBS=$(get_common_linked_libraries $1)
echo "${ARCH_FLAGS} ${OPTIMIZATION_FLAGS} ${COMMON_LINKED_LIBS}"
@@ -917,6 +949,12 @@ set_toolchain_clang_paths() {
export AS=${TARGET_HOST}-as
fi
case ${ARCH} in
arm64-v8a)
export ac_cv_c_bigendian=no
;;
esac
export LD=${TARGET_HOST}-ld
export RANLIB=${TARGET_HOST}-ranlib
export STRIP=${TARGET_HOST}-strip
+10 -4
View File
@@ -303,14 +303,15 @@ echo -n -e "\n${LIB_NAME}: "
make distclean 2>/dev/null 1>/dev/null
export CFLAGS="${HIGH_PRIORITY_INCLUDES} ${CFLAGS}"
export CXXFLAGS="${CXXFLAGS}"
export LDFLAGS="${LDFLAGS}"
./configure \
--cross-prefix="${TARGET_HOST}-" \
--sysroot="${ANDROID_NDK_ROOT}/toolchains/mobile-ffmpeg-api-${API}-${TOOLCHAIN}/sysroot" \
--prefix="${BASEDIR}/prebuilt/android-$(get_target_build)/${LIB_NAME}" \
--pkg-config="${HOST_PKG_CONFIG_PATH}" \
--extra-cflags="${HIGH_PRIORITY_INCLUDES} ${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--enable-version3 \
--arch="${TARGET_ARCH}" \
--cpu="${TARGET_CPU}" \
@@ -319,10 +320,15 @@ make distclean 2>/dev/null 1>/dev/null
--enable-cross-compile \
--enable-pic \
--enable-jni \
--enable-lto \
--enable-optimizations \
--enable-swscale \
--enable-shared \
--enable-v4l2-m2m \
--disable-v4l2-m2m \
--disable-outdev=v4l2 \
--disable-outdev=fbdev \
--disable-indev=v4l2 \
--disable-indev=fbdev \
${SIZE_OPTIONS} \
--disable-openssl \
--disable-xmm-clobber-test \
+82 -28
View File
@@ -138,18 +138,12 @@ get_sdk_path() {
}
get_min_version_cflags() {
local min_version=${IOS_MIN_VERSION}
if [ "$1" == "gnutls" ]; then
min_version=${GNUTLS_IOS_MIN_VERSION}
fi
case ${ARCH} in
armv7 | armv7s | arm64)
echo "-miphoneos-version-min=${min_version}"
echo "-miphoneos-version-min=${IOS_MIN_VERSION}"
;;
i386 | x86-64)
echo "-mios-simulator-version-min=${min_version}"
echo "-mios-simulator-version-min=${IOS_MIN_VERSION}"
;;
esac
}
@@ -194,19 +188,52 @@ get_size_optimization_cflags() {
ARCH_OPTIMIZATION=""
case ${ARCH} in
armv7 | armv7s | arm64)
if [[ $1 -eq libwebp ]]; then
ARCH_OPTIMIZATION="-Os -Wno-ignored-optimization-argument"
else
ARCH_OPTIMIZATION="-Os -finline-limit=64 -Wno-ignored-optimization-argument"
fi
case $1 in
x264)
ARCH_OPTIMIZATION="-Oz"
;;
x265 | ffmpeg | mobile-ffmpeg)
ARCH_OPTIMIZATION="-flto=thin -Oz"
;;
*)
ARCH_OPTIMIZATION="-flto -Oz"
;;
esac
;;
i386 | x86-64)
if [[ $1 -eq libvpx ]]; then
ARCH_OPTIMIZATION="-O2 -Wno-ignored-optimization-argument"
else
ARCH_OPTIMIZATION="-O2 -finline-limit=300 -Wno-ignored-optimization-argument"
fi
case $1 in
x264 | ffmpeg)
ARCH_OPTIMIZATION="-O2"
;;
x265)
ARCH_OPTIMIZATION="-flto=thin -O2"
;;
*)
ARCH_OPTIMIZATION="-flto -O2"
;;
esac
;;
esac
echo "${ARCH_OPTIMIZATION}"
}
get_size_optimization_asm_cflags() {
ARCH_OPTIMIZATION=""
case $1 in
jpeg | ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64)
ARCH_OPTIMIZATION="-Oz"
;;
i386 | x86-64)
ARCH_OPTIMIZATION="-O2"
;;
esac
;;
*)
ARCH_OPTIMIZATION=$(get_size_optimization_cflags $1)
;;
esac
@@ -282,7 +309,7 @@ get_asmflags() {
APP_FLAGS=$(get_app_specific_cflags $1)
COMMON_FLAGS=$(get_common_cflags)
if [[ -z ${MOBILE_FFMPEG_DEBUG} ]]; then
OPTIMIZATION_FLAGS=$(get_size_optimization_cflags $1)
OPTIMIZATION_FLAGS=$(get_size_optimization_asm_cflags $1)
else
OPTIMIZATION_FLAGS=""
fi
@@ -294,6 +321,7 @@ get_asmflags() {
get_cxxflags() {
local COMMON_CFLAGS="$(get_common_cflags $1) $(get_common_includes $1) $(get_arch_specific_cflags) $(get_min_version_cflags $1)"
local OPTIMIZATION_CFLAGS="-Oz"
local BITCODE_FLAGS=""
case ${ARCH} in
@@ -304,22 +332,22 @@ get_cxxflags() {
case $1 in
x265)
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
gnutls)
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
opencore-amr)
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
echo "-fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
libwebp | xvidcore)
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} -fno-common -DPIC ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
libaom)
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
*)
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS}"
echo "-std=c++11 -fno-exceptions -fno-rtti ${BITCODE_FLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS}"
;;
esac
}
@@ -332,6 +360,31 @@ get_common_ldflags() {
echo "-isysroot ${SDK_PATH}"
}
get_size_optimization_ldflags() {
case ${ARCH} in
armv7 | armv7s | arm64)
case $1 in
ffmpeg | mobile-ffmpeg)
echo "-flto=thin -Oz"
;;
*)
echo "-flto -Oz"
;;
esac
;;
*)
case $1 in
ffmpeg)
echo "-O2"
;;
*)
echo "-flto -O2"
;;
esac
;;
esac
}
get_arch_specific_ldflags() {
case ${ARCH} in
armv7)
@@ -355,21 +408,22 @@ get_arch_specific_ldflags() {
get_ldflags() {
ARCH_FLAGS=$(get_arch_specific_ldflags)
LINKED_LIBRARIES=$(get_common_linked_libraries)
OPTIMIZATION_FLAGS=$(get_size_optimization_ldflags $1)
COMMON_FLAGS=$(get_common_ldflags)
case $1 in
mobile-ffmpeg)
case ${ARCH} in
armv7 | armv7s | arm64)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} -fembed-bitcode -Wc,-fembed-bitcode ${OPTIMIZATION_FLAGS}"
;;
*)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS}"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}"
;;
esac
;;
*)
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS}"
echo "${ARCH_FLAGS} ${LINKED_LIBRARIES} ${COMMON_FLAGS} ${OPTIMIZATION_FLAGS}"
;;
esac
}
+8 -6
View File
@@ -352,9 +352,9 @@ LINKED_LIBRARIES=$(get_common_linked_libraries);
COMMON_LDFLAGS=$(get_common_ldflags);
# REORDERED FLAGS
CFLAGS="${ARCH_CFLAGS} ${APP_CFLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS} ${MIN_VERSION_CFLAGS} ${FFMPEG_CFLAGS} ${COMMON_INCLUDES}"
CXXFLAGS=$(get_cxxflags ${LIB_NAME})
LDFLAGS="${ARCH_LDFLAGS} ${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS}"
export CFLAGS="${ARCH_CFLAGS} ${APP_CFLAGS} ${COMMON_CFLAGS} ${OPTIMIZATION_CFLAGS} ${MIN_VERSION_CFLAGS} ${FFMPEG_CFLAGS} ${COMMON_INCLUDES}"
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS="${ARCH_LDFLAGS} ${FFMPEG_LDFLAGS} ${LINKED_LIBRARIES} ${COMMON_LDFLAGS} ${BITCODE_FLAGS}"
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
@@ -365,9 +365,6 @@ make distclean 2>/dev/null 1>/dev/null
./configure \
--sysroot=${SDK_PATH} \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--extra-cflags="${CFLAGS}" \
--extra-cxxflags="${CXXFLAGS}" \
--extra-ldflags="${LDFLAGS}" \
--enable-version3 \
--arch="${TARGET_ARCH}" \
--cpu="${TARGET_CPU}" \
@@ -387,6 +384,11 @@ make distclean 2>/dev/null 1>/dev/null
--enable-swscale \
${BUILD_LIBRARY_OPTIONS} \
${SIZE_OPTIONS} \
--disable-v4l2-m2m \
--disable-outdev=v4l2 \
--disable-outdev=fbdev \
--disable-indev=v4l2 \
--disable-indev=fbdev \
--disable-openssl \
--disable-xmm-clobber-test \
--disable-debug \
+5 -1
View File
@@ -38,6 +38,7 @@ TARGET_HOST=$(get_target_host)
export CFLAGS=$(get_cflags ${LIB_NAME})
export CXXFLAGS=$(get_cxxflags ${LIB_NAME})
export LDFLAGS=$(get_ldflags ${LIB_NAME})
export ASM_FLAGS=$(get_asmflags ${LIB_NAME})
cd ${BASEDIR}/src/${LIB_NAME} || exit 1
@@ -48,6 +49,9 @@ fi
mkdir build || exit 1
cd build || exit 1
# fixing asm flags
${SED_INLINE} 's/${CMAKE_C_FLAGS} ${CMAKE_ASM_FLAGS}/${CMAKE_ASM_FLAGS}/g' ${BASEDIR}/src/${LIB_NAME}/simd/CMakeLists.txt
cmake -Wno-dev \
-DCMAKE_VERBOSE_MAKEFILE=0 \
-DCMAKE_C_FLAGS="${CFLAGS}" \
@@ -61,7 +65,7 @@ cmake -Wno-dev \
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_LINKER="$LD" \
-DCMAKE_AR="$AR" \
-DCMAKE_AS="$AS" \
-DCMAKE_ASM_FLAGS="$ASM_FLAGS" \
-DENABLE_PIC=1 \
-DENABLE_STATIC=1 \
-DENABLE_SHARED=0 \
+4
View File
@@ -48,6 +48,10 @@ if [[ ${RECONF_libvorbis} -eq 1 ]]; then
autoreconf_library ${LIB_NAME}
fi
# -force_cpusubtype_ALL FLAG REMOVED DUE TO THE FOLLOWING ERROR
# ld: -force_cpusubtype_ALL and -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES) cannot be used together
${SED_INLINE} 's/-force_cpusubtype_ALL//g' ${BASEDIR}/src/${LIB_NAME}/configure
./configure \
--prefix=${BASEDIR}/prebuilt/ios-$(get_target_host)/${LIB_NAME} \
--with-pic \
+1 -2
View File
@@ -47,7 +47,6 @@ cd ${BASEDIR}/src/${LIB_NAME} || exit 1
make distclean 2>/dev/null 1>/dev/null
ASM_FLAGS=""
case ${ARCH} in
i386 |x86-64)
if ! [ -x "$(command -v nasm)" ]; then
@@ -64,8 +63,8 @@ esac
--enable-pic \
--sysroot=${SDK_PATH} \
--enable-static \
--enable-lto \
--disable-cli \
${ASM_FLAGS} \
--host=${TARGET_HOST} || exit 1
make ${MOBILE_FFMPEG_DEBUG} -j$(get_cpu_count) || exit 1
+1 -4
View File
@@ -61,12 +61,9 @@ case ${ARCH} in
${SED_INLINE} 's/-Wl,-read_only_relocs,suppress//g' configure
;;
i386)
i386 | x86-64)
ASM_FLAGS="--disable-assembly"
;;
x86-64)
ASM_FLAGS=""
;;
esac
./configure \
+3
View File
@@ -1 +1,4 @@
/_site/
/Gemfile
/Gemfile.lock
/.jekyll-metadata
Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

+6 -16
View File
@@ -3,7 +3,7 @@ layout: default
---
FFmpeg for Android and IOS
<img src="https://github.com/tanersener/mobile-ffmpeg/blob/dev-v3.x/docs/assets/mobile-ffmpeg-logo-v7.png" width="240">
<img src="https://github.com/tanersener/mobile-ffmpeg/raw/dev-v3.x/docs/assets/mobile-ffmpeg-logo-v7.png" width="240">
### 1. Features
- Supports FFmpeg `v3.4.x`, `v4.0.x` and `v4.1` releases
@@ -33,7 +33,6 @@ There are eight different prebuilt packages. Below you can see which external li
<table>
<thead>
<tr>
<th align="center"></th>
<th align="center">min</th>
<th align="center">min-gpl</th>
<th align="center">https</th>
@@ -46,7 +45,6 @@ There are eight different prebuilt packages. Below you can see which external li
</thead>
<tbody>
<tr>
<td align="center"><sup>external libraries</sup></td>
<td align="center">-</td>
<td align="center"><sup>vid.stab</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
<td align="center"><sup>gmp</sup><br><sup>gnutls</sup></td>
@@ -56,14 +54,6 @@ There are eight different prebuilt packages. Below you can see which external li
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>wavpack</sup></td>
<td align="center"><sup>chromaprint</sup><br><sup>fontconfig</sup><br><sup>freetype</sup><br><sup>fribidi</sup><br><sup>gmp</sup><br><sup>gnutls</sup><br><sup>kvazaar</sup><br><sup>lame</sup><br><sup>libaom</sup><br><sup>libass</sup><br><sup>libiconv</sup><br><sup>libilbc</sup><br><sup>libtheora</sup><br><sup>libvorbis</sup><br><sup>libvpx</sup><br><sup>libwebp</sup><br><sup>libxml2</sup><br><sup>opencore-amr</sup><br><sup>opus</sup><br><sup>sdl</sup><br><sup>shine</sup><br><sup>snappy</sup><br><sup>soxr</sup><br><sup>speex</sup><br><sup>tesseract</sup><br><sup>twolame</sup><br><sup>vid.stab</sup><br><sup>wavpack</sup><br><sup>x264</sup><br><sup>x265</sup><br><sup>xvidcore</sup></td>
</tr>
<tr>
<td align="center"><sup>android system libraries</sup></td>
<td align="center" colspan=8><sup>zlib</sup><br><sup>MediaCodec</sup></td>
</tr>
<tr>
<td align="center"><sup>ios system libraries</sup></td>
<td align="center" colspan=8><sup>zlib</sup><br><sup>AudioToolbox</sup><br><sup>AVFoundation</sup><br><sup>CoreImage</sup><br><sup>VideoToolbox</sup><br><sup>bzip2</sup></td>
</tr>
</tbody>
</table>
@@ -192,29 +182,29 @@ There are eight different prebuilt packages. Below you can see which external li
7. List enabled external libraries.
```
NASArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
NSArray *externalLibraries = [MobileFFmpegConfig getExternalLibraries];
```
8. Enable log callback.
```
[MobileFFmpegConfig setLogDelegate:self];
- (void)logCallback: (int)level :(NSString*)message {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"%@", message);
});
}
...
[MobileFFmpegConfig setLogDelegate:self];
```
9. Enable statistics callback.
```
[MobileFFmpegConfig setStatisticsDelegate:self];
- (void)statisticsCallback:(Statistics *)newStatistics {
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"frame: %d, time: %d\n", newStatistics.getVideoFrameNumber, newStatistics.getTime);
});
}
...
[MobileFFmpegConfig setStatisticsDelegate:self];
```
10. Set log level.
+12 -16
View File
@@ -66,11 +66,8 @@ export BASEDIR=$(pwd)
export MOBILE_FFMPEG_TMPDIR="${BASEDIR}/.tmp"
# MIN VERSION IOS7
export IOS_MIN_VERSION=8.0
# UPDATE THIS TO 8.0 WHEN GNUTLS IS UPGRADED TO 3.6.x line
export GNUTLS_IOS_MIN_VERSION=8.0
# MIN XCODE 7.3 HAS SDK 9.3
export IOS_MIN_VERSION=9.3
get_mobile_ffmpeg_version() {
local MOBILE_FFMPEG_VERSION=$(grep 'MOBILE_FFMPEG_VERSION' ${BASEDIR}/ios/src/MobileFFmpeg.m | grep -Eo '\".*\"' | sed -e 's/\"//g')
@@ -475,9 +472,6 @@ print_enabled_libraries() {
fi
}
#
# Note that MinimumOSVersion is set to 8.0, because dynamic frameworks are supported by IOS 8 and later.
#
build_info_plist() {
local FILE_PATH="$1"
local FRAMEWORK_NAME="$2"
@@ -506,14 +500,10 @@ build_info_plist() {
<string>${FRAMEWORK_SHORT_VERSION}</string>
<key>CFBundleVersion</key>
<string>${FRAMEWORK_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<string>${IOS_MIN_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
@@ -546,8 +536,9 @@ XCODE_FOR_MOBILE_FFMPEG=~/.xcode.for.mobile.ffmpeg.sh
if [[ -f ${XCODE_FOR_MOBILE_FFMPEG} ]]; then
source ${XCODE_FOR_MOBILE_FFMPEG} 1>>${BASEDIR}/build.log 2>&1
fi
DETECTED_IOS_SDK_VERSION="$(xcrun --sdk iphoneos --show-sdk-version)"
echo -e "Using Xcode provided at $(xcode-select -p)\n" 1>>${BASEDIR}/build.log 2>&1
echo -e "INFO: Using SDK ${DETECTED_IOS_SDK_VERSION} by Xcode provided at $(xcode-select -p)\n" 1>>${BASEDIR}/build.log 2>&1
while [ ! $# -eq 0 ]
do
@@ -904,6 +895,11 @@ if [[ ! -z ${TARGET_ARCH_LIST} ]]; then
cp ${BASEDIR}/LICENSE.LGPLv3 ${MOBILE_FFMPEG_UNIVERSAL}/LICENSE 1>>${BASEDIR}/build.log 2>&1
fi
# COPYING STRIP SCRIPT FOR SHARED LIBRARY
if [[ -z ${MOBILE_FFMPEG_STATIC} ]]; then
cp ${BASEDIR}/tools/release/ios/strip-frameworks.sh ${MOBILE_FFMPEG_UNIVERSAL} 1>>${BASEDIR}/build.log 2>&1
fi
echo -e "Created fat-binary mobileffmpeg successfully.\n" 1>>${BASEDIR}/build.log 2>&1
echo -e "ok\n"
@@ -47,14 +47,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
34D26CEF210F5D2C005B3A32 /* libavcodec.framework in Embed Frameworks */,
34D26CF0210F5D2C005B3A32 /* libavdevice.framework in Embed Frameworks */,
34D26CF1210F5D2C005B3A32 /* libavfilter.framework in Embed Frameworks */,
34D26CF2210F5D2C005B3A32 /* libavformat.framework in Embed Frameworks */,
34D26CF3210F5D2C005B3A32 /* libavutil.framework in Embed Frameworks */,
34D26CF4210F5D2C005B3A32 /* libswresample.framework in Embed Frameworks */,
34D26CF5210F5D2C005B3A32 /* libswscale.framework in Embed Frameworks */,
34D26CF6210F5D2C005B3A32 /* mobileffmpeg.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -159,15 +151,6 @@
isa = PBXGroup;
children = (
34FAE213209F7DDD005CE2AE /* AppDelegate.h */,
345745492113B8AD00059043 /* AudioViewController.h */,
34FAE216209F7DDD005CE2AE /* CommandViewController.h */,
343E66B7210789DE00F95E5B /* Constants.h */,
343E66B3210784BD00F95E5B /* HttpsViewController.h */,
3457454D2113B8D300059043 /* SubtitleViewController.h */,
343E67072107C27600F95E5B /* TabBarController.h */,
343E67032107AD0100F95E5B /* Util.h */,
34FAE219209F7DDD005CE2AE /* VideoViewController.h */,
340FABBC2115A17600B33CE7 /* VidStabViewController.h */,
34FAE214209F7DDD005CE2AE /* AppDelegate.m */,
34FAE21F209F7DDE005CE2AE /* Assets.xcassets */,
345745492113B8AD00059043 /* AudioViewController.h */,
@@ -239,6 +222,7 @@
34F9744020A1A200004A1F68 /* Headers */,
3452D8CF20A373640045E6B0 /* Embed Frameworks */,
DFE64F47D0B2AA62D946772E /* [CP] Embed Pods Frameworks */,
34DFD8C121C8187400D6551D /* ShellScript */,
);
buildRules = (
);
@@ -304,6 +288,19 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
34DFD8C121C8187400D6551D /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"Applying patch for https://github.com/tanersener/mobile-ffmpeg/issues/18\"\ncd \"${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\n\nINFO_PLIST_FILES=$(find . -name Info.plist | grep 'libswresample\\|libavfilter\\|libavformat\\|libavutil\\|libswscale\\|libavdevice\\|libavcodec\\|mobileffmpeg')\n\nfor INFO_PLIST in ${INFO_PLIST_FILES};\ndo\nexisting_key_line_number=$(sed -n '/MinimumOS/=' ${INFO_PLIST})\nif [[ -z ${existing_key_line_number} ]]; then\nsed -i .tmp \"s/<\\/dict/ <key>MinimumOSVersion<\\/key>\\\\\n<string>9.3<\\/string>\\\\\n<\\/dict/g\" ${INFO_PLIST}\nrm -f \"${INFO_PLIST}.tmp\"\necho \"Patch added MinimumOSVersion key & value at ${INFO_PLIST}\"\nelse\nsed -i .tmp \"$((existing_key_line_number+1))s/.*/ <string>9.3<\\/string>/\" ${INFO_PLIST}\nrm -f \"${INFO_PLIST}.tmp\"\necho \"Patch replaced MinimumOSVersion value at ${INFO_PLIST}\"\nfi\ndone";
};
5E094331BD641A4FE317B9CB /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
+1
View File
@@ -5,3 +5,4 @@
/*.lo
/*.la
/jsimdcfg.inc
/CMakeLists.txt.tmp
+29
View File
@@ -0,0 +1,29 @@
#
# Patch for issue https://github.com/tanersener/mobile-ffmpeg/issues/18
#
# Required environment variables
#
# BUILT_PRODUCTS_DIR
# FRAMEWORKS_FOLDER_PATH
echo "Applying patch for https://github.com/tanersener/mobile-ffmpeg/issues/18"
cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}"
INFO_PLIST_FILES=$(find . -name Info.plist | grep 'libswresample\|libavfilter\|libavformat\|libavutil\|libswscale\|libavdevice\|libavcodec\|mobileffmpeg')
for INFO_PLIST in ${INFO_PLIST_FILES};
do
existing_key_line_number=$(sed -n '/MinimumOS/=' ${INFO_PLIST})
if [[ -z ${existing_key_line_number} ]]; then
sed -i .tmp "s/<\/dict/ <key>MinimumOSVersion<\/key>\\
<string>9.3<\/string>\\
<\/dict/g" ${INFO_PLIST}
rm -f "${INFO_PLIST}.tmp"
echo "Patch added MinimumOSVersion key & value at ${INFO_PLIST}"
else
sed -i .tmp "$((existing_key_line_number+1))s/.*/ <string>9.3<\/string>/" ${INFO_PLIST}
rm -f "${INFO_PLIST}.tmp"
echo "Patch replaced MinimumOSVersion value at ${INFO_PLIST}"
fi
done