ffmpeg - iOS 컴파일

Programming/IOS 2012.05.30 00:02 Posted by 파란크리스마스

출처

iOS용 FFmpeg 빌드
[iPhone] ffmpeg 빌드하기
How to cross compile ffmpeg for iOS (iPhone and iPad)
Build m4, autoconf, automake, libtool on Mac OS X Lion
http://www.slideshare.net/hypermin/html5-video

make 커맨드 설치

pkg-config 설치

pkg-config 다운로드

gas-preprocessor 다운로드

gas-preprocessor 다운로드

build-essentials 스크립트 다운로드및 실행

설치되는 항목 m4, autoconf, automake, libtool

https://gist.github.com/1397146

- 디렉토리구조

$HOME
├ local
└ Builds
   └ build-essential
      ├ build-essential.sh
      └ src

- 실행

$ chmod 755 build-essential.sh
$ ./build-essential.sh

- 경로 추가 (~/.profile)

PATH=$PATH:/Users/자신의계정/local/bin

- 확인

압축풀기

- 다운로드

ffmpeg 다운로드

- 압축풀기

$ tar xvfz ffmpeg-0.8.11.tar.bz2

config.sh 파일

./configure --enable-cross-compile \
  --arch=arm \
  --target-os=darwin \
  --cc='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' \
  --as='./gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-llvm-gcc-4.2' \
  --cpu=cortex-a8 \
  --enable-pic \
  --disable-yasm \
  --sysroot='/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk' \
  --extra-cflags='-mfpu=neon -pipe -Os -gdwarf-2 -miphoneos-version-min=5.0' \
  --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -miphoneos-version-min=5.0' \
  --disable-asm \
  --disable-doc \
  --disable-ffmpeg \
  --disable-ffplay \
  --disable-ffprobe \
  --disable-ffserver \
  --enable-avdevice \
  --disable-devices \
  --disable-filters \
  --disable-yasm \
  --enable-network \
  --enable-protocol=tcp \
  --enable-demuxer=rtsp \
  --enable-decoder=h264

$ ./config.sh

$ make

$ sudo make install

신고
TAG , ,


 

티스토리 툴바