getMediaInformationAsync static method

Future<MediaInformationSession> getMediaInformationAsync(
  1. String path, [
  2. MediaInformationSessionCompleteCallback? completeCallback = null,
  3. LogCallback? logCallback = null,
  4. int? waitTimeout = null,
])

Starts an asynchronous FFprobe execution to extract the media information for the specified file.

Note that this method returns immediately and does not wait the execution to complete. You must use an MediaInformationSessionCompleteCallback if you want to be notified about the result.

Implementation

static Future<MediaInformationSession> getMediaInformationAsync(String path,
    [MediaInformationSessionCompleteCallback? completeCallback = null,
    LogCallback? logCallback = null,
    int? waitTimeout = null]) async {
  final commandArguments = [
    "-v",
    "error",
    "-hide_banner",
    "-print_format",
    "json",
    "-show_format",
    "-show_streams",
    "-show_chapters",
    "-i",
    path
  ];
  return FFprobeKit.getMediaInformationFromCommandArgumentsAsync(
      commandArguments, completeCallback, logCallback, waitTimeout);
}