I am not experienced with ffmpeg. So I'm sorry if I'm asking the wrong question in the wrong place.
i am trying to make a video compressor, i add the dependency exactly like : ffmpeg_kit_flutter_full_gpl: ^4.5.1
and The code I wrote is like:
compress(path) {
FFmpegKit.executeAsync("-i $path -c:a copy -c:v libx264 -s 848x360 output.mp4", (session) async {
final returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)){
print("işlem başarılı");
// SUCCESS
} else if (ReturnCode.isCancel(returnCode)) {
print("iptal edildi");
// CANCEL
} else {
print("hata oluştu");
print(await session.getFailStackTrace());
// ERROR
}
});
}
and im calling this method like:
asset.originFile.then((fle) {
var path = fle!.path;
compress(path);
}
);
it always returns error condition for some reason. and session.getFailStackTrace()
is null.
My first question is what do you think is wrong here?
And secondly how can I detect what the error is in such cases?
thanks in advance :)