Video crop command of FFMPEG not work in flutter

488 Views Asked by At

I am trying to crop video using ffmpeg_kit_flutter package in flutter. But my crop command does not work in Samsung M30 device. This device have Android version 10.In other devices crop command works fine. No error log is display from ffmpeg.

I am using ffmpeg_kit_flutter_min_gpl: ^4.5.1 package.

This is my code:

        await FFmpegKit.executeAsync(
            "-y -i ${videoPath} -vf crop=in_w:in_h-240 -c:v libx264 -crf 17 -threads 5 -preset ultrafast -strict -2 -c:a copy ${path}",
                (session) async {
              final returnCode = await session.getReturnCode();
              final failStackTrace = await session.getFailStackTrace();
              print(returnCode);
              print(failStackTrace);
              if (ReturnCode.isSuccess(returnCode)) {
              }
              else
              {
                String? log=await session.getAllLogsAsString();
                print(log);
              }
            });

If anyone has an idea or clue about this issue please help me out.

1

There are 1 best solutions below

2
Major Akash On

video_trimmer You can try this Alternate package