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

obs-ffmpeg: Fix deprecation with FFmpeg 7.1 #11511

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tytan652
Copy link
Collaborator

@tytan652 tytan652 commented Nov 12, 2024

Description

Closes #11484

Fix errors introduced by building OBS Studio with FFmpeg 7.1.

Motivation and Context

FFmpeg 7.1 is out, and Arch Linux will not wait for us…

And since the errors looked easy to fix, so I made the PR.

How Has This Been Tested?

Not completely tested, I just tried lossless encoder with #11510

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@bubba-champion
Copy link

I'm using FFmpeg built from git and I'm running into an issue that CMake can't find FFmpeg. If I rebuild FFmpeg with the same build options but on the 7.0 branch, then this problem does not occur. I would very much like this issue to be fixed as part of this merge request. If needed, I can provide all the build options I used for FFmpeg and OBS.

CMake Warning (dev) at cmake/common/versionconfig.cmake:66 (message):

  ******************************************************************************


    + OBS-Studio - Beta detected, OBS_VERSION is now: 31.0.0-beta3-8-g7979421cb-modified


  ******************************************************************************
Call Stack (most recent call first):
  cmake/common/bootstrap.cmake:60 (include)
  CMakeLists.txt:3 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find FFmpeg: (Required is at least version "6.1") (found
  /usr/lib/libavformat.so;/usr/lib/libavutil.so;/usr/lib/libswscale.so;/usr/lib/libswresample.so;/usr/lib/libavcodec.so,
  found components: avformat avutil swscale swresample avcodec)

      Reason given by package: Ensure that required FFmpeg libraries are installed on the system.

Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:601 (_FPHSA_FAILURE_MESSAGE)
  cmake/finders/FindFFmpeg.cmake:313 (find_package_handle_standard_args)
  libobs/CMakeLists.txt:12 (find_package)


-- Configuring incomplete, errors occurred!

@RytoEX
Copy link
Member

RytoEX commented Nov 15, 2024

We are aware of this issue. We do not require further reports at this time. Thank you for your understanding.

@Lain-B
Copy link
Collaborator

Lain-B commented Nov 16, 2024

For anyone who's willing to test, I think there shouldn't be too much to test. The things with lean on the heaviest are swscale and swresample for scaling/resampling, and avformat/avutil for muxing. We don't really rely too heavily on the encoders except for that one lossless one. Shouldn't be any regressions but double-checking this code with older versions is also welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants