Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
c978934
Update README.md
kewlbear Nov 25, 2013
574ffaf
Update README.md
kewlbear Nov 25, 2013
e36f6be
Update README.md
kewlbear Nov 25, 2013
dc56469
Merge branch 'master' of https://github.com/kewlbear/FFmpeg-iOS-build…
kewlbear Jan 20, 2014
2b3a810
updated FFmpeg source
kewlbear Jan 20, 2014
aa7a566
Create .travis.yml
kewlbear Mar 18, 2014
c540bdf
Update .travis.yml
kewlbear Mar 18, 2014
508f1b3
Update .travis.yml
kewlbear Mar 18, 2014
2d489fb
Update .travis.yml
kewlbear Mar 18, 2014
11a3e43
Update .travis.yml
kewlbear Mar 18, 2014
91d4da4
Update .travis.yml
kewlbear Mar 18, 2014
a8abf82
Create .travis
kewlbear Mar 18, 2014
e26ba20
Update .travis.yml
kewlbear Mar 18, 2014
4bfd59b
Update .travis
kewlbear Mar 18, 2014
5bdcb63
Update .travis
kewlbear Mar 18, 2014
63352c6
Update .travis.yml
kewlbear Mar 18, 2014
61e30cc
Update README.md
kewlbear Mar 18, 2014
1bd6f20
delete unused file [skip ci]
kewlbear Mar 18, 2014
a42ec98
trying sf frs
kewlbear Mar 20, 2014
5b6e576
Update .travis.yml
kewlbear Mar 20, 2014
c377504
Update .travis.yml
kewlbear Mar 20, 2014
959d0f2
Update .travis.yml
kewlbear Mar 20, 2014
db0843f
Update .travis.yml
kewlbear Mar 20, 2014
e2dccd1
Update .travis.yml
kewlbear Mar 20, 2014
04bbc81
trying to identify lipo issue
kewlbear Mar 20, 2014
9157826
Update build-ffmpeg.sh
kewlbear Mar 20, 2014
285b0ec
[ci skip]
kewlbear Mar 20, 2014
fe62925
Update build-ffmpeg.sh
kewlbear Mar 20, 2014
2ac5df2
Update build-ffmpeg.sh
kewlbear Mar 20, 2014
7a8dda1
Added download link. [skip ci]
kewlbear Mar 20, 2014
8a98ccd
Merge pull request #1 from kewlbear/sf
kewlbear Mar 20, 2014
aebdcaa
try to install dependencies automatically
kewlbear Mar 25, 2014
2943b7d
fixed subshell issue
kewlbear Mar 25, 2014
6a64f01
added after_failure
kewlbear Mar 25, 2014
f2ead3c
trying to fix: curl: (35) error:14077458:SSL routines:SSL23_GET_SERVE…
kewlbear Mar 25, 2014
eb3d8bd
try arm64 build on travis
kewlbear Mar 25, 2014
6ce61cd
try arm64 with FFmpeg 2.2
kewlbear Mar 25, 2014
f492e72
still trying FFmpeg 2.2 with arm64
kewlbear Mar 25, 2014
8bd3af2
update README [ci skip]
kewlbear Apr 2, 2014
c2f0d0d
update README [ci skip]
kewlbear Apr 3, 2014
63fe5b6
FFmpeg 2.2.1
kewlbear Apr 14, 2014
a5afbbc
Merge branch '2.2.1'
kewlbear Apr 14, 2014
e975b0c
updated README.md [skip ci]
kewlbear Apr 14, 2014
01e751e
update README [ci skip]
kewlbear Apr 14, 2014
a936026
updated for FFmpeg 2.2.2
kewlbear May 8, 2014
91852a6
Merge branch 'master' of https://github.com/kewlbear/FFmpeg-iOS-build…
kewlbear May 8, 2014
f962b3b
update README [ci skip]
kewlbear May 8, 2014
91bb3c1
Updated for FFmpeg 2.2.3
kewlbear Jun 23, 2014
4a0de9a
Updated for FFmpeg 2.2.4
kewlbear Jun 24, 2014
26dc37d
Added Stack Overflow in Korean link [no ci]
kewlbear Jul 4, 2014
67a5684
update README [ci skip]
kewlbear Jul 10, 2014
5128166
added support for fdk-aac [ci skip]
kewlbear Jul 15, 2014
4090eef
updated to FFmpeg 2.3
kewlbear Jul 21, 2014
2748feb
update README [ci skip]
kewlbear Jul 21, 2014
5752f18
updated to FFmpeg 2.3 [ci skip]
kewlbear Jul 21, 2014
352cbb0
updated for 2.3.1
kewlbear Aug 4, 2014
4ec2fd2
updated for 2.3.3
kewlbear Aug 18, 2014
27380f6
update README [ci skip]
kewlbear Aug 18, 2014
745140d
fix #16
kewlbear Sep 4, 2014
8651a47
Moved x264 script to https://github.com/kewlbear/x264-ios. [skip ci]
kewlbear Sep 15, 2014
4506cb1
updated for 2.4.1
kewlbear Sep 23, 2014
63fcc6c
updated to 2.4.2
kewlbear Oct 6, 2014
d8a6e8c
update for 2.4.3
kewlbear Nov 3, 2014
cba859e
trying to fix gas-preprocessor download problem
kewlbear Nov 3, 2014
0a34a91
updated for 2.4.4
kewlbear Dec 1, 2014
243bc07
updated for 2.5
kewlbear Dec 4, 2014
e7f3be4
updated for 2.5.1
kewlbear Dec 16, 2014
0d6faa7
updated for 2.5.2
kewlbear Dec 24, 2014
9fbe759
updated for 2.5.3
kewlbear Jan 12, 2015
c007455
updated for 2.5.4
kewlbear Feb 16, 2015
74e3f92
updated for 2.6
kewlbear Mar 9, 2015
5a5cd1e
Add new BSD license
ddrugeon Apr 17, 2015
276a477
Add FFmpeg source
ddrugeon Apr 17, 2015
aeaad56
exclude FFmpeg-iOS from sources
ddrugeon Apr 17, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FFmpeg-iOS*
scratch*
thin*
fat*
15 changes: 15 additions & 0 deletions .sf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
U2FsdGVkX1963CBvqs0HeUSGVyB5D9h3ZGt59hEumxSseCqcFaPYkWuVfH2Z7AAp
IKSrSFVBJyjmOFCp0atyz43YHXRfNyxRr3+Y7fKAyTnkEnI+XZVl9GLCLAndeyiX
76V9+YomXl8VXJF7GJoa/37HMbFJ2XniDCsxsPuQm51lkhRUDqU9/g91x3WcQgWN
TpJv1YFg8tL1Dsf82b+zvQ+VhDcbTOcB+BKhHe+MYyR7p13caN20j7hbzvxGXFsV
tjugHZuIhg8EbrDdSP0vAhqgKt7NoW3Enino54/EVjX8VysuP4B3Z9Hi24dWccJf
9WxsTkoaAFPCPXkv5GZ95W73p41G1zPFh5kOHwnli7Kvb6IKSQq/yrfTf5SOTUox
85JAYk3pCPqVSA/v5i6z1e11382jdAszNA8+B916gjK84YRFAkYB40Y+BHvsrqHW
9XL0o6u0BZmUkx+hx78IrwmIewqbq2+6lU+vOTFWevl1pYHQIm8x3IwazM275zu/
e4Rth3sDGiELASjW+LZs2+PwchL7uyxGmlF/YuHJDePWWEl18Hk8lVBebjiY1DqA
ZpaC9VdHpuioK5JxBcZktqw18hVR8hkVQpJUT0PokkEsEf2+oeymY6LgFbnIrO8/
SwBgqjHHRKwbzrLok3cRUiC+gxNWjHi+x+W/QVG4l4On/bsCT/EAxiF+Q+p1U7OC
4YkxNF7A2l1PcNk+PAhy4VyHfOtidcGeRomHj5DiS98QQJCLUaVE4kmVrF1wDYlO
pc9qKtyvhFGz/eEpXmLV9gzHD3S7pKdBU0NAU8wVeeaGOGyX9ISpztQlvEWlPyEQ
ke4M+Pj1CfOQxFc5rX6EoztI+qHogEUcBD9FBYtFswBAcSG9kYhIuORR44LPB6yF
m98e+PfyXGVLGI5GFNV1Sw==
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: objective-c

script: ./build-ffmpeg.sh 2>.stderr

env:
global:
- secure: "POoeB0wNaIPKORu8solBfDwSbgk6bsxSJpVWqVawledYiZHnYLXUDzDawoKOXzjJ1oQQiluZWCmv+RXDA9gthTNrH08fuUEvsUHBr7sgHqaOskEbKN/s2962FLy4FRZdQyZFkrrzNcqnc3xaxgF5ZyjRewtB0JioaOSAPEH8ALc="
- TARBALL=ffmpeg-ios-$TRAVIS_BRANCH.tar.bz2

after_success:
- tar cjf $TARBALL FFmpeg-iOS .stderr scratch/*/config.log ffmpeg*/LICENSE.md ffmpeg*/COPYING.* README.md
- openssl aes-256-cbc -k "$secret" -in .sf -d -a -out id_sf
- chmod 600 id_sf
- scp -i id_sf -o 'StrictHostKeyChecking no' $TARBALL koolbear@frs.sourceforge.net:/home/frs/project/ffmpeg-ios

after_failure: cat .stderr
10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Copyright (c) 2013, kewlbear
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
FFmpeg iOS build script
=======================
# FFmpeg iOS build script

[![Build Status](https://travis-ci.org/kewlbear/FFmpeg-iOS-build-script.svg?branch=master)](https://travis-ci.org/kewlbear/FFmpeg-iOS-build-script)

This is a shell script to build FFmpeg libraries for iOS apps.

Tested with:

* FFmpeg N-56578-g3cfd4df
* Xcode 5
* FFmpeg 2.6
* Xcode 6

## Requirements

* https://github.com/libav/gas-preprocessor
* yasm 1.2.0

Usage
-----
## Usage

* To build everything:

Expand All @@ -26,3 +31,21 @@ Usage
* To build fat libraries from separately built thin libraries:

./build-ffmpeg.sh lipo

## Download

You can download a binary for FFmpeg 2.6 release at https://downloads.sourceforge.net/project/ffmpeg-ios/ffmpeg-ios-master.tar.bz2

## External libraries

You should link your app with

* libz.dylib
* libbz2.dylib
* libiconv.dylib

## Influences

* https://github.com/bbcallen/ijkplayer/blob/fc70895c64cbbd20f32f1d81d2d48609ed13f597/ios/tools/do-compile-ffmpeg.sh#L7

<a href="http://area51.stackexchange.com/proposals/68765/stack-overflow-in-korean?referrer=TlX13ZoocJzZSF-vpU0x_w2"><img src="https://area51.stackexchange.com/ads/proposal/68765.png" width="220" height="250" alt="Stack Exchange Q&A site proposal: Stack Overflow (in Korean)" /></a>
66 changes: 54 additions & 12 deletions build-ffmpeg.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
#!/bin/sh

# directories
SOURCE="ffmpeg"
FAT="fat"
SOURCE="ffmpeg-2.6"
FAT="FFmpeg-iOS"

SCRATCH="scratch"
# must be an absolute path
THIN=`pwd`/"thin"

# absolute path to x264 library
#X264=`pwd`/fat_x264
#X264=`pwd`/fat-x264

CONFIGURE_FLAGS="--enable-cross-compile --disable-debug --disable-ffmpeg \
--disable-ffplay --disable-ffprobe --disable-ffserver \
--disable-doc --disable-encoders --disable-muxers \
--disable-bsfs --disable-devices --disable-filters --enable-pic"
#FDK_AAC=`pwd`/fdk-aac/fdk-aac-ios

CONFIGURE_FLAGS="--enable-cross-compile --disable-debug --disable-programs \
--disable-doc --enable-pic"

if [ "$X264" ]
then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-gpl --enable-libx264"
fi

if [ "$FDK_AAC" ]
then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-libfdk-aac"
fi

# avresample
#CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-avresample"

ARCHS="arm64 armv7s x86_64 i386 armv7"
ARCHS="arm64 armv7s armv7 x86_64 i386"

COMPILE="y"
LIPO="y"
Expand All @@ -49,6 +54,34 @@ fi

if [ "$COMPILE" ]
then
if [ ! `which yasm` ]
then
echo 'Yasm not found'
if [ ! `which brew` ]
then
echo 'Homebrew not found. Trying to install...'
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" \
|| exit 1
fi
echo 'Trying to install Yasm...'
brew install yasm || exit 1
fi
if [ ! `which gas-preprocessor.pl` ]
then
echo 'gas-preprocessor.pl not found. Trying to install...'
(curl -L https://github.com/libav/gas-preprocessor/raw/master/gas-preprocessor.pl \
-o /usr/local/bin/gas-preprocessor.pl \
&& chmod +x /usr/local/bin/gas-preprocessor.pl) \
|| exit 1
fi

if [ ! -r $SOURCE ]
then
echo 'FFmpeg source not found. Trying to download...'
curl http://www.ffmpeg.org/releases/$SOURCE.tar.bz2 | tar xj \
|| exit 1
fi

CWD=`pwd`
for ARCH in $ARCHS
do
Expand Down Expand Up @@ -79,18 +112,24 @@ then
CFLAGS="$CFLAGS -I$X264/include"
LDFLAGS="$LDFLAGS -L$X264/lib"
fi
if [ "$FDK_AAC" ]
then
CFLAGS="$CFLAGS -I$FDK_AAC/include"
LDFLAGS="$LDFLAGS -L$FDK_AAC/lib"
fi

$CWD/$SOURCE/configure \
TMPDIR=${TMPDIR/%\/} $CWD/$SOURCE/configure \
--target-os=darwin \
--arch=$ARCH \
--cc="$CC" \
$CONFIGURE_FLAGS \
--extra-cflags="$CFLAGS" \
--extra-cxxflags="$CXXFLAGS" \
--extra-ldflags="$LDFLAGS" \
--prefix="$THIN/$ARCH"
--prefix="$THIN/$ARCH" \
|| exit 1

make -j3 install $EXPORT
make -j3 install $EXPORT || exit 1
cd $CWD
done
fi
Expand All @@ -105,9 +144,12 @@ then
for LIB in *.a
do
cd $CWD
lipo -create `find $THIN -name $LIB` -output $FAT/lib/$LIB
echo lipo -create `find $THIN -name $LIB` -output $FAT/lib/$LIB 1>&2
lipo -create `find $THIN -name $LIB` -output $FAT/lib/$LIB || exit 1
done

cd $CWD
cp -rf $THIN/$1/include $FAT
fi

echo Done
102 changes: 0 additions & 102 deletions build-x264.sh

This file was deleted.

1 change: 1 addition & 0 deletions ffmpeg-2.6/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.pnm -diff -text
Loading