0

I am using flutter. I'm working on using a file-picker to select a video and then upload it. But I want to filter the video of h.265 codec, how can I do that?

It's frustrating because you can't filter codecs with just the mp4 extension.

I can't found method in VideoPlayerController. pls help. thx

1 Answers1

1

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.

Abhishek Yadav
  • 261
  • 3
  • 9