当前位置:网站首页>Qt+ffmpeg environment construction
Qt+ffmpeg environment construction
2022-07-28 22:38:00 【Passing bears~】
download FFmpeg library
FFmpeg The library can be compiled using the source code or downloaded from the Internet , Here we use the compiled library file downloaded from the Internet .
1. From the website :https://ffmpeg.zeranoe.com/builds/ Download compiled FFmpeg library . I choose to download 64 Bit Library .
2. Download the compiled library address https://github.com/BtbN/FFmpeg-Builds/releases
Static,Share,Dev Download all three , The three downloaded files are :
Download compiled ffmpeg library 
add to FFmpeg Library to Qt project
Use QtCreator Create a Qt gui project , After creating the project :
Create... In the project root directory ffmpeg Folder , stay ffmpeg Create in folder include and lib Folder
- decompression ffmpeg-3.4-win64-dev.zip Compressed files
- After unzipping ffmpeg-3.4-win64-dev Under the folder include Copy all header files in the directory to the newly created ffmpeg In the catalog include Folder in
- After unzipping ffmpeg-3.4-win64-dev Under the folder lib All in catalog dll.a Copy the ending file to ffmpeg Of lib In the folder
- After unzipping ffmpeg-3.4-win64-shared Under the folder bin All in catalog dll Copy the ending file to ffmpeg Of bin In the folder


Modification item pro file , stay pro Add the following to the file :
INCLUDEPATH += ../ffmpeg/include
LIBS += -L../ffmpeg/lib \
-lavcodec \
-lavfilter \
-lavformat \
-lavutil \
-lswscale
LIBS += -L../ffmpeg/bin \
-lavcodec \
-lavfilter \
-lavformat \
-lavutil \
-lswscale
test FFmpeg Whether the library can be used normally
- In the project FFmpegLibTestFrm.cpp Add... To the file FFmpeg The header file
extern "C"
{
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>
#include <libavdevice/avdevice.h>
#include <libavformat/version.h>
#include <libavutil/time.h>
#include <libavutil/mathematics.h>
}
- stay FFmpegLibTestFrm Add the following code to the constructor
FFmpegLibTestFrm::FFmpegLibTestFrm(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::FFmpegLibTestFrm)
{
ui->setupUi(this);
qDebug("------------------------------------------------------------------");
qDebug("%s", avcodec_configuration());
qDebug("version: %d", avcodec_version());
qDebug("------------------------------------------------------------------");
}
- Compile run program , Compile successfully

The effect is as follows

边栏推荐
- 使用PCL批量显示PCD点云数据流
- 76. Minimum coverage substring (hard sliding window hash table string)
- MySQL built-in functions
- Sword finger offer II 057. the difference between the value and the subscript is within the given range (medium array bucket sort sliding window TreeSet)
- 75. Color classification (medium array double pointer sorting)
- Log4j vulnerability elk platform processing method (logstah5.5.1)
- How to realize dynamic route switching and route caching in vuejs
- Excel-vba quick start (XIII. Common usage of date)
- Why doesn't the icon on the elment plus icon input display
- 842. 排列数字
猜你喜欢
![[Ruiji takeout project] Day5 - Chapter 6 mobile verification code login](/img/53/c578e0d1428ea569fb412a20019924.png)
[Ruiji takeout project] Day5 - Chapter 6 mobile verification code login

Establishment of Ruiji takeout development environment

软考网络工程师

Command line agent: proxychains configuration

基于Ernie-3.0 CAIL2019法研杯要素识别多标签分类任务
How do we do full link grayscale on the database?

79. Word search (medium string array matrix backtracking)

CMD common commands

XXX port is already in use

Ruiji takeout - background login function development
随机推荐
JS array merging, de duplication, dimensionality reduction (es6: extended operator, set)
Jmeter 安装第三方插件 Plugins Manager
PaddleNLP基于ERNIR3.0文本分类以中医疗搜索检索词意图分类(KUAKE-QIC)为例【多分类(单标签)】
The blueprint of flask complements openpyxl
近期bug总结
npm ERR code ETIMEDOUT npm ERR syscall connect npm ERR errno ETIMEDOUT npm ERR network reques...
Which is the file transfer command in the basic services of the Internet
Solve various problems of sudo rosdep init and rosdep update
imx6q gpio复用
redis相关
Qt+FFmpeg环境搭建
Changes in the history of oscilloscope development
JS convert numbers to letters
AWK空行过滤
Lotus 1.16.0 extend sector expiration time
【转载】token令牌在登录场景使用
容器化配置启动redis集群 单机6节点 3主3从
Att & CK preliminary understanding
[connect your mobile phone wirelessly] - debug your mobile device wirelessly via LAN
Day3 classification management of Ruiji takeout project