? What is FFmpeg?
? FFmpeg composition
? Download tool
? Install FFmpeg
? apply to the Java EE Project
Introduction: Learn video coding, be sure to know Rai (leixiaohua1020) column, great programmer, died at the age of 26. Lei Hua---superstar fall. This article is excerpted from the FFmpeg document .
Official website: https://www.ffmpeg.org/
GitHub Address: Https://github.com/FFmpeg/FFmpeg
What is 1.FFmpeg?
Quoted Baidu Encyclopedia, FFmpeg is a set can be used to
An open-source computer program that records, converts, and transforms digital audio and video into streams。 Use the LGPL or GPL license. It provides a complete solution for recording, converting, and streaming audio and video. It contains a very advanced audio/video codec library Libavcodec, in order to ensure high portability and codec quality, many of the code in LIBAVCODEC is developed from scratch. Ffmpeg developed under the Linux platform ,But it can also be compiled and run in other operating system environments, including Windows, Mac OS x, etc.。 The project was first initiated by Fabrice Bellard and was primarily maintained by Michael Niedermayer between 2004 and 2015.Many ffmpeg developers are from the MPlayer project, and the current ffmpeg is also placed on the server in the MPlayer project group. The name of the project comes from the MPEG video encoding standard, and the preceding "FF" stands for "Fast Forward".
2.FFmpeg Composition
There are three main components of FFmpeg,
2.1 The first part is four different tool software , namely: Ffmpeg.exe,ffplay.exe,ffserver.exe and Ffprobe.exe.
- Ffmpeg.exe: Audio and video transcoding, converters
- Ffplay.exe: Simple audio and video player
- Ffserver.exe: Streaming Media server
- Ffprobe.exe: A simple multimedia stream analyzer
2.2 Part Two is an SDKthat can be used by developers to compile the completed libraries for each of the different platforms . If the four tools above are all toys in a finished form, then these libraries are like Lego bricks, and we can use them to develop our own applications based on our own needs. These libraries are:
- Libavcodec: Includes audio and video encoders and decoders
- Libavutil: Includes tools for simplifying programming that are commonly used in multimedia applications, such as random number generators, data structures, mathematical functions, and more
- Libavformat: Encapsulation and unpacking tools with multiple multimedia container formats
- Libavfilter: Contains filter functions commonly used for multimedia processing
- Libavdevice: Device-related for audio and video data acquisition and rendering functions
- Libswscale: For image scaling and color space and pixel format conversion functions
- Libswresample: For functions such as audio resampling and format conversion
2.3 Part Three is the source code for the entire project, either compiled executable or SDK, compiled from these source code. the source code of FFMPEG is implemented by C language , which is mainly developed on the Linux platform . FFmpeg is not an isolated project, it also has multiple dependent third-party projects to enhance its own functionality. In the current series of posts/videos, we will not involve too much source code-related content for the time being, mainly in the FFmpeg tools and SDK calls. To the next series we will specialize in how to compile the source code and develop it two times according to the source code.
3. Download tool
On the official website we can find the "Download" page, on which you can download ffmpeg tools, libraries, and source code. After you select Windows builds under Windows Packages, you will be redirected to the Windows version of the download page:
On the download page, we can see that for both 32-bit and 64-bit editions, three different modes are available:static, shared, and Dev
- Static: This version provides a static version of the FFmpeg tool that generates the dependent libraries in the final executable, and as a tool this version can meet our needs ;
- Share: This version of the tool includes executables and DLLs, and the process must depend on the DLL file provided;
- Dev: Provides the library's header file and DLL's boot library;
4. Installing FFmpeg
4.1 Download the static version here, unzip its download to the E:\javaEdit\ffmpeg directory:
4.2 Configuration environment variable:E:\javaEdit\ffmpeg\bin;
4.3 dos window input ffmpeg-version command, if there is information to indicate success:
5. apply to the Java EE Project:
The simplest video website (javaee+ffmpeg)
FFmpeg installation (Windows environment)