You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code in my flutter app which works when executing the FFmpegKit with synchronous method
final command =
"'-y' '-i' '$attachmentPath' '-c:v' 'h264' '-b:v' '500k' '-c:a' 'aac' '-b:a' '128k' '$compressedAttachment'";
FFmpegKit.execute(command).then((session) async {
var logs = await session.getAllLogs();
var stack = await session.getFailStackTrace();
var statistics = await session.getAllStatistics();
var code = await session.getReturnCode();
print(code); // success
});
So the above code works, I can see the compressed file and everything is ok. Now, I would like to execute multiple compress executions in parallel by using the async method.
try {
final command =
"'-y' '-i' '$attachmentPath' '-c:v' 'h264' '-b:v' '500k' '-c:a' 'aac' '-b:a' '128k' '$compressedAttachment'";
var session = await FFmpegKit.executeAsync(command);
var logs = await session.getAllLogs();
var stack = await session.getFailStackTrace();
var statistics = await session.getAllStatistics();
var code = await session.getReturnCode();
print(code); // null
} catch (e) {
print("Error executing FFmpeg command: $e");
}
I don't know what's happening, I've tried in different ways, btw the example shown in your docs does not work in flutter with the executeAsync method. Could you please tell me if this is a bug or I'm doing something wrong.
Below is the code from your docs which doesn't work "The argument type 'void Function(Log)' can't be assigned to the parameter type 'void Function(Log)?"
FFmpegKit.executeAsync('-i file1.mp4 -c:v mpeg4 file2.mp4', (Session session) async {
// CALLED WHEN SESSION IS EXECUTED
}, (Log log) {
// CALLED WHEN SESSION PRINTS LOGS
}, (Statistics statistics) {
// CALLED WHEN SESSION GENERATES STATISTICS
});
The text was updated successfully, but these errors were encountered:
I have the following code in my flutter app which works when executing the FFmpegKit with synchronous method
So the above code works, I can see the compressed file and everything is ok. Now, I would like to execute multiple compress executions in parallel by using the async method.
I don't know what's happening, I've tried in different ways, btw the example shown in your docs does not work in flutter with the executeAsync method. Could you please tell me if this is a bug or I'm doing something wrong.
Below is the code from your docs which doesn't work "The argument type 'void Function(Log)' can't be assigned to the parameter type 'void Function(Log)?"
The text was updated successfully, but these errors were encountered: