Repository navigation
deps.ffmpeg: Switch Windows builds to native build toolchain - #186
Conversation
1eefd41 to
aec3b32
Compare
|
Note: This PR does not add PDB creation - while some packages will automatically create PDBs because they are CMake-based (and thus use the MSVC toolchain natively), some do not (namely X264, libvpx, and FFmpeg itself), and others are built using clang-cl which does not generate PDBs (AOM). It does however create a better starting point for adding Windows PDBs (see also #183 which does that for macOS). |
aec3b32 to
9050a91
Compare
|
I've been waiting for lame support in OBS to stream to an Icecast server for a long, long time. I replaced the ffmpeg build in the current release with the dlls produced by the CI of this pr and am very happy to see that this finally works now. So really looking forward for this to arrive! |
9050a91 to
082b51e
Compare
98b6d96 to
5ceb03e
Compare
|
Updated this and the other PRs to follow a single dependency trail:
Following this order will update each part of |
5ceb03e to
4ccb642
Compare
4ccb642 to
06381c9
Compare
This enables mbedTLS to be compiled natively on MSVC. The lib is built as a static dependency because mbedTLS dlls can not be built natively with MSVC due to long-standing bugs. Note: for future upgrades, 3.3.0 has a bug with designated initializers which prevents the building of libdatachannel on MSVC. But 3.4.0 does not. The script was ripped from [1] authored by PatTheMav. [1] obsproject#186 Signed-off-by: pkv <[email protected]> Co-authored-by: PatTheMav <[email protected]>
This enables mbedTLS to be compiled natively on MSVC. The lib is built as a static dependency because mbedTLS dlls can not be built natively with MSVC due to long-standing bugs. Note: for future upgrades, 3.3.0 has a bug with designated initializers which prevents the building of libdatachannel on MSVC. But 3.4.0 does not. The script was ripped from [1] authored by PatTheMav. [1] obsproject#186 Signed-off-by: pkv <[email protected]> Co-authored-by: PatTheMav <[email protected]> Signed-off-by: pkv <[email protected]>
|
Could you extract |
3ef2e08 to
0e4e555
Compare
RytoEX
left a comment
There was a problem hiding this comment.
Submitting a preliminary review before I forget to do so. Initial testing seemed promising. Will investigate more soon.
9cdb9ce to
8f3f38c
Compare
8f3f38c to
b749537
Compare
b749537 to
8fbaca0
Compare
a15e39a to
f2b2cba
Compare
f2b2cba to
9b566b0
Compare
Good newsOBS builds in Debug and RelWithDebInfo. These worked:
Everything in my typical tests for those features worked. Bad NewsHLS streaming does not work. FFmpeg was compiled without HTTPS because the schannel test failed. Specifically, the I've also confirmed that this happens when trying to build FFmpeg locally. This seems to be caused by |
9b566b0 to
c73fc49
Compare
|
After further investigation, @PatTheMav 's recent change removes the define entirely, so it will default to |
c73fc49 to
d24e5e0
Compare
|
Retested HLS with the new changes and HLS now works, which means all of my tests passed. Worth noting that some files may have different names (libsrt.dll -> srt.dll) which we may have to address via the updater, but that should be doable. |
|
For posterity, these files are renamed:
These files have been removed:
I believe these changes are intentional. |
Description
Adds an entirely Windows-based toolchain for building FFmpeg and its dependencies and replaces the current Linux-based toolchain.
Motivation and Context
Adds the
ffmpegpackage to Windows build scripts (selected by providing-PackageName ffmpegto the build script).While building Windows binaries via MINGW64, it leads to several small issues:
PDB) is not supported by the toolchain entirely asclang/gccalways embed debug information and there is no MING64 variant of the program database server (the service that collects symbols during compilation and generatesPDBs)This PR builds all(!) current FFmpeg dependencies and FFmpeg itself natively on Windows with the MSVC toolchain (using either
clorclang-clas compiler):zlib: Built nativelylibpng: Built nativelyopus: Built nativelyogg: Built nativelyvorbis: Built nativelylibvpx: Uses shell support andmakefromMSYS2, compiled withMSBuildSVT-AV1: Built nativelyaom: Built nativelyx264: Uses shell support andmakefromMSYS2, compiled withcllibtheora: Built nativelylame: Built natively using old (but still working)nmakescriptmbedtls: Built natively, but due to its code architecture as static libraries onlysrt: Built natively, using C++11 threading and staticmbedtlslibrist: Built natively, usingmesonin a VS DevShell and embeddedmbedtlsffmpeg: Built natively with Win32 threading support, statically linking all 3rd party libraries except forsrt,librist, andx264which are available as shared librariesNote: The most impacting change on
obs-depsis the need to also link tombedtlsstatically due to the reasons above.The scripts are entirely PowerShell-based, build dependencies are installed via
winget, except formesonandninjawhich are installed viapip3on GitHub Action runners.POSIX tools (
pkg-config,yasm,nasm,make, and others) are installed viapacmaninside theMSYS2environment automatically.How Has This Been Tested?
Tested on CI and locally on Windows 11.
Types of changes
Checklist: