| FFmpegKit iOS / macOS / tvOS API 4.5

Class Methods
FFprobeKit Class Reference

`#import <FFprobeKit.h>`

## Class Methods
(FFprobeSession *) | + executeWithArguments:
(FFprobeSession *) | + executeWithArgumentsAsync:withExecuteCallback:
(FFprobeSession *) | + executeWithArgumentsAsync:withExecuteCallback:withLogCallback:
(FFprobeSession *) | + executeWithArgumentsAsync:withExecuteCallback:onDispatchQueue:
(FFprobeSession *) | + executeWithArgumentsAsync:withExecuteCallback:withLogCallback:onDispatchQueue:
(FFprobeSession *) | + execute:
(FFprobeSession *) | + executeAsync:withExecuteCallback:
(FFprobeSession *) | + executeAsync:withExecuteCallback:withLogCallback:
(FFprobeSession *) | + executeAsync:withExecuteCallback:onDispatchQueue:
(FFprobeSession *) | + executeAsync:withExecuteCallback:withLogCallback:onDispatchQueue:
(MediaInformationSession *) | + getMediaInformation:
(MediaInformationSession *) | + getMediaInformation:withTimeout:
(MediaInformationSession *) | + getMediaInformationAsync:withExecuteCallback:
(MediaInformationSession *) | + getMediaInformationAsync:withExecuteCallback:withLogCallback:withTimeout:
(MediaInformationSession *) | + getMediaInformationAsync:withExecuteCallback:onDispatchQueue:
(MediaInformationSession *) | + getMediaInformationAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout:
(MediaInformationSession *) | + getMediaInformationFromCommand:
(MediaInformationSession *) | + getMediaInformationFromCommandAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout:
(NSArray *) | + listSessions
(void) | + initialize`[implementation]`
(MediaInformationSession *) | + getMediaInformationFromCommandAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout:`[implementation]`

## Detailed Description

Main class to run `FFprobe` commands. Supports executing commands both synchronously and asynchronously.

    FFprobeSession *session = [FFprobeKit execute:"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4"];

    FFprobeSession *asyncSession = [FFprobeKit executeAsync:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4" withExecuteCallback:executeCallback];
    </pre>
    <p>Provides overloaded <code>execute</code> methods to define session specific callbacks.
    <pre>
    FFprobeSession *session = [FFprobeKit executeAsync:@"-hide_banner -v error -show_entries format=size -of default=noprint_wrappers=1 file1.mp4" withExecuteCallback:executeCallback withLogCallback:logCallback];
    </pre>
    <p>It can extract media information for a file or a url, using getMediaInformation method.
    <pre>
         MediaInformationSession *session = [FFprobeKit getMediaInformation:@"file1.mp4"];

Definition at line 46 of file FFprobeKit.h.

## Method Documentation

## ◆ execute:

+ (FFprobeSession *) execute: |  | (NSString*) | command |

Synchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters

  command | FFprobe command

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeAsync:withExecuteCallback:

+ (FFprobeSession *) executeAsync: |  | (NSString*) | command
withExecuteCallback: |  | (ExecuteCallback) | executeCallback

Asynchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters

  command | FFprobe command
  executeCallback | callback that will be called when the execution is completed

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeAsync:withExecuteCallback:onDispatchQueue:

+ (FFprobeSession *) executeAsync: |  | (NSString*) | command
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters

  command | FFprobe command
  executeCallback | callback that will be called when the execution is completed
  queue | dispatch queue that will be used to run this asynchronous operation

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeAsync:withExecuteCallback:withLogCallback:

+ (FFprobeSession *) executeAsync: |  | (NSString*) | command
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback

Asynchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters

  command | FFprobe command
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeAsync:withExecuteCallback:withLogCallback:onDispatchQueue:

+ (FFprobeSession *) executeAsync: |  | (NSString*) | command
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes FFprobe command provided. Space character is used to split command into arguments. You can use single or double quote characters to specify arguments inside your command.

Parameters

  command | FFprobe command
  executeCallback | callback that will be called when the execution is completed
  logCallback | callback that will receive logs
  queue | dispatch queue that will be used to run this asynchronous operation

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeWithArguments:

+ (FFprobeSession *) executeWithArguments: |  | (NSArray*) | arguments |

Synchronously executes FFprobe with arguments provided.

Parameters

  arguments | FFprobe command options/arguments as string array

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeWithArgumentsAsync:withExecuteCallback:

+ (FFprobeSession *) executeWithArgumentsAsync: |  | (NSArray*) | arguments
withExecuteCallback: |  | (ExecuteCallback) | executeCallback

Asynchronously executes FFprobe with arguments provided.

Parameters

  arguments | FFprobe command options/arguments as string array
  executeCallback | callback that will be called when the execution is completed

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeWithArgumentsAsync:withExecuteCallback:onDispatchQueue:

+ (FFprobeSession *) executeWithArgumentsAsync: |  | (NSArray*) | arguments
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes FFprobe with arguments provided.

Parameters

  arguments | FFprobe command options/arguments as string array
  executeCallback | callback that will be called when the execution is completed
  queue | dispatch queue that will be used to run this asynchronous operation

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeWithArgumentsAsync:withExecuteCallback:withLogCallback:

+ (FFprobeSession *) executeWithArgumentsAsync: |  | (NSArray*) | arguments
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback

Asynchronously executes FFprobe with arguments provided.

Parameters

  arguments | FFprobe command options/arguments as string array
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ executeWithArgumentsAsync:withExecuteCallback:withLogCallback:onDispatchQueue:

+ (FFprobeSession *) executeWithArgumentsAsync: |  | (NSArray*) | arguments
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue

Asynchronously executes FFprobe with arguments provided.

Parameters

  arguments | FFprobe command options/arguments as string array
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs
  queue | dispatch queue that will be used to run this asynchronous operation

Returns
  FFprobe session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformation:

+ (MediaInformationSession *) getMediaInformation: |  | (NSString*) | path |

Extracts media information for the file specified with path.

Parameters

  path | path or uri of a media file

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformation:withTimeout:

+ (MediaInformationSession *) getMediaInformation: |  | (NSString*) | path
withTimeout: |  | (int) | waitTimeout

Extracts media information for the file specified with path.

Parameters

  path | path or uri of a media file
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationAsync:withExecuteCallback:

+ (MediaInformationSession *) getMediaInformationAsync: |  | (NSString*) | path
withExecuteCallback: |  | (ExecuteCallback) | executeCallback

Extracts media information for the file specified with path asynchronously.

Parameters

  path | path or uri of a media file
  executeCallback | callback that will be called when the execution is completed

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationAsync:withExecuteCallback:onDispatchQueue:

+ (MediaInformationSession *) getMediaInformationAsync: |  | (NSString*) | path
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue

Extracts media information for the file specified with path asynchronously.

Parameters

  path | path or uri of a media file
  executeCallback | callback that will be called when the execution is completed
  queue | dispatch queue that will be used to run this asynchronous operation

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout:

+ (MediaInformationSession *) getMediaInformationAsync: |  | (NSString*) | path
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue
withTimeout: |  | (int) | waitTimeout

Extracts media information for the file specified with path asynchronously.

Parameters

  path | path or uri of a media file
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs
  queue | dispatch queue that will be used to run this asynchronous operation
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationAsync:withExecuteCallback:withLogCallback:withTimeout:

+ (MediaInformationSession *) getMediaInformationAsync: |  | (NSString*) | path
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
withTimeout: |  | (int) | waitTimeout

Extracts media information for the file specified with path asynchronously.

Parameters

  path | path or uri of a media file
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationFromCommand:

+ (MediaInformationSession *) getMediaInformationFromCommand: |  | (NSString*) | command |

Extracts media information using the command provided asynchronously.

Parameters

  command | FFprobe command that prints media information for a file in JSON format

Returns
  media information session created for this execution

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationFromCommandAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout: [1/2]

+ (MediaInformationSession *) getMediaInformationFromCommandAsync: |  | (NSArray*) | arguments
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue
withTimeout: |  | (int) | waitTimeout
| implementation

Definition at line 1 of file FFprobeKit.m.

## ◆ getMediaInformationFromCommandAsync:withExecuteCallback:withLogCallback:onDispatchQueue:withTimeout: [2/2]

+ (MediaInformationSession *) getMediaInformationFromCommandAsync: |  | (NSString *) | command
withExecuteCallback: |  | (ExecuteCallback) | executeCallback
withLogCallback: |  | (LogCallback) | logCallback
onDispatchQueue: |  | (dispatch_queue_t) | queue
withTimeout: |  | (int) | waitTimeout

Extracts media information using the command provided asynchronously.

Parameters

  command | FFprobe command that prints media information for a file in JSON format
  executeCallback | callback that will be notified when execution is completed
  logCallback | callback that will receive logs
  queue | dispatch queue that will be used to run this asynchronous operation
  waitTimeout | max time to wait until media information is transmitted

Returns
  media information session created for this execution

## ◆ initialize

+ (void) initialize |  |  |
| implementation

Definition at line 1 of file FFprobeKit.m.

## ◆ listSessions

+ (NSArray *) listSessions |  |  |

Lists all FFprobe sessions in the session history.

Returns
  all FFprobe sessions in the session history

Definition at line 1 of file FFprobeKit.m.

The documentation for this class was generated from the following files:

- FFprobeKit.h
- FFprobeKit.m