Skip to content

Instantly share code, notes, and snippets.

@phucnm
Created December 25, 2015 10:18
Show Gist options
  • Save phucnm/4fe443ee17a1e0773563 to your computer and use it in GitHub Desktop.
Save phucnm/4fe443ee17a1e0773563 to your computer and use it in GitHub Desktop.
How to add FFmpeg to iOS project
Here are steps:
1. Build FFmpeg for iOS
There some scripts to build FFmpeg for iOS
ex: https://github.com/kewlbear/FFmpeg-iOS-build-script
2. After build complete, copy all *.a to your iOS project folder.
They will be automatically add to Linked Frameworks and Libraries (in Project settings -> General)
ex: libavutil.a, libavformat.a, libavcodec.a,...
3. Add depedencies to Linked Frameworks and Libraries
Add libz.dylib (or libz.tbd), libiconv.dylib
4. Go to Project settings -> Build Settings, add the path which contains all *.a files in your iOS project folder to Library Search Paths
There's a tip: $(PROJECT_DIR)/ProjectName/some/path/
5. Still living in Build Settings, add the path which contains FFmpeg header files (where you run build script) to Header Search Paths.
Or you can copy FFmpeg folder to your iOS project folder and then add this path to Header Search Paths (easier to manage)
6. Build & run your project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment