`
witcheryne
  • 浏览: 1093884 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

Compile ffmpeg for iOS 6, support Simulator & armv7 & armv7s

阅读更多

In the posts, I will show how to use ffmpeg on iOS.

 

This posts is a document for this project: 

https://github.com/lvjian700/ffmpegc-demo

 

Now, ffmpec support x264 module. If you use the script before, please check your version first. 

 

What is ffmpeg ?

FFmpeg is a complete, across-platform solution to record, convert and stream audio and video. 

Why use ffmpeg?

  • Play h.264 video
  • encoding capture video to h.264 video(It need ffmpeg h.264 module.)
  • publish a av stream
  • subscribe a rtsp av stream

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

I made a repository to make the step easy:
git clone git@github.com:lvjian700/ffmpegc.git
cd ffmpegc
./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:

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:

 
 

 

6. Now, run project ...

 

Some useful document:

《How to prepare your mac for ios development with ffmpeg libraries》

《ffmpeg configure options》 -pdf

 

 

  • 大小: 69.9 KB
  • 大小: 44.8 KB
  • 大小: 44.8 KB
  • 大小: 247.8 KB
  • 大小: 238 KB
  • 大小: 71.1 KB
  • 大小: 82.4 KB
  • 大小: 108.4 KB
  • 大小: 131.2 KB
1
0
分享到:
评论
5 楼 akwynn 2014-04-02  
好东西。。。顶起!
4 楼 witcheryne 2013-08-30  
berained 写道
可以运行,但是没有声音,是否是声音未解码,还是我编译的有问题

只做了图像解码。 声音你要自己研究了。
推荐项目: https://github.com/kinglonghuang/kxmovie (编译好后可以直接用他的静态库)
3 楼 berained 2013-08-30  
可以运行,但是没有声音,是否是声音未解码,还是我编译的有问题
2 楼 witcheryne 2013-08-21  
orin_chen 写道
请问一下,似乎编译不出 libswresample.a 这个库,kxmovie 要用到。怎么解决啊?


我的没有编译libsresample.a这个库

看这个工程, 用他自己的编辑脚本。
https://github.com/kinglonghuang/kxmovie
1 楼 orin_chen 2013-08-21  
请问一下,似乎编译不出 libswresample.a 这个库,kxmovie 要用到。怎么解决啊?

相关推荐

Global site tag (gtag.js) - Google Analytics