Ubuntu10.04 install and compile FFmpeg [Figure]

Source: Internet
Author: User
Click here for more information. Build the ffmpeg Development Environment on Ubuntu10.04 and compile and run it. For details, refer to: Installing Yasm, x.264, Lame, libvpx in sequence; and 2. Installing ffm by referring to (2 ).

Click here for more information. Build the ffmpeg development environment and compile and run it on Ubuntu10.04. For details, refer:

  • Http://www.linuxidc.com/Linux/2013-04/83108.htm
  • Http://www.linuxidc.com/Linux/2013-04/83109.htm

1. Install Yasm, x.264, Lame, and libvpx in sequence with reference to (1;

2. See (2) install ffmpeg, libavcodec-dev, libswscale-dev, libx264-dev;

3. Modify/usr/include/libavutil/common. h by referring to (2) and add the following content.

# Ifndef UINT64_C

# Define UINT64_C (value) _ CONCAT (value, ULL)

# Endif

4. Modify shower. cpp in the sunkwei source code file to block the original four lines of code, and then add a line of code as follows:

Int got; // modify it from here
// Block the AVPacket pkt of the Bank;
// Block the row pkt. data = buf;
// Block the row pkt. size = rc;
// Block the int ret = avcodec_decode_video2 (dec, frame, & got, & pkt );
Int ret = avcodec_decode_video (dec, frame, & got, buf, rc );
// Modify it to this row, and the code below does not move
If (ret> 0 & got ){

The reason for the modification is that the ffmpeg version is different. The Library version I installed with apt-get install libavcodec-dev is lower than that used by the source code author. In my library, avccodec_decode_video2 is not used, and only avccodec_decode_video.

After the modification is complete, go to the source code directory and make it. The compilation result is displayed successfully. Run the command to check the effect.

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.