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

Web support #6

Open
polarby opened this issue Jan 26, 2023 · 6 comments · May be fixed by #15
Open

Web support #6

polarby opened this issue Jan 26, 2023 · 6 comments · May be fixed by #15
Labels
discussion enhancement New feature or request help wanted Extra attention is needed

Comments

@polarby
Copy link
Owner

polarby commented Jan 26, 2023

Currently the main problem is that ffmpeg and this plugin require to write files to a temporary path.
The problem is that web does not support file writings or path_provider does not offer a web solution.

A possible solution might be to have a look at how flutter_sound has managed to conquer web.

@polarby polarby added discussion enhancement New feature or request help wanted Extra attention is needed labels Jan 26, 2023
@jayaanandabalaji
Copy link

Currently the main problem is that ffmpeg and this plugin require to write files to a temporary path. The problem is that web does not support file writings or path_provider does not offer a web solution.

A possible solution might be to have a look at how flutter_sound has managed to conquer web.

If FFMPEG is the only problem, Is it possible to use https://pub.dev/packages/ffmpeg_wasm which wraps https://github.com/ffmpegwasm/ffmpeg.wasm JavaScript library? Or will there be any other problem when trying to implement for web? I am planning to try to implement for web.

@polarby
Copy link
Owner Author

polarby commented May 12, 2023

Great! I didn't know of this package! If you have the knowledge you are the best guy to do this! Thanks a lot!

Right now we write each captured frame to a temporary directory and then process those frames via ffmpeg.
As file writing usually is also a problem for web, we might should consider piping them directly to web (not saving, but directly feeding to ffmpeg - a way more effective method, that has not been implemented yet), as mentioned here: #3 (this guy might know more about it).
If file writing is not supported by ffmpeg_wasm, maybe another wasm package can help you out there.

I am looking forward to your contribution! I will try to be the best help to you with quickly merging pull requests :) or give you more info regarding the package.

@polarby polarby linked a pull request May 14, 2023 that will close this issue
@polarby
Copy link
Owner Author

polarby commented Jul 7, 2023

I have used ffmpeg_wasm in another project for a web application. It works great and may be implemented in this plugin.

The following things would need to be done:

  1. Write a universal_ffmpeg.dart file for this plugin, where both mobile & web can be handled. With the basic execution command run(List<String> command) and file management (write file to web ffmpeg).

  2. Reopen and Merge the Piping frames to ffmpeg #15 piping frames ffmpeg (but only exclusively for the web - and maybe even configurable as settings in RenderController)

  3. Configure web & ffmpeg_wasm instructions in index.dart

Time projection: 5-8h (2h code, 3-6 debug)

@polarby polarby linked a pull request Jul 7, 2023 that will close this issue
@abdelaziz-mahdy
Copy link
Contributor

hello @polarby i am interested in web support for this package, any updates for it?

@polarby
Copy link
Owner Author

polarby commented Dec 19, 2023

Currently not on my agenda any time soon. The documentation is however there and can be quite easily implemented. If this is an essential feature for you, you may consider adding it yourself:)

@abdelaziz-mahdy
Copy link
Contributor

Currently not on my agenda any time soon. The documentation is however there and can be quite easily implemented. If this is an essential feature for you, you may consider adding it yourself:)

i will see if i can implement it, most probably it will not be the best, but if i got it working i will open the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants