MaartenBaert / ssr

SimpleScreenRecorder, a screen recorder for Linux
http://www.maartenbaert.be/simplescreenrecorder/
GNU General Public License v3.0
2.49k stars 288 forks source link

Build against ffmpeg-5 fails #949

Open Polynomial-C opened 2 years ago

Polynomial-C commented 2 years ago

This was reported downstream at https://bugs.gentoo.org/834415

Compilation against ffmpeg-5 fails with:

[35/86] /usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DSSR_SYSTEM_DIR=\"/usr/share/simplescreenrecorder\" -DSSR_USE_ALSA=1 -DSSR_USE_FFMPEG_VERSIONS=1 -DSSR_USE_JACK=0 -DSSR_USE_JACK_METADATA=0 -DSSR_USE_OPENGL_RECORDING=1 -DSSR_USE_PULSEAUDIO=1 -DSSR_USE_V4L2=1 -DSSR_USE_X86_ASM=1 -DSSR_VERSION=\"0.4.3\" -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/simplescreenrecorder-0.4.3_build-abi_x86_64.amd64/src/simplescreenrecorder_autogen/include -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Input -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/common -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/GUI -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtX11Extras  -O2 -march=znver3 -pipe -g -ggdb3 -fPIC -fPIC -std=gnu++11 -MD -MT src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o -MF src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o.d -o src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o -c /var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp
FAILED: src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o 
/usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -DSSR_SYSTEM_DIR=\"/usr/share/simplescreenrecorder\" -DSSR_USE_ALSA=1 -DSSR_USE_FFMPEG_VERSIONS=1 -DSSR_USE_JACK=0 -DSSR_USE_JACK_METADATA=0 -DSSR_USE_OPENGL_RECORDING=1 -DSSR_USE_PULSEAUDIO=1 -DSSR_USE_V4L2=1 -DSSR_USE_X86_ASM=1 -DSSR_VERSION=\"0.4.3\" -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/simplescreenrecorder-0.4.3_build-abi_x86_64.amd64/src/simplescreenrecorder_autogen/include -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Input -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/common -I/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/GUI -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtX11Extras  -O2 -march=znver3 -pipe -g -ggdb3 -fPIC -fPIC -std=gnu++11 -MD -MT src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o -MF src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o.d -o src/CMakeFiles/simplescreenrecorder.dir/AV/Output/Muxer.cpp.o -c /var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp
/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp: In member function ‘void Muxer::Init()’:
/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp:197:49: error: invalid conversion from ‘const AVOutputFormat*’ to ‘AVOutputFormat*’ [-fpermissive]
  197 |         AVOutputFormat *format = av_guess_format(m_container_name.toUtf8().constData(), NULL, NULL);
      |                                  ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                 |
      |                                                 const AVOutputFormat*
/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp: In member function ‘AVCodec* Muxer::FindCodec(const QString&)’:
/var/tmp/portage/media-video/simplescreenrecorder-0.4.3/work/ssr-0.4.3/src/AV/Output/Muxer.cpp:265:54: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
  265 |         AVCodec *codec = avcodec_find_encoder_by_name(codec_name.toUtf8().constData());
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                      |
      |                                                      const AVCodec*
Charlie-Ramirez-Animation-Studios-de-MX commented 2 years ago

Hello, is it the first time installing SSR or have you used it before on the system?

-If this is your first time installing SSR via the github build method, try following the steps in the README, [mainly the parts regarding package dependencies and the FFmpeg- Livab library] See: https://github.com/MaartenBaert/ssr#compilation-issues [performing the simple install method will also fix several problems].

-Due to part of the problems of the libav-ffmpeg packages in 2020 [Version 0.4.3], a change was made in this section, it could help you: https://github.com/MaartenBaert/ssr/commit/7f26bc7850ea7755e9d6f716e47cd6e47e139bcc I think @MaartenBaert could know more if this change affects. Edit... Apparently there is a Pull Request for FFmpeg-5 that could be related https://github.com/MaartenBaert/ssr/pull/934

tgurr commented 1 year ago

Applying https://github.com/MaartenBaert/ssr/commit/768957a8de1534f0aa91bfc5d7af3c32f222beb8 from git master to ssr-0.4.4 allowed me to build against ffmpeg 5 just fine.