-
Notifications
You must be signed in to change notification settings - Fork 301
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
Ability to install ffmpeg suite at runtime added with FFMpegDownloader #442
base: main
Are you sure you want to change the base?
Conversation
Merge with upstream
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #442 +/- ##
==========================================
- Coverage 71.06% 70.44% -0.62%
==========================================
Files 115 116 +1
Lines 2927 3052 +125
Branches 277 293 +16
==========================================
+ Hits 2080 2150 +70
- Misses 739 785 +46
- Partials 108 117 +9 ☔ View full report in Codecov by Sentry. |
I'm not the main developer of this tool, but what I didn't really like about the downloader in Xabe is that it downloads a really outdated version. On the FFMpeg website the currently released version is 6.0, so it would be nice if that version could be downloaded through the downloader. |
@devedse That can be done pretty easily, it’s just adding an url and an enum. We just need a reliable and safe source. One possible problem is that (from Readme) FFMpegCore is only tested with 3.x and 4.x of ffmpeg. Since we are running the unit tests with the latest version of ffmpeg, this should be okay. In that case, readme should probably be updated. |
I would prefer to have such functionality for downloading binaries from a remote source in a separate FFMpegCore.* package, so that we can keep this package as focused as possible, and make it an explicit decision for the users of this library whether they want/need such functionality. Similar to how SkiaSharp and SDC Bitmap support was moved to separate packages. |
This library is aimed at being cross-platform, so I think we should support more platforms than just Windows with this feature, before publishing |
@rosenbjerg I can move it to a different package and look into supporting macOS and Linux for download. |
win32, win64, lnx32, lnx64, lnx-armhf, lnx-armel, lnx-arm64, osx64
# Conflicts: # FFMpegCore.Test/DownloaderTests.cs # FFMpegCore/Helpers/FFMpegDownloader.cs
@rosenbjerg I have made the changes that we talked about. I have tested this on macos arm/intel, ubuntu64 and window64 and everything work as intended. I don't have access to 32bit chips or armel, but because I included the ability to override os and architecture, there shouldn't be a problem. Please take a look at FFMpegCore.Downloader.csproj, I'm just copied the others. |
@rosenbjerg ffbinaries is fixed and now include the latest stable release of ffmpeg. I've updated the downloader to include 5.1 and 6.1. CI for macos is still failing for unrelated issue. If you can take a look, that would be great. |
The ability to install desired binary at runtime offers convenience and flexibility to the devs. Xabe.FFmpeg have similar features.
While this current implementation only supports windows, MacOS and Linux support can be added in the future with relative ease.
Runtime Auto Installation
You can install a version of ffmpeg suite at runtime using
FFMpegDownloader.DownloadFFMpegSuite();
Or you can download only the desired binary using
FFMpegDownloader.DownloadFFMpeg()
,FFMpegDownloader.DownloadFFProbe()
,FFMpegDownloader.DownloadFFPlay()
.