Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112357

QtMultimedia build error with ffmpeg < 5

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.6
    • Multimedia
    • None
    • Linux/X11

    Description

      It appears that the configure does not check the version of ffmpeg used by QtMM. If a version of ffmpeg older than 5.0 is used, compilation fails with the following error message:

       

      [319/1953] Building CXX object qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/qffmpegencoder.cpp.oFAILED: qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/qffmpegencoder.cpp.o /usr/bin/ccache /usr/bin/c++ DQFFmpegMediaPlugin_EXPORTS -DQT_COMPILING_FFMPEG -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_AS_CONST -DQT_NO_AS_CONST=1 -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_PLUGIN -DQT_STRICT_QLIST_ITERATORS -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I...build/qtmultimedia/src/plugins/multimedia/ffmpeg/QFFmpegMediaPlugin_autogen/include -I...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg -I...build/qtmultimedia/src/plugins/multimedia/ffmpeg -I...build/qtbase/include -I...build/qtmultimedia/src/multimedia -I...build/qtbase/include/QtMultimedia/6.6.0 -I...build/qtbase/include/QtMultimedia/6.6.0/QtMultimedia -I...build/qtbase/src/corelib -I...build/qtbase/include/QtCore/6.6.0 -I...build/qtbase/include/QtCore/6.6.0/QtCore -I...build/qtbase/include/QtCore -I...build/qtbase/mkspecs/linux-g++ -I...build/qtbase/src/gui -I...build/qtbase/include/QtGui/6.6.0 -I...build/qtbase/include/QtGui/6.6.0/QtGui -I...build/qtbase/include/QtGui -I...build/qtbase/include/QtMultimedia -I...build/qtbase/include/QtNetwork -g -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-exceptions -fPIC -Werror -Wno-error=cpp -Wno-error=deprecated-declarations -Wno-error=strict-overflow -Wno-error=implicit-fallthrough -Wno-error=deprecated-copy -Wno-error=redundant-move -Wno-error=init-list-lifetime -Wno-error=format-overflow -Wno-error=stringop-overflow -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-enum-float-conversion -Wsuggest-override -MD -MT qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/qffmpegencoder.cpp.o -MF qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/qffmpegencoder.cpp.o.d -o qtmultimedia/src/plugins/multimedia/ffmpeg/CMakeFiles/QFFmpegMediaPlugin.dir/qffmpegencoder.cpp.o -c ...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpegencoder.cpp...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpegencoder.cpp: In member function ‘virtual void QFFmpeg::AudioEncoder::loop()’:...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpegencoder.cpp:433:12: error: ‘struct AVFrame’ has no member named ‘time_base’  433 |     frame>time_base = timeBase;      |            ^~~~~~~~...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpegencoder.cpp: In member function ‘virtual void QFFmpeg::VideoEncoder::loop()’:...qt5/qtmultimedia/src/plugins/multimedia/ffmpeg/qffmpegencoder.cpp:600:14: error: ‘struct AVFrame’ has no member named ‘time_base’  600 |     avFrame->time_base = frameEncoder->getTimeBase();      |              ^~~~~~~~

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              laknoll Lars Knoll
              tasuku.suzuki Tasuku Suzuki
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes