-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[ffmpeg] Add feature support for zlib, iconv, fdk-aac, mp3lame, opus, soxr, theora. #11277
Conversation
A small subset of features is already under revision in #11151 |
I have seen #11151 but this is a superset of that which doesnt directly apply over the top of it without having to make some changes to #11151 (although minor ones). So since i had already done the work for lame and opus (the only 2 added by #11151) I left them in this patch as it makes it easier to add and test the others without dealing with conflicts. As to which is used, it doesn't bother me. I just had this patch ready to go, all checks passing, so i thought id put it up. |
Thank you for your work! |
I also have commits that add support for vorbis, speex, snappy and wavpack features but ill wait for a review on these before pushing those |
@Sibras when consuming ffmpeg, using cmake, is it necessary to modify FindFFMPEG.cmake in order to add missing dependencies, in case ffmpeg is built with some of your new features? |
@cenit Most likely FindFFMPEG.cmake should be modified, However many of the existing features were already not added to FindFFMPEG.cmake (such as openssl, x264 etc.) before this so it was already broken. Ill have a look at fixing though |
It’s not broken for default features for sure. I’d not be happy about merging even more features without support inside FindFFMPEG.cmake, but that’s just my feeling. |
@cenit, OK ive looked over FindFFMPEG.cmake and it looks like it is actually broken even for defaults. It was incorrectly finding the wrong ffmpeg libs (only ever found debug) and was not searching for postproc.lib which is actually used by avfilter so you would still get link errors with static builds (linux and windows). Ive fixed the above issues and added in handling for the previously missing dependencies + all the ones i have added. Ill update the pr later once i clean up the patches. For reference just testing opencv is not enough as that just builds a lib. So for testing i created a 5 line program that pulled in ffmpeg using cmake and then tested it using linux+windows static build triplets. Not sure if something like that should/can be added to the CI to help test in the future. |
@Sibras thanks for adding them. This kind of testing, while very important, is still out of scope for vcpkg. |
8649185
to
aa7432f
Compare
bump |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Please resolve the file conflicts. Thanks. |
Only outstanding issues on linux are now:
|
Co-authored-by: Phoebe <[email protected]>
This feature is entirely unrelated and should be added in a new PR.
@Sibras, thanks for your hard work! Test all features with latest changes: x265: ERROR: libx265 not found Double checked, the wavpack requires '-lm' library, wavpack failure log:
x265 failure log
|
Wavpack is fixed now. I couldnt reproduce the x265 error on my machine, I have libnuma-dev installed but its not picking it up. So i think I fixed the x265 error but I cant reproduce it to test. |
@Sibras, after I installed libnuma-dev, the feature 'x265' passed on linux. the feature 'wavpack' also test pass on linux. Summary the feature tests status: Currently no issues to block this PR, @strega-nil, could you please help review and merge this PR? |
@Sibras could you merge with master? |
Thanks for your contribution! |
… soxr, theora. (microsoft#11277) Co-authored-by: Phoebe <[email protected]>
[zlib] Fix unistd.h being incorrectly required when imported from a project defining HAVE_UNISTD_H=0
[ffmpeg] Fix zlib feature. Zlib was not currently being used despite being marked as a dependency. Zlib was quietly failing due to a missing unistd.h. An update was also required to detect the correct debug lib.
[ffmpeg] Add additional features to enable:
[ffmpeg] Fix various issues with FindFFmpeg.cmake:
[ogg] Enable output of pkg-config file (required for detection by ffmpeg and vorbis)
[speex] Enable output of pkg-config file
[ffmpeg] Set pkg-config to search for static configurations when building in static configuration
[ffmpeg] Fixes for detection of opencl, soxr, lame, iconv, fdk, x264, x265, openssl, wavpack on linux/static builds
[sdl2] Enable output of pkg-config file
[fdk-aac] Correct header installation to "include/fdk-aac" to match fdk's normal build scripts (required for any lib such as ffmpeg to get the correct header location)
[ffmpeg] Remove nvcodec's dependency on cuda
[pkgconfig] Add additional common system libraries.
[vcpkg_fixup_pkgconfig] Add to ffnvcodec, ogg, sdl2, speex, x265, wavpack, vorbis, opus
Fixes #7084, Fixes #9671, Fixes #7544