iOS Development integrated Ijkplayer video Live

Source: Internet
Author: User

Ijkplayer is a live video frame, based on ffmpeg, support for Android and IOS, there are many integration instructions on the web, but the personal feel is not enough detailed, here in detail on how to integrate Ijkplayer in IOS, even if never touched before, press The following can also be integrated success!

Editor: Bison
Submitted by: JIANSHU_WL

One. Download Ijkplayer

Ijkplayer

After the download is complete, unzip the folder internal directory such as:

Two. Compiling Ijkplayer

Said to be compiled Ijkplayer, is actually compiled ffmpeg, here we have downloaded the Ijkplayer, so GitHub on the readme.md in the build iOS step is not needed.

The following steps start the step-by-step compilation:

1. Open the terminal, CD to the Jkplayer-master folder, that is, after downloading the extracted folder, such as:

2. Execute the command line./init-ios.sh, this step is to download ffmpeg, time will be a bit longer, patience wait a moment.

3. After the download is completed in the 2nd step, execute CD iOS, that is, go to the iOS directory, such as:

4. After entering the iOS folder, execute the./compile-ffmpeg.sh clean and./compile-ffmpeg.sh All commands in the terminal, and compile the FFmpeg, which is the two steps in readme.md, such as:

Compile for a longer time and wait patiently.

Three. Packaging Ijkmediaframework.framework Frame

There are two ways to integrate Ijkplayer: one is to import the project Ijkmediaplayer.xcodeproj directly in accordance with the Ijkmediademo project, where it is not introduced, such as:

The second integration method is to package the Ijkplayer into a framework import project for use. Here's how to package a ijkmediaframework.framework, and follow the steps below to start one step at a pace:

First open the project ijkmediaplayer.xcodeproj, location such as:

When opened, this is the case, such as:

2. When the project is opened, set up the scheme of the project, the specific steps such as:


3. After setting the scheme, select the real machine and the simulator to compile, after compiling, enter the Finder, such as:

After entering the Finder, you can see the compilation results of two versions of the real machine and simulator, such as:

The following is the beginning of merging the real machine and emulator version of the framework, be careful not to merge the wrong, merging this file, such as:

Open terminal, merge, command line specific format:

lipo -create "真机版本路径" "模拟器版本路径" -output "合并后的文件路径"


After merging, such as:

The following is very important, you need to use the merged ijkmediaframework to replace the original ijkmediaframework, such as, I hope you can read:

In the 1, 22 steps completed, the green box of the Ijkmediaframework.framework file is the framework we need, can be copied out, we need to import the project to use later.

Four. Integrated Ijkplayer in iOS engineering

Create a new project, import the merged Ijkmediaframework.framework and related dependency frameworks, and related dependency frameworks such as:

After importing the framework, test in VIEWCONTROLLER.M, first import the IJKMediaFramework.h header file, compile to see if there is any mistake, if there is no mistake to explain the integration success.
Then start testing using the Ijkmediaframework framework in the VIEWCONTROLLER.M file, write a simple live video to test it, look at the results after the run, and put the Demo for download later.

At this point, Ijkplayer integration is complete!

iOS Development integrated Ijkplayer video Live

Related Article

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.