FFmpegKit iOS / macOS / tvOS API  4.4
Class Methods
FFmpegKit Class Reference

Class Methods

(FFmpegSession *) + executeWithArguments:
 
(FFmpegSession *) + executeWithArgumentsAsync:withExecuteCallback:
 
(FFmpegSession *) + executeWithArgumentsAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:
 
(FFmpegSession *) + executeWithArgumentsAsync:withExecuteCallback:onDispatchQueue:
 
(FFmpegSession *) + executeWithArgumentsAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:
 
(FFmpegSession *) + execute:
 
(FFmpegSession *) + executeAsync:withExecuteCallback:
 
(FFmpegSession *) + executeAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:
 
(FFmpegSession *) + executeAsync:withExecuteCallback:onDispatchQueue:
 
(FFmpegSession *) + executeAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:
 
(void) + cancel
 
(void) + cancel:
 
(NSArray *) + listSessions
 
(NSArray *) + parseArguments:
 
(NSString *) + argumentsToString:
 
(void) + initialize [implementation]
 

Detailed Description

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

FFmpegSession *session = [FFmpegKit execute:"-i file1.mp4 -c:v libxvid file1.avi"];

FFmpegSession *asyncSession = [FFmpegKit executeAsync:"-i file1.mp4 -c:v libxvid file1.avi" withExecuteCallback:executeCallback];

Provides overloaded execute methods to define session specific callbacks.

FFmpegSession *asyncSession = [FFmpegKit executeAsync:"-i file1.mp4 -c:v libxvid file1.avi" withExecuteCallback:executeCallback withLogCallback:logCallback withStatisticsCallback:statisticsCallback];

Definition at line 44 of file FFmpegKit.h.

Method Documentation

◆ argumentsToString:

+ (NSString *) argumentsToString: (NSArray*)  arguments

Concatenates arguments into a string adding a space character between two arguments.

Parameters
argumentsarguments
Returns
concatenated string containing all arguments

Definition at line 1 of file FFmpegKit.m.

◆ cancel

+ (void) cancel

Cancels all running sessions.

This function does not wait for termination to complete and returns immediately.

Definition at line 1 of file FFmpegKit.m.

◆ cancel:

+ (void) cancel: (long)  sessionId

Cancels the session specified with sessionId.

This function does not wait for termination to complete and returns immediately.

Parameters
sessionIdid of the session that will be cancelled

Definition at line 1 of file FFmpegKit.m.

◆ execute:

+ (FFmpegSession *) execute: (NSString*)  command

Synchronously executes FFmpeg 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
commandFFmpeg command
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeAsync:withExecuteCallback:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withExecuteCallback: (ExecuteCallback executeCallback 

Asynchronously executes FFmpeg 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
commandFFmpeg command
executeCallbackcallback that will be called when the execution is completed
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeAsync:withExecuteCallback:onDispatchQueue:

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

Asynchronously executes FFmpeg 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
commandFFmpeg command
executeCallbackcallback that will be called when the execution is completed
queuedispatch queue that will be used to run this asynchronous operation
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withExecuteCallback: (ExecuteCallback executeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback 

Asynchronously executes FFmpeg 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
commandFFmpeg command
executeCallbackcallback that will be called when the execution is completed
logCallbackcallback that will receive logs
statisticsCallbackcallback that will receive statistics
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withExecuteCallback: (ExecuteCallback executeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Asynchronously executes FFmpeg 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
commandFFmpeg command
executeCallbackcallback that will be called when the execution is completed
logCallbackcallback that will receive logs
statisticsCallbackcallback that will receive statistics
queuedispatch queue that will be used to run this asynchronous operation
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArguments:

+ (FFmpegSession *) executeWithArguments: (NSArray*)  arguments

Synchronously executes FFmpeg with arguments provided.

Parameters
argumentsFFmpeg command options/arguments as string array
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArgumentsAsync:withExecuteCallback:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withExecuteCallback: (ExecuteCallback executeCallback 

Asynchronously executes FFmpeg with arguments provided.

Parameters
argumentsFFmpeg command options/arguments as string array
executeCallbackcallback that will be called when the execution is completed
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArgumentsAsync:withExecuteCallback:onDispatchQueue:

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

Asynchronously executes FFmpeg with arguments provided.

Parameters
argumentsFFmpeg command options/arguments as string array
executeCallbackcallback that will be called when the execution is completed
queuedispatch queue that will be used to run this asynchronous operation
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArgumentsAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withExecuteCallback: (ExecuteCallback executeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback 

Asynchronously executes FFmpeg with arguments provided.

Parameters
argumentsFFmpeg command options/arguments as string array
executeCallbackcallback that will be called when the execution is completed
logCallbackcallback that will receive logs
statisticsCallbackcallback that will receive statistics
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArgumentsAsync:withExecuteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withExecuteCallback: (ExecuteCallback executeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Asynchronously executes FFmpeg with arguments provided.

Parameters
argumentsFFmpeg command options/arguments as string array
executeCallbackcallback that will be called when the execution is completed
logCallbackcallback that will receive logs
statisticsCallbackcallback that will receive statistics
queuedispatch queue that will be used to run this asynchronous operation
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ initialize

+ (void) initialize
implementation

Definition at line 1 of file FFmpegKit.m.

◆ listSessions

+ (NSArray *) listSessions

Lists all FFmpeg sessions in the session history.

Returns
all FFmpeg sessions in the session history

Definition at line 1 of file FFmpegKit.m.

◆ parseArguments:

+ (NSArray *) parseArguments: (NSString*)  command

Parses the given command into arguments. Uses space character to split the arguments. Supports single and double quote characters.

Parameters
commandstring command
Returns
array of arguments

Definition at line 1 of file FFmpegKit.m.


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