FFmpeg Advanced Programming First: Environment building and compiling

Source: Internet
Author: User

In the previous period of time in the computer to look at the information, found that the previous do in the embedded hardware on the FFMEPG-based, embedded hardware decoding of multimedia playback work, found to be almost forgotten. Today cannot finishing review of FFmpeg in the application of embedded, here to share, by the way to make a record for later use reference.

This article (record) and the current online a lot of articles about ffmpeg compared with two features:

One, the focus does not lie in the FFmpeg decoding part (this is originally the biggest bright spot of FFmpeg), why? As I said earlier, this is a tidy up of my previous work. Moreover about FFmpeg's decoding related article is very many, if everybody is interested, may increase in the latter part.

Second, this article is not to use other third-party open-source multimedia framework and on the embedded hardware to do multimedia playback projects. Third-party multimedia framework software hides some of the key processing of extended data, many beginners may not be aware of these details, so when the FFMEPG in their own decoding porting is not a problem, really in the embedded hardware to decode the problem encountered.

This article will be completed in a sub-article, each only to make the basic and important points to tell clearly, other details and unimportant is not described in detail, specific real applications on this basis to expand the refinement should not be difficult to achieve a basic ffmpeg-based embedded player needs. The article specific sub-article is as follows:

(a) FFmpeg basic environment Construction and compilation

(ii) FFmpeg of the solution Package basic processing

(iii) FFMPEG key extended data processing for hardware device decoding

(iv) FFMPEG track mode basic control for hardware

(v) According to the situation ...

One, virtual machine installation

Because it is in their own home, not working environment, computer or installed Windows7 system, so began to install virtual machine, I usually always like to use VMware this virtual machine, last bought a new computer has not been installed, this must first installed. First installed the latest VMware Workstation one + Ubuntu14.04, found to run a huge slow, is my computer outdated? There is no way, also do not want to toss this thing, or honestly changed a VMware Workstation 10.0.1 build-1379776 + ubuntu-12.04.4-alternate-i386, best run up still do. Specific virtual machines and Ubuntu installation process is not detailed, online articles a large pile.

Second, configure and compile

Download the latest version of FFmpeg, the current stable version is ffmpeg-2.6.1. into the virtual machine decompression:

Configuration:

Then make compile, and finally an error occurs:

Originally ignored directly in the Windows shared directory, extracted into the Linux directory will not appear this problem. Of course, if we compile not the shared library, but the static library, this problem will not occur, because there is no Linux link file.

Under the Linux directory, the compilation succeeds and builds our dynamic library:

This allows us to produce the dynamic libraries and header files we need.

People may be confused, I am now compiled on the PC, not for the embedded device. This I know, I have no way, now I have no previous those arm's compilation environment. If you are in the actual cross-environment, configure the FFmpeg configure when specifying cross-compilation parameters, presumably as the following configuration:

./configure--prefix=./install--disable-static--enable-shared--ENABLE-GPL--enable-pthreads--cross-prefix= arm-none-linux-gnueabi---enable-cross-compile--target-os=linux--extra-cflags= "-mcpu=arm9-w-wall-wpointer-arith -wstrict-prototypes-winline-wundef-o2-wall "--arch=armv4l--CPU=ARM9

These are, of course, modified according to the specific circumstances. Here is not much to say, this article only on the PC to explain.

The first time to get blog update reminders, as well as more technical information sharing, welcome to the personal public platform: Programmer Interaction Alliance (coder_online)

1. Directly to help you answer ffmpeg related questions

2. First time access to more than ten industry technical articles

3. To ask questions in the article, the first time to reply to you, to help you patiently answer

4. Let you and the original author become very good friends, expand their network resources

Sweep the QR code below or search number Coder_online can be followed, we are able to communicate online.

Reprint Please specify: http://my.oschina.net/u/2336532/blog/393380

FFmpeg Advanced Programming First: Environment building and compiling

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.