FFmpegKit iOS / macOS / tvOS API 6.0
Loading...
Searching...
No Matches
Class Methods
FFmpegKit Class Reference

#import <FFmpegKit.h>

Class Methods

(FFmpegSession *) + executeWithArguments:
 
(FFmpegSession *) + executeWithArgumentsAsync:withCompleteCallback:
 
(FFmpegSession *) + executeWithArgumentsAsync:withCompleteCallback:withLogCallback:withStatisticsCallback:
 
(FFmpegSession *) + executeWithArgumentsAsync:withCompleteCallback:onDispatchQueue:
 
(FFmpegSession *) + executeWithArgumentsAsync:withCompleteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:
 
(FFmpegSession *) + execute:
 
(FFmpegSession *) + executeAsync:withCompleteCallback:
 
(FFmpegSession *) + executeAsync:withCompleteCallback:withLogCallback:withStatisticsCallback:
 
(FFmpegSession *) + executeAsync:withCompleteCallback:onDispatchQueue:
 
(FFmpegSession *) + executeAsync:withCompleteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:
 
(void) + cancel
 
(void) + cancel:
 
(NSArray *) + listSessions
 
(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" withCompleteCallback:completeCallback];
</pre>
<p>Provides overloaded <code>execute</code> methods to define session specific callbacks.
<pre>
FFmpegSession *asyncSession = [FFmpegKit executeAsync:@"-i file1.mp4 -c:v libxvid file1.avi" withCompleteCallback:completeCallback withLogCallback:logCallback withStatisticsCallback:statisticsCallback];

Definition at line 43 of file FFmpegKit.h.

Method Documentation

◆ cancel

+ (void) cancel

Cancels all running sessions.

This method 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 method 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:withCompleteCallback:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback 

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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

Parameters
commandFFmpeg command
completeCallbackcallback that will be called when the execution has completed
Returns
FFmpeg session created for this execution

Definition at line 1 of file FFmpegKit.m.

◆ executeAsync:withCompleteCallback:onDispatchQueue:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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

Parameters
commandFFmpeg command
completeCallbackcallback that will be called when the execution has 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:withCompleteCallback:withLogCallback:withStatisticsCallback:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback 

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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

Parameters
commandFFmpeg command
completeCallbackcallback that will be called when the execution has 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:withCompleteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:

+ (FFmpegSession *) executeAsync: (NSString*)  command
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Starts an asynchronous FFmpeg execution for the given command. Space character is used to split the command into arguments. You can use single or double quote characters to specify arguments inside your command.

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

Parameters
commandFFmpeg command
completeCallbackcallback that will be called when the execution has 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:withCompleteCallback:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback 

Starts an asynchronous FFmpeg execution with arguments provided.

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

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

Definition at line 1 of file FFmpegKit.m.

◆ executeWithArgumentsAsync:withCompleteCallback:onDispatchQueue:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Starts an asynchronous FFmpeg execution with arguments provided.

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

Parameters
argumentsFFmpeg command options/arguments as string array
completeCallbackcallback that will be called when the execution has 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:withCompleteCallback:withLogCallback:withStatisticsCallback:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback 

Starts an asynchronous FFmpeg execution with arguments provided.

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

Parameters
argumentsFFmpeg command options/arguments as string array
completeCallbackcallback that will be called when the execution has 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:withCompleteCallback:withLogCallback:withStatisticsCallback:onDispatchQueue:

+ (FFmpegSession *) executeWithArgumentsAsync: (NSArray*)  arguments
withCompleteCallback: (FFmpegSessionCompleteCallback completeCallback
withLogCallback: (LogCallback logCallback
withStatisticsCallback: (StatisticsCallback statisticsCallback
onDispatchQueue: (dispatch_queue_t)  queue 

Starts an asynchronous FFmpeg execution with arguments provided.

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

Parameters
argumentsFFmpeg command options/arguments as string array
completeCallbackcallback that will be called when the execution has 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.


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