티스토리 뷰

Programming/IOS

ffmpeg - iOS 컴파일

파란크리스마스 2012. 5. 30. 00:02
728x90

출처

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

댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함