I am trying to convert a video file into a series of frame in flutter.
Currently, I have tried with 2 flutter libraries:
export_video_frame: ^0.0.6video_thumbnail: ^0.4.3
However, both libraries are taking a considerable amount of time to process the video file.
- Duration of video file: 5 seconds
- Time requires to process video file into frames: 2 - 5 minutes
Is there a way to process a video file more efficiently to limit the conversion of a 5-second video file into series of frame in less than 10s processing time on Flutter app?
Other methods I have tried include returning a list of byteArray or filepath, similar processing logic to video_thumbnail (Returning all frames instead of a single frame). But I am facing some issues while implementing it.
- For returning a list of
ByteArray, the app throwsOut of Memory Errorwhen parsingByteArrayfrom Native Android back to Flutter. (The app cannot compromise on the image quality. Hence, I cannot compress the image into a smaller size.) - As for returning a list of filepath, the app's UI freezes when it is writing frames into the phone directory. (The app cannot compromise on the UX as well.)