diff -Nru a/src/ffDiaporama/engine/cBaseMediaFile.cpp b/src/ffDiaporama/engine/cBaseMediaFile.cpp --- a/src/ffDiaporama/engine/cBaseMediaFile.cpp 2014-06-26 06:54:45.000000000 +0200 +++ b/src/ffDiaporama/engine/cBaseMediaFile.cpp 2018-10-21 08:50:39.277183785 +0200 @@ -2886,8 +2886,8 @@ .arg(LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num) .arg(LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.den); - AVFilter *srcFilter=avfilter_get_by_name("buffer"); - AVFilter *outFilter=avfilter_get_by_name("nullsink"); + const AVFilter *srcFilter=avfilter_get_by_name("buffer"); + const AVFilter *outFilter=avfilter_get_by_name("nullsink"); if ((result=avfilter_graph_create_filter(&VideoFilterIn,srcFilter,"src",args.toLocal8Bit().constData(),NULL,VideoFilterGraph))<0) { ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Open : avfilter_graph_create_filter: src")); @@ -2912,8 +2912,8 @@ .arg(LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num) .arg(LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.den); - AVFilter *srcFilter=avfilter_get_by_name("buffer"); - AVFilter *outFilter=avfilter_get_by_name("buffersink"); + const AVFilter *srcFilter=avfilter_get_by_name("buffer"); + const AVFilter *outFilter=avfilter_get_by_name("buffersink"); if ((result=avfilter_graph_create_filter(&VideoFilterIn,srcFilter,"src",args.toLocal8Bit().constData(),NULL,VideoFilterGraph))<0) { ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Open : avfilter_graph_create_filter: src")); @@ -2939,8 +2939,8 @@ LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.num,LibavVideoFile->streams[VideoStreamNumber]->codec->sample_aspect_ratio.den ); - AVFilter *srcFilter=avfilter_get_by_name("buffer"); - AVFilter *outFilter=avfilter_get_by_name("buffersink"); + const AVFilter *srcFilter=avfilter_get_by_name("buffer"); + const AVFilter *outFilter=avfilter_get_by_name("buffersink"); if ((result=avfilter_graph_create_filter(&VideoFilterIn,srcFilter,"in",args,NULL,VideoFilterGraph))<0) { ToLog(LOGMSG_CRITICAL,QString("Error in cVideoFile::VideoFilter_Open : avfilter_graph_create_filter: src")); diff -Nru a/src/ffDiaporama/engine/cDeviceModelDef.h b/src/ffDiaporama/engine/cDeviceModelDef.h --- a/src/ffDiaporama/engine/cDeviceModelDef.h 2014-04-12 06:41:33.000000000 +0200 +++ b/src/ffDiaporama/engine/cDeviceModelDef.h 2018-10-21 08:48:59.540554113 +0200 @@ -60,8 +60,7 @@ #include <libavformat/avformat.h> #include <libavformat/avio.h> -#include "libavfilter/avfilter.h" -#include "libavfilter/avfiltergraph.h" +#include <libavfilter/avfilter.h> #if (LIBAVUTIL_VERSION_MICRO<100)&&(LIBAVCODEC_VERSION_MICRO<100)&&(LIBAVFORMAT_VERSION_MICRO<100)&&(LIBAVDEVICE_VERSION_MICRO<100)&&(LIBAVFILTER_VERSION_MICRO<100)&&(LIBSWSCALE_VERSION_MICRO<100) #define LIBAV diff -Nru a/src/ffDiaporama/engine/_EncodeVideo.cpp b/src/ffDiaporama/engine/_EncodeVideo.cpp --- a/src/ffDiaporama/engine/_EncodeVideo.cpp 2014-06-23 09:39:23.000000000 +0200 +++ b/src/ffDiaporama/engine/_EncodeVideo.cpp 2018-10-21 09:03:44.958136239 +0200 @@ -387,7 +387,7 @@ ||(!strcmp(Container->oformat->name,"mpegts")) ||(!strcmp(Container->oformat->name,"3gp")) ) - (*Stream)->codec->flags|=CODEC_FLAG_GLOBAL_HEADER; + (*Stream)->codec->flags|=AV_CODEC_FLAG_GLOBAL_HEADER; int ThreadC =((getCpuCount()/*-1*/)>1)?(getCpuCount()-1):1; if (ThreadC>0) (*Stream)->codec->thread_count=ThreadC; @@ -453,9 +453,9 @@ VideoStream->codec->qmax =ImageHeight<=576?63:51; av_dict_set(&opts,"qmax",QString("%1").arg(VideoStream->codec->qmax).toUtf8(),0); VideoStream->codec->qmin =ImageHeight<=576?1:11; av_dict_set(&opts,"qmin",QString("%1").arg(VideoStream->codec->qmin).toUtf8(),0); VideoStream->codec->mb_lmin =VideoStream->codec->qmin*FF_QP2LAMBDA; - VideoStream->codec->lmin =VideoStream->codec->qmin*FF_QP2LAMBDA; + av_dict_set(&opts,"lmin",QString("%1").arg(VideoStream->codec->mb_lmin).toUtf8(),0); VideoStream->codec->mb_lmax =VideoStream->codec->qmax*FF_QP2LAMBDA; - VideoStream->codec->lmax =VideoStream->codec->qmax*FF_QP2LAMBDA; + av_dict_set(&opts,"lmax",QString("%1").arg(VideoStream->codec->mb_lmax).toUtf8(),0); if (ImageHeight<=720) av_dict_set(&opts,"profile","0",0); else av_dict_set(&opts,"profile","1",0); if (ImageHeight>576) av_dict_set(&opts,"slices","4",0);