Install FFmpeg under Ubuntu

Source: Internet
Author: User

1. Installation of SDL

SDL is an open-source multimedia development library that allows you to set up images and video rendering operations. If you do not install Sdl,ffmpeg, you will not be able to generate Ffplay.exe player. It's also easy to install SDL under Ubuntu, just execute the following commands in turn:

sudo Install libsdl1. 2-devsudoinstall libsdl-image1. 2-devsudoinstall libsdl-mixer1. 2-devsudoinstall LIBSDL-TTF2. 0-devsudoinstall gfx1. 2-dev
2, install Yasm, execute the following command:
sudo Install yasm
3. Install several codec libraries ffmpeg depend on, execute the following command in turn:
sudo install libx264-devsudoinstall libfaac-devsudoinstall libvo-aacenc-Devsudoinstall libmp3lame-devsudo  Install Libfaad-dev
4. Install other dependent libraries:
sudo Install build-essential Subversion git-core checkinstall  texi2html   libtheora-dev Libx11-dev Libxvidcore-dev Zlib1g-dev Libopencore-amrnb Libopencore-amrwb-dev
5. Download FFmpeg:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
6. Enter the FFmpeg directory and execute the following command to complete the compilation and installation:
./configure--ENABLE-GPL--enable-nonfree--enable-pthreads--enable-libfaac--enable-libvo-aacenc-- Enable-libmp3lame--enable-libtheora--enable-libx264--enable-libxvid--enable-x11grab  -- ENABLE-LIBOPENCORE-AMRWB--enable-libopencore-amrnb--enable-version3--disable-optimizations--disable-ASM  makesudomakeinstall

Then, as you can see, in/usr/local/bin, Ffmpeg.exe/ffplay.exe/ffprob.exe has been generated. You can use Ffplay.exe to play video files on the command line.

7. Use FFmpeg in QT

Because QT is a C + + environment, FFmpeg is a C environment that needs to include the following code:

extern " C "  <libavcodec/avcodec.h><libswscale/swscale.h><libavformat/avformat.h > }

Include the following in the. Pro file:

LIBS + =-l/usr/+=-+ =-+-+ =-+-lswscale

Install ffmpeg under Ubuntu

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.