Compile FFMPEG + for + IOS for iPhone + IOs (reposted and modified)

Source: Internet
Author: User

The following are some of your friendly support:

Made a product, need popularity support a bit, Android and iPhone 91 market search # super junior mission #, or directly to the page to download the http://m.ixingji.com/m.html? P = x16

1. mov Format Parsing

Http://blog.csdn.net/sunshine1314/article/details/2547275

2. MoV parses open-source projects: bento4 and FFMPEG. Among them, bento4 directly has the xcode project file and more detailed test code.

3. How to parse the frame image of FFMPEG, see extracting-frames-from-movies-on-iPhone

Http://www.codza.com/extracting-frames-from-movies-on-iphone

4. FFmpeg iPhone Compilation

Http://www.cnblogs.com/wwwkhd/archive/2011/08/09/2131780.html

5. autoscan, aclocal, autoheader, automake, Autoconf, configure, and make

Http://jaguar13.iteye.com/blog/614427

6 chapter 1 Common Errors of make

Http://www.linuxsir.org/main/doc/gnumake/GNUmake_v3.80-zh_CN_html/make-15.html

1. Download:

Git clone git: // github.com/lajos/iframeextractor.git

 

2. Edit:

Build_armv6 and build_armv7. Modify the parameters following./configure, mainly the SDK version. My version is 4.3 and changed:

. /Configure -- disable-doc -- disable-FFMPEG -- disable-ffplay -- disable-ffserver -- enable-Cross-compile -- arch = arm -- target-OS = Darwin -- cc =/developer/ platforms/iphoneos. platform/developer/usr/bin/GCC -- As = 'Gas-Preprocessor/gas-preprocessor.pl/developer/platforms/iphoneos. platform/developer/usr/bin/GCC'
-- Sysroot =/developer/platforms/iphoneos. platform/developer/sdks/iphoneos4.3.sdk -- CPU = arm1176jzf-s -- extra-cflags = '-arch armv6' -- extra-ldflags = '-arch armv6'

 

3. Compile:

Error, prompt:

 

/Developer/platforms/iphoneos. Platform/developer/usr/bin/GCC is unable to create an executable file.

C Compiler Test failed.

View config. err file, the last prompt is: LD: file not found:/usr/lib/system/libcache. dylib for architecture armv7collect2: LD returned 1 exit status4. re-Modify the configure parameter :. /configure -- disable-doc -- disable-FFMPEG -- disable-ffplay -- disable-ffserver -- enable-Cross-compile -- arch = arm -- target-OS = Darwin -- cc =/developer/ platforms/iphoneos. platform/developer/usr/bin/GCC -- As = 'Gas-Preprocessor/gas-preprocessor.pl/developer/platforms/iphoneos. platform/developer/usr/bin/GCC'
-- Sysroot =/developer/platforms/iphoneos. platform/developer/sdks/iphoneos4.3.sdk -- CPU = cortex-a8 -- extra-cflags = '-arch armv7' -- extra-ldflags ='-arch armv7-isysroot/developer/platforms/iphoneos. platform/developer/sdks/iphoneos4.3.sdk '-- enable-pic5. compile: build_armv7 finally generates a static library in the lib directory and armv7 directory. 6. use xcode (my version is 4.0) to open iframeextractor. xcodeproj. An error occurs during compilation. You need to modify the following items: select the project on the left, select target in the middle, select build settings on the right, and select optimize etures as optimized (armv7) on the ubuntures tab ), set base SDK to latest IOS (IOS 4.3) Valid ubuntures to armv7. set the compilation target to iOS device. Of course, if you have devices connected to your computer, you can select a device. compile, prompt:

Undefined symbols for architecture armv7:

"_ Bz2_bzdecompressinit", referenced from:

_ Matroska_decode_buffer in libavformat. A (matroskadec. O)

"_ Bz2_bzdecompressend", referenced from:

_ Matroska_decode_buffer in libavformat. A (matroskadec. O)

"_ Bz2_bzdecompress", referenced from:

_ Matroska_decode_buffer in libavformat. A (matroskadec. O)

 

Add library libbz2.1.0.dylib, compile again, OK through.

 

7. Changed the FFMPEG version to the latest version (0.7). During compilation, copy common. Mak to the new version directory.

An error occurs during compilation:

Error:. endm without. Macro at/usr/local/bin/gas-preprocessor.pl line 83, <asmfile> line 55

Use libavcodec/ARM/ASM. s of the old version and libavcoec/ARM/dsputil_arm.s of the old version to overwrite the new version (in fact, I suspect that only ASM. s can be overwritten). Just recompile it.

Verified: two files must be overwritten at the same time. In this step, I did not follow the original article. I modified the code in FFMPEG according to the error prompt (changed the two files mentioned above, and there are other errors) before compiling. It should not be difficult to change. Original article: Comment
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.