Add FFMPEG library in iOS

12,536

I don't totally understand what you mean by "how to add the FFMPEG library to my project" but I think you want to build the FFMPEG library and use it in your project? If that's the case you have to do the following:

  1. Download the FFMPEG sources and compile them for the architectures you want to support (armv6, armv7 arm64, ...).
  2. Put the libraries for the different architectures together using lipo (which will get you the universal library)
  3. Add the universal library to your project together with the needed FFMPEG header files.

After those three steps you can use the FFMPEG library in you code.

Unfortunately step 1 is kind of a pain. You will have to dig a bit for tutorials to get the FFMPEG sources to compile. There are several stack overflow questions that might help you:

Build FFmpeg with xCode 5 FFMPEG iOS 7 Library Installing ffmpeg ios libraries armv7, armv7s, i386 and universal on Mac with 10.8

The last link seems to be the most promising one. Good luck!

Share:
12,536
Admin
Author by

Admin

Updated on June 14, 2022

Comments

  • Admin
    Admin almost 2 years

    I am trying to use features of the FFMPEG library (such like libavcodec.a, libavformat.a, libavutil.a and libswresample.a) but I am confused on how to add the FFMPEG library to my project.

    WHY FFMPEG library? => Because in my project I want to play Live URL Streaming, This URL is Window Media Audio file (.wma) since iOS has no direct support for '.wma' files, I need to convert this Live URL Streaming to an iOS device supported format. For doing this I am using RadioTunes SDK, All things are well and good except I don't know about the installation of FFMPEG library

    There are many question related to mine but none can help me.

    How to build and link FFMPEG to iOS?
    ffmpeg use on iOS

    I download FFMPEG library from here for 10.5.x