4

I'm trying to build my own Player base on FFMpeg,

I succes to build FFMpeg as static library(*.a),

but its need to copy another header file to use,

I hope it can used like framework,

but even I add header file into framework (set as public)

My Demo App can not find .h file in FFMpeg.framework,

is there any suggestion or tutorial can help me to build it as real framework?

Thanks

Devin
  • 286
  • 1
  • 5
  • 14

2 Answers2

1

Yes because there is proper procedure to setup FFMPEG in project.

Please follow procedure in below link.

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

1) First Download FFmpeg From github.

2) Then just copy folder in your project directory.

3) Then Add it into your project with Add file option in xcode.

enter image description here

Note:- Below library must be added in your Project.

enter image description here

and don't forget to set HEADER SEARCH PATH in Build Setting option.

enter image description here

Try to compile.

You will find example for FFMPEG in below link,

1) ffmpegc-demo

2) kxmovie (Best to use ffmpeg)

still you need to add ffmpeg in this demo also. else you will get error for headerfile missing or library missing or etc.

Sami Kuhmonen
  • 30,146
  • 9
  • 61
  • 74
Badal Shah
  • 7,541
  • 2
  • 30
  • 65
-1

I've included several C libraries into an iOS project. The way to do it, I think is to add the .a file to the Build Phases > Link Binary With Library, and drag your .a file there. If you compiled ffmpeg from source, there should be a header file. For your .h file, make sure you update the Library Search Path in Build Settings.

Also, if you are using the ffmpeg api's, maybe getting the libavcodec, libavformat, and libavscale libraries, as these are what the main ffmpeg program uses.

Peter Hale
  • 119
  • 4
  • Yap, I can run ffmpeg fine, but if I want build it as framework, what should I do? – Devin Feb 19 '16 at 06:21
  • Why do you need to build it as a framework, if you can include it as a library just as easily? – Peter Hale Feb 19 '16 at 18:23
  • Because I want to release it to my custom, so it must be a framework not source code, but I also do not want to release (framework+ include) , So I'm trying to build it together. – Devin Feb 21 '16 at 03:28
  • This doesn't answer the original question: How to build FFMPEG as a Framwork – Kyle Redfearn Jun 20 '17 at 16:34