Since the FFmpeg project is too large to be thoroughly understood at once, I took some notes while watching it to clarify my thoughts and leave some suggestions for others.


1. DownloadFFmpegSource code compilationiOSLibrary.

Compiling FFmpeg requires support for two more items

  • Github.com/libav/gas-p…
  • yasm

This is more complicated, if you want to follow the process step by step, you can refer to this article iOS Configuration FFmpeg framework (original). So there’s an open source script on Github, github.com/kewlbear/FF… /build-ffmpeg.sh, and the script will automatically download the relevant files and configuration for you. Once compiled, you will see the ffMPEG-ios folder, which contains the static library, and the FFMPEG-3.1.1 folder, which is the source code. Of course, if you are familiar with scripting languages you can take a look at the scripts and modify some configurations to achieve the desired results. I’m not going to expand on that for now.

2. Integrate static library toXcode

  • New construction.

Create a new Single View Application and drag the FFmPEG-ios folder into the project. Then you need to configure Header Search Paths in Build Setting, including include and subfolders under include.

  • Add a dependency library.

You need to add the following framework and lib: CoreMedia. Framework, VideoToolbox.framework, AudioToolbox.framework, libiconv.2.4.0.tbd, libbz2.1.0.tbd, Libz. 1.2.5. TBD.

  • compile

Include the header file #import “avcodec.h” in ViewController and call avcodec_register_all() in viewDidLoad; , should be able to compile. In my Xcode8 there will be a bunch of warnings that say empty Paragraph passed to @param Command, and here we need to deal with that. Use macros to include the header file when referencing it.

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdocumentation"

#import "avcodec.h"

#pragma clang pop
Copy the code

At this point, FFmpeg integration is complete.

The original link

The Comprehensive Calculator is a versatile calculator that can calculate mortgage, personal income tax, year-end bonus, interest, BMI and small and large amounts of money. No need to download multiple calculators to find. Also support real – time update loan rates oh ~.