-
Notifications
You must be signed in to change notification settings - Fork 636
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
Support Windows Platform #8
Comments
+1, would be great if support for all desktop platforms existed |
+1, that will be great to using ffmpeg. |
UPDATE: I've looked into the web implementation first for CHROME extensions. The option I came across was using ffmpeg in WASM. Unfortunately, Manifest V3.0 brings a lot of issues. With Manifest V2.0 you can get it working but it will stop working in January 2023 in Chrome, so this won't be worth the effort to implement. To port it to Manifest V3, the code will need to be placed in a worker which doesn't have access to the DOM (document). Also, it can't be published on Chrome Store due to Manifest V2. I haven't found an alternative yet to create an implementation for the web, it looks like this will be a pain in the ass |
Any chance there is an update for Windows support? For a new project I'm working on the Windows support is really appreciated. Thanks! |
Hope to support Windows |
+1 for windows support |
Is there any news about this? |
Any news? It feels like it will never come... |
FWIW, you can always embed pre-compiled ffmpeg / ffprobe binaries and run them directly in a windows app. Unlike Apple's app store, Microsoft (at least now) doens't force you to statically link all app components. We have published Microsoft store apps working just fine with embedded (ffmpeg, imagemagick, cwebp...) binaries. |
@mgenware that would mean two code path, one for FFmpeg Kit and one for the embedded version right? |
@stephane-archer Right, windows has a seperate code path. No need to copy EXEs to a temp folder in our case. We are using flutter. Put all pre-built executables into a folder like ( To run a specific executable, e.g. // Do it only on windows.
assert(Platform.isWindows);
var args = ['a', 'b', 'c'];
// Get current process directory.
var processDir = p.dirname(Platform.resolvedExecutable);
// Get external executable path.
final exe = p.join(processDir, 'bin', 'ffmpeg.exe');
debugPrint('[Run process] $exe ${args.join(' ')}');
final res = await Process.run(exe, args);
if (res.exitCode != 0) {
throw Exception('Code: ${res.exitCode}\n stdout: ${res.stdout}\n stderr: ${res.stderr}}');
}
// Return process output.
return res.stdout.toString(); Lastly, if you are submitting your app to Microsoft store, do test those pre-built EXEs on new windows 10 and 11 (not a dev machine already have many runtime DLLs installed). If it runs into any missing DLLs issues (e.g. |
@mgenware I've included ffmpeg and ffprobe binaries in the assets folder of the app and I can successfully call these when running on Windows directly from Visual Studio Code. However, when running the generated .exe file directly from within the file system, it crashes when calling ffmpeg. This also happens when running the app from Microsoft Store. The only error information I get is from Windows Event Viewer:
If this is a case of missing dlls, how do I know which dlls to include in the same folder as the executable? Or maybe it can't find the binaries? I copied the binaries right alongside the app executable but it did not solve the issue. Any suggestion on how I can track down the cause of the crash and how to fix it? How can I get a proper stacktrace or error message? |
ffmpeg binaries usually run fine on windows. In my case, it's actually ImageMagick that failed on some windows 10 systems, the missing DLL info should be included in process stdout / stderr. Once I bundled the missing DLLs alongside ImageMagick exe. It should run fine. Not sure if this helps. Here's the DLLs I bundled (mostly for ImageMagick)
Any chance you got some useful process stdout / stderr output before it crashes? |
@mgenware I already have these dlls in folder with the executable. I've tried running the executable and catching stdout and stderr but I don't get anything useful. I tried different ffmpeg/ffprobe binaries and ffprobe now no longer fails. But ffmpeg still crashes the app. Can you please share the exact ffmpeg and ffprobe binaries that you have successfully used in the apps? |
No description provided.
The text was updated successfully, but these errors were encountered: