Why is it impossible to find Dart Native packages?
I find myself more frequently than not banging my head against the wall trying to find a Dart Native package, whether it be on Google, or Pub.dev. There are hundreds of useless Flutter packages that have not been updated for the past 3 years, and never a valuable Native package.
I have been trying to find a good ffmpeg library to export a thumbnail from an mp4 file, yet the only packages I can find are all iOS & Android only, and last updated 3 years ago.
/minor rant over.
If anyone has any recommendations for a package than can make a thumbnail out of an mp4 and is available for Dart Native I'd be very appreciative. I know there are quite a few available for Flutter, I have one that I like, but I still need to have feature parity across platforms.
Posted Jan 5, 2022, 1:23 AM UTC
Dart native isn't that fast. There is a image library that can encode and save/edit file formats but it's not that fast.
A dart encoder probably wouldn't utilize any hardware accel or anything like that.
If you need to support this feature on native, maybe shelling out to ffmpeg itself is best if that is an option.
Understood. Thanks for the info!
I might be naive here, but can you explain why ffmpeg is every developers go-to for these types of things? Is it just a well written multi platform library? Is it so well written that it's more than the default, but the only valid option?
Best and only choice. Implementing yourself isn't really feasible. FFMPEG seems to get tons of contributions because it's used under the hood practically everywhere.
There hasn't been a huge demand for transcoding or encoding video on mobile since it's kind of resource intensive.
indeed, the use case of dart on server side, is the sharing code base with iOS/Mac/Windows/Android client apps. Dart serving up rest is OK, not something I would be proud of. However minor performance improvements have been done over the years. Using FFI / Rust is a common route for process intensive operations.
There is some advantage of having a 65% shared code base. For that, dart is king.