ffmpeg,H264库编译后的Demo工程所需操作的步骤

来源:互联网 发布:ubuntu 16.04分区 编辑:程序博客网 时间:2024/06/03 19:16

感谢原创。

Before use ffmpegc-demo, you should download and compile ffmpeg:

I made a repository to make the step easy:
Shell代码  收藏代码
  1. git clone git@github.com:lvjian700/ffmpegc.git  
  2. cd ffmpegc  
  3. ./install-ffmpeg.sh  
 https://github.com/lvjian700/ffmpegc

If compile complete, you can find universal library in ffmpeg/build folder:

1. ffmpeg core library:

 
2. ffmpeg x264 module. x264 is a H.264/MPEG-4 AVC encoder 

 

Using ffmpeg

1. Clone project first:

Java代码  收藏代码
  1. git@github.com:lvjian700/ffmpegc-demo.git  

2.Open in XCode and copy build/*.a and x264/build/*.a to libs/ folder of the project:


 

3. Add them to project link library

Project References -> Targets -> Build Phases -> Link Binary With Librarys


 

4. Add dependences library:

Project References -> Targets -> Build Phases -> Link Binary With Librarys
Add two library:
  • libbz.dylib
  • libz.dylib
  • libiconv.2.4.0.dylib

 

5. Add Header Search Paths:

Project References -> Targets -> Build Settings -> Header Search Paths
1. add ffmpeg core header paths:

 
2. add x264 header paths: