视频主要是由一系列图片组成,但是,很多图片会造成文件过大,后来有了关键图片(关键帧),即改变相应的的变化部分,不是整个图片的取代.每秒钟采集多少张的概念,这就叫做视频的帧率。
和视频的帧率相对应的即是音频的采样率
不知道什么原因,lib文件(.a)一直存在错误(在qt 5.7 下),后来直接用了dll进行编译
#------------------------------------------------- # # Project created by QtCreator 2018-09-22T10:37:08 # #------------------------------------------------- QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = konwffmpeg TEMPLATE = app SOURCES += main.cpp\ konwffmpeg.cpp HEADERS += konwffmpeg.h INCLUDEPATH+=$$PWD/../resourcefile/ffmpeg/include LIBS += -L$$PWD/../resourcefile/ffmpeg/bin -lavdevice-58 \ -lavcodec-58 \ -lavfilter-7 \ -lavformat-58 \ -lavutil-56 \ -lpostproc-55 \ -lswresample-3 \ -lswscale-5 #include "konwffmpeg.h" 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> } #include<QDebug> konwFfmpeg::konwFfmpeg(QWidget *parent) : QMainWindow(parent) { avcodec_register_all(); avcodec_configuration(); qDebug()<<avcodec_version(); } konwFfmpeg::~konwFfmpeg() { }源代码下载