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 #45

Open
dbungert opened this issue Sep 14, 2022 · 6 comments
Open

Fails to build with FFMPEG 5 #45

dbungert opened this issue Sep 14, 2022 · 6 comments

Comments

@dbungert
Copy link

performous-composer will fail to build when doing so on Debian Sid or Ubuntu Kinetic.
Both these environments have FFMPEG 5.

The debbug has a good summary of the problem:

/<<PKGBUILDDIR>>/src/ffmpeg.cc: In member function ‘void FFmpeg::open()’:
/<<PKGBUILDDIR>>/src/ffmpeg.cc:71:9: error: ‘av_register_all’ was not declared in this scope
   71 |         av_register_all();
      |         ^~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/src/ffmpeg.cc:79:62: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
   79 |                 AVCodecContext* cc = pFormatCtx->streams[i]->codec;
      |                                                              ^~~~~
/<<PKGBUILDDIR>>/src/ffmpeg.cc:84:64: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
   84 |         AVCodecContext* cc = pFormatCtx->streams[audioStream]->codec;
      |                                                                ^~~~~
/<<PKGBUILDDIR>>/src/ffmpeg.cc:85:43: error: invalid conversion from ‘const AVCodec*’ to ‘AVCodec*’ [-fpermissive]
   85 |         pAudioCodec = avcodec_find_decoder(cc->codec_id);
      |                       ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
      |                                           |
      |                                           const AVCodec*
/<<PKGBUILDDIR>>/src/ffmpeg.cc: In member function ‘void FFmpeg::decodeNextFrame()’:
/<<PKGBUILDDIR>>/src/ffmpeg.cc:172:45: error: ‘avcodec_decode_audio4’ was not declared in this scope; did you mean ‘avcodec_decode_subtitle2’?
  172 |                                 bytesUsed = avcodec_decode_audio4(pAudioCodecCtx,m_frame,&gotFramePointer, &packet);
      |                                             ^~~~~~~~~~~~~~~~~~~~~
      |                                             avcodec_decode_subtitle2
make[3]: *** [src/CMakeFiles/composer.dir/build.make:166: src/CMakeFiles/composer.dir/ffmpeg.cc.o] Error 1

Here is a longer form log with the same failure:
https://launchpadlibrarian.net/619963471/buildlog_ubuntu-kinetic-amd64.performous-composer_2.0+20181009-gitbeeea23-2.1build2_BUILDING.txt.gz

The first 3 failure lines aren't so bad, but avcodec_decode_audio4 will need a more dedicated adjustment.

I think performous/performous@6ac4866 is a good reference point if one wants to port things over one step at a time, or maybe mass merging over the FFmpeg class entirely would be preferable.

@Baklap4
Copy link
Member

Baklap4 commented Sep 14, 2022

Thanks for notifying us about this :)

We did make some fixes over in performous already to support ffmpeg 5 i think so we'll have to do some updates here aswell

@Baklap4
Copy link
Member

Baklap4 commented Jan 6, 2023

Also fails when building for windows. @OznOg if you have any time, wanna check this out?

@kangalio
Copy link

I'm hitting this on Arch Linux despite having ffmpeg4.4 installed. How to redirect composer to use ffmpeg4.4 instead?

@Baklap4
Copy link
Member

Baklap4 commented Jan 23, 2023

@dbungert & @kangalioo for the time being can you guys use our AppImage which @ooshlablu just made? this should work out of the box as it includes and ships all the used libraries

@kangalio
Copy link

Yep, I tried it out immediately after ooshlablu made it. With exception of the Play button, it works :)

@Baklap4
Copy link
Member

Baklap4 commented Jan 24, 2023

Hmmm the play button should play the loaded mp3 file :o maybe good to create a new issue for that

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

3 participants