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

master fails to build with FFmpeg >=5.0 #21766

Closed
1 of 7 tasks
marv opened this issue Aug 19, 2022 · 4 comments · Fixed by #21248
Closed
1 of 7 tasks

master fails to build with FFmpeg >=5.0 #21766

marv opened this issue Aug 19, 2022 · 4 comments · Fixed by #21248
Labels
Roadmap ticket on the Team roadmap Triage: Confirmed issue has been reproduced by a team member v20 Nexus

Comments

@marv
Copy link

marv commented Aug 19, 2022

Bug report

Describe the bug

Building against FFmpeg 5.1 fails because some deprecated APIs have been removed and some gained const specifiers:

[...]
/var/tmp/paludis/build/media-kodi-scm/work/kodi-scm/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:281:13: error: 'avcodec_encode_a
udio2' was not declared in this scope; did you mean 'avcodec_encode_subtitle'?
  281 |   int ret = avcodec_encode_audio2(m_CodecCtx, pkt, frame, &got_output);
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             avcodec_encode_subtitle
/var/tmp/paludis/build/media-kodi-scm/work/kodi-scm/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp: In member function 'virtual IA
E::SoundPtr ActiveAE::CActiveAE::MakeSound(const std::string&)':
/var/tmp/paludis/build/media-kodi-scm/work/kodi-scm/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp:3051:33: error: invalid conversion from 'AVInputFormat**' to 'const AVInputFormat**' [-fpermissive]
 3051 |   av_probe_input_buffer(io_ctx, &io_fmt, file.c_str(), nullptr, 0, 0);
      |                                 ^~~~~~~
      |                                 |
      |                                 AVInputFormat**
[...]

Expected Behavior

The build should succeed

Actual Behavior

The build errors out

Possible Fix

Port to FFmpeg 5, examples:

To Reproduce

Steps to reproduce the behavior:

  1. Install FFmpeg >= 5.0
  2. Configure kodi build using FFmpeg >= 5.0
  3. Start build

Debuglog

The debuglog can be found here:
kodi-scm.log

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: Exherbo Linux

  • Kodi version: master branch @ 8a85a4c

@lrusak
Copy link
Contributor

lrusak commented Aug 19, 2022

Already known and being worked on internally by the team.

Ref: #21248

@enen92 enen92 added Roadmap ticket on the Team roadmap v20 Nexus Triage: Confirmed issue has been reproduced by a team member labels Sep 4, 2022
@marv
Copy link
Author

marv commented Sep 27, 2022

Already known and being worked on internally by the team.

Cool, thanks for the info, it's good to know that's it's being worked on already!

What's the current progress? Is there already something I could test and give you feedback on?

@KjellRanda
Copy link

Same problem om Fedora 37:

/data/kodi/xbmc-20.0b1-Nexus/xbmc/cores/AudioEngine/Encoders/AEEncoderFFmpeg.cpp:281:13: error: ‘avcodec_encode_audio2’ was not declared in this scope; did you mean ‘avcodec_encode_subtitle’?
281 | int ret = avcodec_encode_audio2(m_CodecCtx, pkt, frame, &got_output);

rpm -qa|grep ffmpeg-
ffmpeg-libs-5.1.2-3.fc37.x86_64
ffmpeg-5.1.2-3.fc37.x86_64
ffmpeg-devel-5.1.2-3.fc37.x86_64

@enen92 enen92 mentioned this issue Dec 8, 2022
13 tasks
@lrusak
Copy link
Contributor

lrusak commented Dec 9, 2022

You can enable using the internal ffmpeg with the cmake option -DENABLE_INTERNAL_FFMPEG=ON

Otherwise I'm closing this as it's know and there is a PR that fixes it (for v21) or you can just build with internal ffmpeg as stated above.

@lrusak lrusak closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Roadmap ticket on the Team roadmap Triage: Confirmed issue has been reproduced by a team member v20 Nexus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants