You can use https://pub.dev/packages/ffmpeg_kit_flutter package.
File file = File('/storage/emulated/0/folder_name/out.mp4');
await FFprobeKit.getMediaInformation(file.path).then((info) async {
if (info== null) {
// CHECK THE FOLLOWING ATTRIBUTES ON ERROR
final state = FFmpegKitConfig.sessionStateToString(await session.getState());
final returnCode = await session.getReturnCode();
final failStackTrace = await session.getFailStackTrace();
final duration = await session.getDuration();
final output = await session.getOutput();
print(
"State: $state,ReturnCode: $returnCode,FailStackTrace: $failStackTrace,Duration: $duration, 0utPut: $output",
);
}
Map<dynamic, dynamic>? properties = info.getAllProperties();
print(properties); //this will print all data
});
You can try this one. this is the only option in flutter I think.