Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build with ffmpeg >= 5.0 #87

Open
david-geiger opened this issue Aug 4, 2024 · 3 comments
Open

Fails to build with ffmpeg >= 5.0 #87

david-geiger opened this issue Aug 4, 2024 · 3 comments

Comments

@david-geiger
Copy link

Hi,

tupitube doesn't build with ffmpeg >= 5.0 on Mageia Cauldron, there are some build error like:

main.cpp:46:45: error: invalid conversion from 'const AVOutputFormat*' to 'AVOutputFormat*' [-fpermissive] 46 | AVOutputFormat *format = av_guess_format("ffh264", NULL, NULL); | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ | | | const AVOutputFormat* main.cpp:56:42: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 56 | AVCodec *codec = avcodec_find_encoder(stream->codecpar->codec_id); | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | const AVCodec* make: *** [Makefile:379: main.o] Error 1 tupaudiomixer.cpp: In member function 'int TupAudioMixer::openInputFile(const char*)': tupaudiomixer.cpp:131:45: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 131 | if (!(input_codec = avcodec_find_decoder(audioCodecID))) { | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ | | | const AVCodec* tupaudiomixer.cpp: In member function 'void TupAudioMixer::setCodecContextParameters()': tupaudiomixer.cpp:197:40: warning: 'AVCodecContext::channel_layout' is deprecated [-Wdeprecated-declarations] 197 | if (!inputCodecContextList[i]->channel_layout) | tupaudiomixer.cpp: In member function 'int TupAudioMixer::openOutputFile(const char*, AVCodecContext*)': tupaudiomixer.cpp:527:57: error: invalid conversion from 'const AVOutputFormat*' to 'AVOutputFormat*' [-fpermissive] 527 | AVOutputFormat *outputFormat = outputFormatContext->oformat; | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~ | | | const AVOutputFormat* tupaudiomixer.cpp:531:45: error: invalid conversion from 'const AVCodec*' to 'AVCodec*' [-fpermissive] 531 | if (!(outputCodec = avcodec_find_encoder(audioCodecID))) { | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ | | | const AVCodec* tupaudiomixer.cpp: In member function 'int TupAudioMixer::decodeAudioFrame(AVFrame*, AVFormatContext*, AVCodecContext*, int*, int*)': tupaudiomixer.cpp:683:18: error: 'avcodec_decode_audio4' was not declared in this scope; did you mean 'avcodec_decode_subtitle2'? 683 | if ((error = avcodec_decode_audio4(inputCodecContext, frame, | ^~~~~~~~~~~~~~~~~~~~~ | avcodec_decode_subtitle2 make[4]: *** [Makefile:458: .obj/tupaudiomixer.o] Error 1

Regards,
David

@xtingray
Copy link
Owner

xtingray commented Aug 5, 2024

Hi,
I just want you to know that the TupiTube source code requires a lot of refactoring and updating, including the Qt libraries and other dependencies like the FFmpeg latest version. This process will take several months, so for now, a workaround is using FFmpeg version 4.4. This is the config parameters I use to compile it:

./configure --prefix=/usr/local/ffmpeg --enable-shared --disable-doc --enable-libx264 --enable-gpl --enable-ffplay --enable-sdl2 --enable-libmp3lame make >& log.txt

If you have additional questions about the compilation process, please let me know.
Regards,

@david-geiger
Copy link
Author

Impossible to use a very old ffmpeg version in a stable distribution, we do not have it and we do not want to maintain some ffmpeg package version.

@xtingray
Copy link
Owner

I got it. It will take a while to upgrade the code depending on the FFmpeg package from my side, but I expect to notify you as soon as possible. Sorry for the inconvenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants