Environment construction of ffmpeg in Qt

1. Create the project
The build in the project is cancelled
2. Build the ffmpeg environment

  • Create bin under the project (as the execution directory of the project), ffmpeg (ffmpeg configuration file)

Create bin and ffmpeg files in the project

  • content in bin

Put the dill file of ffmpeg into bin

  • The content of include in ffmpeg (where the header file is stored


Insert picture description here

  • The content of lib in ffmpeg (where the inventory is placed

)
Insert picture description here
3. Load in pro
Configuration in pro
3. Configure C use environment

extern "C"
{
    
    
#include <libavcodec/avcodec.h> //编解码
#include <libavformat/avformat.h> //分装格式处理
#include <libswscale/swscale.h>
#include <libswresample/swresample.h>
#include <libavdevice/avdevice.h>//设备
#include <libavutil/avutil.h> //工具库
}

Configuration complete

Guess you like

Origin blog.csdn.net/m0_49036370/article/details/110441632