FFmpeg perfectly compiled on iOS

Source: Internet
Author: User

Recently contacted FFmpeg, found a lot of relevant compilation data, have not compiled successfully, a few days ago on GitHub to find a script (https://github.com/kewlbear/FFmpeg-iOS-build-script), can be perfectly compiled

The steps are as follows:

1. Download script: Https://github.com/kewlbear/FFmpeg-iOS-build-script, to run this script,

Preparation conditions:

  • Download the file first:https://github.com/libav/gas-preprocessor,
  • Copy gas-preprocessor.pl to/usr/sbin,
  • chmod 777/usr/local/bin/gas-preprocessor.pl

2. Unzip to find the file build-ffmpeg.sh

3. Implementation of the Service document:./build-ffmpeg.sh, note that there may be errors when installing this service,

as follows: Mac:ffmpeg-ios-build-script-master-2 jinsonglnan$./build-ffmpeg.sh
yasm not found
Homebrew not found. Trying to install ...
Whoops, the Homebrew installer has moved! Please instead run:
ruby-e "$ (Curl-fsslHttps://raw.githubusercontent.com/Homebrew/install/master/install)"
Also, please ask wherever your got this link from to update it to the above.
Trying to install yasm ...
./build-ffmpeg.sh:line 67:brew:command not found

Meaning, no yasm, see Prompt to execute ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"

Installation

4. After the compilation is complete, the terminal enters the Ffmpeg-ios-build-script directory and enters the./build-ffmpeg.sh Lipo, this command is about. A file merged into a

5. Add the Ffmpeg-ios file to the project

6. add a header file reference   #include" avformat.h "

add an API statement: Av_register_all (); to a class file. m suffix changed to. mm, turn on mixed mode.

Operation of the project, if there is no error, it indicates that the compilation succeeded

7. Additional attention to detail

  Compile error:   ' libavcodec/avcodec.h ' file not found, Span style= "line-height:24px" > modify header Search paths  Path: $ (project_dir)/ffmpeg-ios/include


FFmpeg perfectly compiled on iOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.