Skip to content
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

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

yuqian5
Copy link

@yuqian5 yuqian5 commented May 5, 2023

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().

OS Support
Windows YES
Mac OSX YES
Linux YES

@codecov-commenter
Copy link

codecov-commenter commented May 5, 2023

Codecov Report

Attention: Patch coverage is 54.03226% with 57 lines in your changes missing coverage. Please review.

Project coverage is 70.44%. Comparing base (4a6abef) to head (a91e309).
Report is 36 commits behind head on main.

Files with missing lines Patch % Lines
...MpegCore.Extensions.Downloader/FFMpegDownloader.cs 54.03% 47 Missing and 10 partials ⚠️
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.
📢 Have feedback on the report? Share it here.

@devedse
Copy link
Contributor

devedse commented May 5, 2023

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.

@yuqian5
Copy link
Author

yuqian5 commented May 5, 2023

@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.

@rosenbjerg
Copy link
Owner

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.
Could you move the downloader to a new project in the solution?

@rosenbjerg
Copy link
Owner

This library is aimed at being cross-platform, so I think we should support more platforms than just Windows with this feature, before publishing

@yuqian5
Copy link
Author

yuqian5 commented Aug 24, 2023

@rosenbjerg I can move it to a different package and look into supporting macOS and Linux for download.

@yuqian5
Copy link
Author

yuqian5 commented Sep 6, 2023

@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.

@yuqian5
Copy link
Author

yuqian5 commented Jan 5, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants