-
Notifications
You must be signed in to change notification settings - Fork 77
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
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 <pkv@obsproject.com> Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
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 <pkv@obsproject.com> Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com> Signed-off-by: pkv <pkv@obsproject.com>
Could you extract |
3ef2e08
to
0e4e555
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
ffmpeg
package to Windows build scripts (selected by providing-PackageName ffmpeg
to the build script).While building Windows binaries via MINGW64, it leads to several small issues:
PDB
) is not supported by the toolchain entirely asclang
/gcc
always embed debug information and there is no MING64 variant of the program database server (the service that collects symbols during compilation and generatesPDB
s)This PR builds all(!) current FFmpeg dependencies and FFmpeg itself natively on Windows with the MSVC toolchain (using either
cl
orclang-cl
as compiler):zlib
: Built nativelylibpng
: Built nativelyopus
: Built nativelyogg
: Built nativelyvorbis
: Built nativelylibvpx
: Uses shell support andmake
fromMSYS2
, compiled withMSBuild
SVT-AV1
: Built nativelyaom
: Built nativelyx264
: Uses shell support andmake
fromMSYS2
, compiled withcl
libtheora
: Built nativelylame
: Built natively using old (but still working)nmake
scriptmbedtls
: Built natively, but due to its code architecture as static libraries onlysrt
: Built natively, using C++11 threading and staticmbedtls
librist
: Built natively, usingmeson
in a VS DevShell and embeddedmbedtls
ffmpeg
: Built natively with Win32 threading support, statically linking all 3rd party libraries except forsrt
,librist
, andx264
which are available as shared librariesNote: The most impacting change on
obs-deps
is the need to also link tombedtls
statically due to the reasons above.The scripts are entirely PowerShell-based, build dependencies are installed via
winget
, except formeson
andninja
which are installed viapip3
on GitHub Action runners.POSIX tools (
pkg-config
,yasm
,nasm
,make
, and others) are installed viapacman
inside theMSYS2
environment automatically.How Has This Been Tested?
Tested on CI and locally on Windows 11.
Types of changes
Checklist: