-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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 windows builds will be removed #1753
Comments
#1484 also suffered from dll hell. IMO, it can be solved in the same time? |
MSYS2/MinGW FFmpeg builds are dynamically linked. So, you have to download all the dependencies which may not be the right solution here. One lazy solution would be to create a package for MSYS2 which already provides FFmpeg and SDL2. But the package will not be a standalone like the current releases.
How those guys build it. Any script?
Neevvveeerrr. With CI, possibility is endless. |
Not sure if it will help much, but ffmpeg peeps already have a compilation guides: https://trac.ffmpeg.org/wiki/CompilationGuide But need to understand what the end goal would be, as compiling ffmpeg every as a dependency for scrcpy would be time consuming. I mean potentially ffmpeg community will come up with alternative source for the builds. |
Yes, that's what I did for v1.0. 😄
I don't know. In theory, I'd like to do something similar as we do in VLC (cf
Yes, but I would like to be able to build the whole release from any computer (running linux) in a single script (even without docker) :) |
Thank you for the links 👍
Only if we want/need to, otherwise it could use the dependencies provided by the system. But it would also allow to create a minimal static build (that would be awesome to distribute the latest scrcpy release on linux). |
If that need a script to be added in scrcpy, would you add it?
By whole release, do you mean to compile dependencies also? Or scrcpy only? |
Yes, a script which builds ffmpeg and a script which builds SDL. 👍 I would like to replace
Each subdir would contain a script to build and install the dependency into some destination directory (or just download and verify checksum for But that should be optional (e.g. we should be able to build scrcpy against the system ffmpeg).
Yes, dependencies included. The release script should generate the files posted on every release:
If we compile the dependencies ourselves, either we just include the dll in the release, or better we build the scrcpy binaries with FFmpeg and libsdl statically linked. And if that's the case, we could also generate:
This is just what I have currently in mind, maybe there are better ways. |
Found something https://github.com/rdp/ffmpeg-windows-build-helpers.git. I will try it. |
Be aware that the license of this script is GPLv3. |
Hi, @rom1v Would you accept something like mxe? I built SDL2 and ffmpeg using mxe. After it, I built scrcpy against the output dlls in mxe and copied needed dlls by using copydlldeps (a tool from mxe). If you are ok on mxe, I can create a PR about this. |
For now, I don't know enough to have an opinion.
So compiling the cross compiler is a necessary step? |
Oh, ffmpeg.org provides an alternative link to builds of FFmpeg:
This does not change the goal to get a proper solution, but it could help in the short term :) |
For demo and testing, I can provide a PoC in a branch of my forked repo.
From my point of view, the answer looks yes. |
@npes87184 Oh, thank you! Very interesting. It looks great in the Makefile. However, since it rebuilds everything (including gcc and other stuff), it takes too much time. 😞 |
I guess it still has some problems need to be solved. When it executes the I guess we need to write down all the dependencies of ffmpeg and SDL2 in
Yes, it is a problem. It also has pre-built libs here. However, I have not tested it. BTW, if we want to do static link ffmpeg, it also needs to care about the license. |
True. Static link is a nice-to-have solution so that Linux users could quickly test the latest version using a binary. If we are able to build the deps dynamically for Windows, it's already good. |
I create a PR that use ffmpeg built from BtbN in #1838 . |
Until this is resolved, you can prepend the ffmpeg url with https://web.archive.org/web/20200916091820/ (like https://web.archive.org/web/20200916091820/https://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-4.3.1-win32-shared.zip) in prebuild-deps/Makefile |
@rom1v Sure, this is more stable solution, mine was intended as a workaround :) |
May I suggest using Conan? It's able to both download prebuilt binaries (if available) or build automatically from the source. I haven't used it much, but it's worked well for me so far. Problem is it's much better integrated with CMake. Meson, not so much. |
Note: it seems that meson can use the CMake (However, Conan is not available is official Debian repositories, so I prefer not to depend on it.) |
Unsubscribe |
To unsubscribe from a thread on github, there is a button |
Conan can be installed using Even then, seems the official Conan repo doesn't have a ffmpeg recipe yet. Maybe once it's available, we could give it another thought. |
It's available and functional: conan-io/conan-center-index#6707 |
If we need to build dependencies on windows, I suggest to try meson's wrap, which can helps to gather and build dependencies. See #1624 (comment). |
However wrapdb has SDL2 but not ffmpeg. |
A meson-ported ffmpeg hosted by gstreamer is https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg but it's ffmpeg 4.1. |
Use FFmpeg win64 binaries from gyan.dev (referenced from ffmpeg.org): - https://www.gyan.dev/ffmpeg/builds/ - https://ffmpeg.org/download.html#build-windows Keep the old FFmpeg prebuilt binaries (4.3.1) for win32 builds. Fixes #1753 <#1753> Refs #1838 <#1838> Refs #2583 <#2583> Co-authored-by: Yu-Chen Lin <[email protected]> Co-authored-by: nkh0472 <[email protected]> Signed-off-by: Romain Vimont <[email protected]>
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
I published a custom build specific to scrcpy (containing only the features used by scrcpy): Here is a commit (not merged yet) to use it: custom-ffmpeg For comparison, here are the sizes of the dll for FFmpeg 5.1.2:
|
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
On the scrcpy-deps repo, I built FFmpeg 5.1.2 binaries for Windows with only the features used by scrcpy. For comparison, here are the sizes of the dll for FFmpeg 5.1.2: - before: 89M - after: 4.7M It also allows to upgrade the old FFmpeg version (4.3.1) used for win32. Refs <https://github.com/rom1v/scrcpy-deps> Refs <#1753>
I developed scrcpy for Linux, where the dependencies are just retrieved via
apt
.But scrcpy had to work on Windows too. I'm bad at build systems, and have a very limited knowledge of Windows, so I initially just recommended to build from something which looks like a Linux environment (MSYS2). For the first public release (v1.0), I even just took the DLL installed from the MSYS environment.
But it was too cumbersome for me to create a release (I had to build from a Windows machine), so I wrote some script to cross-compile the binaries from Linux, and just downloaded prebuilt dependencies of FFmpeg and SDL (106b87a). This was a quick&dirty solution (which btw makes adding or upgrading dependencies very annoying). I'm not very proud of it, but at least it was good enough for solving my problem.
The FFmpeg binaries are downloaded from https://ffmpeg.zeranoe.com/builds/. This site will close soon:
so the release script of scrcpy will just stop to work correctly.
In the short term, I could just keep the latest versions and ship them. But it becomes urgent to build the dependencies along with scrcpy. And an option to build static binaries would be awesome (#1624).
https://linuxfr.org/users/roger21/journaux/ffmpeg-pour-windows-ca-va-couper
The text was updated successfully, but these errors were encountered: