https://bugs.kde.org/show_bug.cgi?id=448681
--- Comment #24 from caulier.gil...@gmail.com --- Hi Maik and Bernhard, FFMPEG 5 is now detected properly with my last commit. I installed FFMPEG 5 on my system instead the official packaged FFMPEG 4 version. The cmake configuration report the following : -- -------------------------------------------------- -- digiKam MediaPlayer dependencies checks: -- -- FFMPEG_FOUND = TRUE -- FFMPEG_INCLUDE_DIRS = /usr/include -- FFMPEG_LIBRARIES = /usr/lib/libavcodec.so;/usr/lib/libavdevice.so;/usr/lib/libavfilter.so;/usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so;/usr/lib/libswresample.so -- FFMPEG_DEFINITIONS = -- Could NOT find FFmpeg (missing: AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIRS) -- FFMPEG_FOUND = FALSE -- FFMPEG_INCLUDE_DIRS = /usr/include -- FFMPEG_LIBRARIES = /usr/lib/libavcodec.so;/usr/lib/libavdevice.so;/usr/lib/libavfilter.so;/usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so;/usr/lib/libswresample.so -- FFMPEG_DEFINITIONS = -- Found Portaudio: /usr/lib64/libportaudio.so -- SSE2 support : true -- SSE3 support : true -- SSSE3 support : true -- SSE4.1 support : true -- SSE4.2 support : true -- FFMpeg AVCodec : TRUE (59.32.100) -- FFMpeg AVDevice : TRUE (59.6.100) -- FFMpeg AVFilter : TRUE (8.39.100) -- FFMpeg AVFormat : TRUE (59.24.100) -- FFMpeg AVUtil : TRUE (57.25.100) -- FFMpeg SWScale : TRUE (6.6.100) -- FFMpeg SWResample : TRUE (4.6.100) -- FFMpeg AVResample : FALSE () -- MediaPlayer support is enabled : yes -- MediaPlayer will use FFMpeg 5 API : yes -- MediaPlayer will be compiled with SSE4.1 support : yes -- MediaPlayer will be compiled with LibASS support : yes -- MediaPlayer will be compiled with UCharDet support : yes -- MediaPlayer will be compiled with OpenAL support : yes -- MediaPlayer will be compiled with PortAudio support : yes -- MediaPlayer will be compiled with PulseAudio support : yes -- MediaPlayer will be compiled with OpenSLES support : no -- MediaPlayer will be compiled with VaAPI support : yes -- MediaPlayer will be compiled with X11 support : yes -- MediaPlayer will be compiled with XV support : yes -- MediaPlayer will be compiled with OpenGL support : yes -- MediaPlayer will be compiled with OpenGL-EGL support : yes -- MediaPlayer will be compiled with GDI+ support : no -- MediaPlayer will be compiled with Direct3D11 support : no -- MediaPlayer will be compiled with DirectSound support: no -- MediaPlayer will be compiled with XAudio2 support : no -- MediaPlayer will be compiled with Direct2D support : no -- MediaPlayer libraries : /usr/lib/libavcodec.so;/usr/lib/libavdevice.so;/usr/lib/libavfilter.so;/usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so;/usr/lib/libswresample.so;dl;/usr/lib64/libass.so;uchardet;/usr/lib64/libopenal.so;/usr/lib64/libportaudio.so;/usr/lib64/libpulse.so;/usr/lib64/libva.so;/usr/lib64/libva-drm.so;/usr/lib64/libSM.so;/usr/lib64/libICE.so;/usr/lib64/libX11.so;/usr/lib64/libXext.so;/usr/lib64/libXv.so;/usr/lib64/libOpenGL.so;/usr/lib64/libGLX.so;/usr/lib64/libGLU.so;Qt5::OpenGL;/usr/lib64/libEGL.so -- MediaPlayer definitions: -D__STDC_CONSTANT_MACROS;-DQTAV_HAVE_CAPI=1;-DQTAV_HAVE_VDA=0;-DAUTO_REGISTER=0;-DFF_API_OLD_MSMPEG4=0;-DFF_API_AC_VLC=0;-DQTAV_HAVE_FFMPEG5;-DQTAV_HAVE_SSE4_1=1;-DQTAV_HAVE_SSE2=0;-DQTAV_HAVE_DXVA=0;-DCAPI_LINK_ASS;-DQTAV_HAVE_LIBASS=1;-DLINK_UCHARDET;-DCAPI_LINK_EGL;-DQTAV_HAVE_GL=1;-DQTAV_HAVE_X11=1;-DQTAV_HAVE_XV=1;-DQTAV_HAVE_OPENAL=1;-DQTAV_HAVE_PORTAUDIO=1;-DQTAV_HAVE_PULSEAUDIO=1;-DQTAV_HAVE_OPENSL=0;-DQTAV_HAVE_D3D11VA=0;-DQTAV_HAVE_XAUDIO2=0;-DQTAV_HAVE_DSOUND=0;-DQTAV_HAVE_GDIPLUS=0;-DQTAV_HAVE_DIRECT2D=0;-DQTAV_HAVE_SWR_AVR_MAP=0;-DQTAV_HAVE_VIDEOTOOLBOX=0;-DQTAV_HAVE_CUDA=1;-DQTAV_HAVE_DLLAPI_CUDA=0;-DQTAV_HAVE_AVCODEC=1;-DQTAV_HAVE_AVDEVICE=1;-DQTAV_HAVE_AVFILTER=1;-DQTAV_HAVE_AVUTIL=1;-DQTAV_HAVE_SWSCALE=1;-DQTAV_HAVE_AVRESAMPLE=0;-DQTAV_HAVE_SWRESAMPLE=1;-DQTAV_HAVE_EGL_CAPI=1;-DQTAV_HAVE_VAAPI=1 -- MediaPlayer flags : -msse4.1 -- -- ------------------------------------------------- IMPORTANT : libavresample is now removed with FFMPEG 5 and SWRESAMPLE must be used instead. The rules in QtAV about to reroute libswresample to libavresample if swresample is not available is only valid with FFMPEG < 5. Another point is the way to enable FFMPEG 5 API uses with FFMPEG 4 to check if all deprecated API calls are fixed in QtAV : this do not work, as FFMPEG 5 API is more changed compared to FFMPEG 4. Finally, FFMPEG 5 compilation report more deprecated than ones reported with FFMPEG4: [ 3%] Building CXX object core/libs/dimg/CMakeFiles/core_dimg_obj.dir/core_dimg_obj_autogen/mocs_compilation.cpp.o /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp: In member function ‘bool Digikam::DMetadata::loadUsingFFmpeg(const QString&)’: /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:338:28: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 338 | switch (codec->channels) | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:70: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:338:28: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 338 | switch (codec->channels) | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:70: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:338:28: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 338 | switch (codec->channels) | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/metadataengine/dmetadata/dmetadata_video.cpp:70: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ [ 3%] Building CXX object core/libs/metadataengine/CMakeFiles/core_dmetadata_obj.dir/dmetadata/dmetadata_exiftool.cpp.o ... /home/gilles/Devel/8.x/core/libs/threadimageio/video/videothumbdecoder_p.cpp: In member function ‘bool Digikam::VideoThumbDecoder::Private::initializeVideo()’: /home/gilles/Devel/8.x/core/libs/threadimageio/video/videothumbdecoder_p.cpp:93:49: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive] 93 | pVideoCodec = avcodec_find_decoder(pVideoCodecParameters->codec_id); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | const AVCodec* make[2]: *** [core/libs/threadimageio/CMakeFiles/core_threadimageio_obj.dir/build.make:407: core/libs/threadimageio/CMakeFiles/core_threadimageio_obj.dir/video/videothumbdecoder_p.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:9005: core/libs/threadimageio/CMakeFiles/core_threadimageio_obj.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Also, the Bernhard patch is not enough to compile QtAV code from digiKam core : Scanning dependencies of target core_qtav_obj [ 0%] Building CXX object core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/core_qtav_obj_autogen/mocs_compilation.cpp.o [ 0%] Building CXX object core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/src/ffmpeg/AVCompat.cpp.o [ 0%] Building CXX object core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/src/ffmpeg/AVMuxer.cpp.o /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp: In member function ‘AVStream* QtAV::AVMuxer::Private::addStream(AVFormatContext*, const QString&, AVCodecID)’: /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:209:34: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’ 209 | AVCodec* const c = s->codec; | ^~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:213:8: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘codec_id’ 213 | c->codec_id = codec->id; | ^~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:217:8: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘time_base’ 217 | c->time_base = s->time_base; | ^~~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:222:12: error: ‘AVCodec’ {aka ‘struct AVCodec’} has no member named ‘flags’ 222 | c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | ^~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp: In member function ‘bool QtAV::AVMuxer::Private::prepareStreams()’: /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:322:16: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations] 322 | c->channel_layout = aenc->audioFormat().channelLayoutFFmpeg(); | ^~~~~~~~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:166:14: note: declared here 166 | uint64_t channel_layout; | ^~~~~~~~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:322:16: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations] 322 | c->channel_layout = aenc->audioFormat().channelLayoutFFmpeg(); | ^~~~~~~~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:166:14: note: declared here 166 | uint64_t channel_layout; | ^~~~~~~~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:322:16: warning: ‘AVCodecParameters::channel_layout’ is deprecated [-Wdeprecated-declarations] 322 | c->channel_layout = aenc->audioFormat().channelLayoutFFmpeg(); | ^~~~~~~~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:166:14: note: declared here 166 | uint64_t channel_layout; | ^~~~~~~~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:323:16: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 323 | c->channels = aenc->audioFormat().channels(); | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:323:16: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 323 | c->channels = aenc->audioFormat().channels(); | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:323:16: warning: ‘AVCodecParameters::channels’ is deprecated [-Wdeprecated-declarations] 323 | c->channels = aenc->audioFormat().channels(); | ^~~~~~~~ In file included from /usr/include/libavformat/avformat.h:314, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVCompat.h:61, from /home/gilles/Devel/8.x/core/libs/video/qtav/src/ffmpeg/AVMuxer.cpp:28: /usr/include/libavcodec/codec_par.h:172:14: note: declared here 172 | int channels; | ^~~~~~~~ make[2]: *** [core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/build.make:116: core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/src/ffmpeg/AVMuxer.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:10626: core/libs/video/qtav/CMakeFiles/core_qtav_obj.dir/all] Error 2 make: *** [Makefile:160: all] Error 2 Voilà, so the ffmpeg 5 support in digiKam needs more works... Gilles -- You are receiving this mail because: You are watching all bug changes.