### Install Application Executable Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs the main application executable to the specified runtime destination. ```cmake install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT Runtime) ``` -------------------------------- ### Iterate and Print Stream Information Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md An example demonstrating how to fetch media information, retrieve all streams, and then iterate through them to print their type and resolution if they are video streams. Requires prior session setup and media loading. ```dart final info = await session.getMediaInformation(); if (info != null) { final streams = info.getStreams(); for (var stream in streams) { print('Stream type: ${stream.getType()}'); if (stream.getType() == 'video') { print('Resolution: ${stream.getWidth()}x${stream.getHeight()}'); } } } ``` -------------------------------- ### Log Callback Example Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Example of how to use the Log class within a callback to print formatted log messages. Requires FFmpegKitConfig.enableLogCallback to be set. ```dart FFmpegKitConfig.enableLogCallback((log) { print('[${Level.levelToString(log.getLevel())}] ${log.getMessage()}'); }); ``` -------------------------------- ### Complete FFmpegKit Setup and Configuration Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Provides a comprehensive setup function for FFmpegKit, including initialization, log level configuration, enabling logs and statistics, setting redirection strategies, and registering global callbacks for logs, statistics, and session completion. It also covers font directory registration and session history size. ```dart void setupFFmpegKit() async { // Initialize await FFmpegKitConfig.init(); // Configure logging await FFmpegKitConfig.setLogLevel(Level.avLogInfo); await FFmpegKitConfig.enableLogs(); await FFmpegKitConfig.enableStatistics(); // Set log redirection strategy FFmpegKitConfig.setLogRedirectionStrategy( LogRedirectionStrategy.printLogsWhenNoCallbacksDefined ); // Configure global callbacks FFmpegKitConfig.enableLogCallback((log) { debugPrint('[${Level.levelToString(log.getLevel())}] ${log.getMessage()}'); }); FFmpegKitConfig.enableStatisticsCallback((stats) { debugPrint('Frame: ${stats.getVideoFrameNumber()}, Speed: ${stats.getSpeed()}x'); }); FFmpegKitConfig.enableFFmpegSessionCompleteCallback((session) async { final state = await session.getState(); debugPrint('FFmpeg complete: ${FFmpegKitConfig.sessionStateToString(state)}'); }); // Register fonts await FFmpegKitConfig.setFontDirectoryList([ '/system/fonts', '/System/Library/Fonts', 'assets/fonts', ]); // Set history size await FFmpegKitConfig.setSessionHistorySize(10); print('FFmpegKit configured'); } ``` -------------------------------- ### Configure Installation Directory for Bundle Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Sets the installation directory for the application bundle, ensuring support files are placed next to the executable for in-place execution. ```cmake set(BUILD_BUNDLE_DIR "$") # Make the "install" step default, as it's required to run. set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) endif() set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") ``` -------------------------------- ### Get Start Time - MediaInformation Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the start time of the media file as a string. Returns null if not available. ```dart String? getStartTime() ``` -------------------------------- ### Example: Check Session State Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md An example demonstrating how to retrieve and check the state of a session. This is useful for determining if a session has completed successfully. ```dart final state = await session.getState(); if (state == SessionState.completed) { print('Session completed'); } ``` -------------------------------- ### Install Flutter Library Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs the main Flutter library file to the library directory within the application bundle. ```cmake install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Install Bundled Plugin Libraries Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs any bundled native libraries required by plugins to the library directory. ```cmake if(PLUGIN_BUNDLED_LIBRARIES) install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) endif() ``` -------------------------------- ### Install Flutter Assets Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Removes existing Flutter assets and then installs the current assets to the data directory. This ensures assets are up-to-date on each build. ```cmake # Fully re-copy the assets directory on each build to avoid having stale files # from a previous install. set(FLUTTER_ASSET_DIR_NAME "flutter_assets") install(CODE " file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") " COMPONENT Runtime) install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Statistics Callback Example Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Example of how to use the Statistics class within a callback to print real-time encoding metrics. Requires FFmpegKitConfig.enableStatisticsCallback to be set. ```dart FFmpegKitConfig.enableStatisticsCallback((stats) { print('Frame: ${stats.getVideoFrameNumber()}'); print('Speed: ${stats.getSpeed()}x'); print('Bitrate: ${stats.getBitrate()} kbps'); print('Size: ${stats.getSize()} bytes'); }); ``` -------------------------------- ### Install AOT Library Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs the Ahead-Of-Time (AOT) compiled library on Profile and Release builds only. ```cmake install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" CONFIGURATIONS Profile;Release COMPONENT Runtime) ``` -------------------------------- ### Initialize FFmpegKit Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/README.md Initialize FFmpegKit before running any commands. This should be called once at the start of your application. ```dart import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart'; void main() async { await FFmpegKitConfig.init(); runApp(MyApp()); } ``` -------------------------------- ### Get Media Information Asynchronously Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution for a media file, returning immediately. Use this when you don't want to block the UI thread and prefer to handle results via a callback. ```dart static Future getMediaInformationAsync( String path, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null,] ) ``` ```dart FFprobeKit.getMediaInformationAsync( 'video.mp4', (session) async { final info = await session.getMediaInformation(); print('Got media info'); } ); ``` -------------------------------- ### Get Media Information from Command Asynchronously Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution using a custom command. This method is suitable for non-blocking operations where a specific FFprobe command is required. ```dart static Future getMediaInformationFromCommandAsync( String command, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null,] ) ``` -------------------------------- ### Get Media Information from Command Arguments Asynchronously Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution using a list of command arguments. This is ideal for non-blocking operations when FFprobe commands are provided as a list. ```dart static Future getMediaInformationFromCommandArgumentsAsync( List commandArguments, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null,] ) ``` -------------------------------- ### Get Start Time Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the timestamp when the session began execution. ```dart DateTime? getStartTime() ``` -------------------------------- ### Install Native Assets Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs native assets provided by build.dart from all packages into the application bundle's library directory. ```cmake set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/windows/") install(DIRECTORY "${NATIVE_ASSETS_DIR}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" COMPONENT Runtime) ``` -------------------------------- ### Example Usage of selectDocumentForRead Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Demonstrates how to use `selectDocumentForRead` to pick a video file and then use its SAF Uri with FFmpegKit for processing. ```dart final uri = await FFmpegKitConfig.selectDocumentForRead('video/*'); if (uri != null) { final safUrl = await FFmpegKitConfig.getSafParameterForRead(uri); FFmpegKit.execute('-i $safUrl output.mp4'); } ``` -------------------------------- ### Example Usage of getDuration Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Demonstrates how to get and print the duration of a media file using the getDuration() method. ```dart final info = await session.getMediaInformation(); if (info != null) { print('Duration: ${info.getDuration()} seconds'); } ``` -------------------------------- ### Get Platform Name Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Returns the name of the platform on which the FFmpegKit library is currently running. Examples: "Android", "iOS", "macOS", "Windows". ```dart final platform = await FFmpegKitConfig.getPlatform(); ``` -------------------------------- ### asyncGetMediaInformationExecute Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Starts an asynchronous media information execution. This method returns immediately without waiting for the process to complete. ```APIDOC ## asyncGetMediaInformationExecute ### Description Starts an asynchronous FFprobe execution for the given media information session. This method returns immediately and does not wait for completion. ### Method Signature ```dart static Future asyncGetMediaInformationExecute(MediaInformationSession mediaInformationSession, [int? waitTimeout = null]) ``` ### Parameters #### Path Parameters - **mediaInformationSession** (MediaInformationSession) - Required - The media information session object to execute asynchronously. - **waitTimeout** (int) - Optional - Timeout in milliseconds. If not provided, it defaults to null (no specific timeout). ### Returns `Future` - Completes when the media information execution is successfully started. ### Throws PlatformException - If the media information execution fails to start. ``` -------------------------------- ### Install ICU Data File Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Installs the ICU data file to the data directory within the application bundle. ```cmake install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) ``` -------------------------------- ### FFprobeKit.executeAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution for the given command string. This method returns immediately. Callbacks can be provided for completion and logging. ```APIDOC ## FFprobeKit.executeAsync ### Description Starts an asynchronous FFprobe execution for the given command. This method returns immediately and does not wait for execution to complete. You must use an FFprobeSessionCompleteCallback if you want to be notified about the result. ### Method Signature ```dart static Future executeAsync(String command, [FFprobeSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null]) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Parameters - **command** (String) - Required - FFprobe command string - **completeCallback** (FFprobeSessionCompleteCallback) - Optional - Callback invoked when execution completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated ### Request Example ```dart FFprobeKit.executeAsync( '-v error -show_entries format=duration input.mp4', (session) async { print('Probe complete'); } ); ``` ### Response #### Success Response - **FFprobeSession** - An FFprobe session that will be updated as execution progresses #### Response Example (See Request Example for usage, response is within the session object) ### Error Handling - **PlatformException** - if execution fails to start ``` -------------------------------- ### FFprobeKit.executeWithArgumentsAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution with arguments provided as a list of strings. Callbacks can be provided for completion and logging. ```APIDOC ## FFprobeKit.executeWithArgumentsAsync ### Description Starts an asynchronous FFprobe execution with arguments provided as a list. Callbacks can be provided for completion and logging. ### Method Signature ```dart static Future executeWithArgumentsAsync(List commandArguments, [FFprobeSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null]) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Parameters - **commandArguments** (List) - Required - FFprobe command arguments as a list of strings - **completeCallback** (FFprobeSessionCompleteCallback) - Optional - Callback invoked when execution completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated ### Request Example ```dart FFprobeKit.executeWithArgumentsAsync( ['-v', 'error', '-show_entries', 'format=duration', 'input.mp4'], (session) async { print('Probe complete'); } ); ``` ### Response #### Success Response - **FFprobeSession** - An FFprobe session #### Response Example (See Request Example for usage, response is within the session object) ### Error Handling None explicitly mentioned, likely similar to executeAsync. ``` -------------------------------- ### asyncFFmpegExecute Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Starts an asynchronous FFmpeg execution. This method returns immediately without waiting for the FFmpeg process to complete. ```APIDOC ## asyncFFmpegExecute ### Description Starts an asynchronous FFmpeg execution for the given session. This method returns immediately and does not wait for completion. ### Method Signature ```dart static Future asyncFFmpegExecute(FFmpegSession ffmpegSession) ``` ### Parameters #### Path Parameters - **ffmpegSession** (FFmpegSession) - Required - The FFmpeg session object to execute asynchronously. ### Returns `Future` - Completes when the FFmpeg execution is successfully started. ### Throws PlatformException - If the FFmpeg execution fails to start. ``` -------------------------------- ### asyncFFprobeExecute Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Starts an asynchronous FFprobe execution. This method returns immediately without waiting for the FFprobe process to complete. ```APIDOC ## asyncFFprobeExecute ### Description Starts an asynchronous FFprobe execution for the given session. This method returns immediately and does not wait for completion. ### Method Signature ```dart static Future asyncFFprobeExecute(FFprobeSession ffprobeSession) ``` ### Parameters #### Path Parameters - **ffprobeSession** (FFprobeSession) - Required - The FFprobe session object to execute asynchronously. ### Returns `Future` - Completes when the FFprobe execution is successfully started. ### Throws PlatformException - If the FFprobe execution fails to start. ``` -------------------------------- ### Get FFmpeg Information Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Retrieve version, build date, and LTS status of the FFmpeg build. ```dart FFmpegKitConfig.getFFmpegVersion() ``` ```dart FFmpegKitConfig.getVersion() ``` ```dart FFmpegKitConfig.isLTSBuild() ``` ```dart FFmpegKitConfig.getBuildDate() ``` -------------------------------- ### getMediaInformationFromCommandArgumentsAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution to extract media information using command arguments. ```APIDOC ## getMediaInformationFromCommandArgumentsAsync ### Description Starts an asynchronous FFprobe execution to extract media information using command arguments. ### Method `static Future getMediaInformationFromCommandArgumentsAsync(List commandArguments, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null])` ### Parameters #### Path Parameters - **commandArguments** (List) - Required - FFprobe command arguments as a list - **completeCallback** (MediaInformationSessionCompleteCallback) - Optional - Callback invoked when extraction completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated - **waitTimeout** (int) - Optional - Timeout in milliseconds ### Returns `Future` - An asynchronous media information session. ``` -------------------------------- ### Get Arguments Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the command arguments as a list of strings. ```dart List? getArguments() ``` -------------------------------- ### Print Video Resolution Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md An example showing how to iterate through streams, identify video streams, and print their resolution using the retrieved width and height. ```dart final streams = info.getStreams(); for (var stream in streams) { if (stream.getType() == 'video') { print('${stream.getWidth()}x${stream.getHeight()}'); } } ``` -------------------------------- ### Get Platform Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Identifies the platform on which the FFmpegKit library is currently running. ```APIDOC ## getPlatform ### Description Returns the platform name the library is running on. ### Returns `String?` — Platform name (e.g., "Android", "iOS", "macOS", "Windows") ### Endpoint `FFmpegKitConfig.getPlatform()` ``` -------------------------------- ### executeWithArgumentsAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit.md Starts an asynchronous FFmpeg execution using a list of command arguments. Returns immediately, providing callbacks for completion, logs, and statistics. ```APIDOC ## executeWithArgumentsAsync ### Description Starts an asynchronous FFmpeg execution with arguments provided as a list. This method returns immediately and does not wait for execution to complete. ### Method Signature ```dart static Future executeWithArgumentsAsync( List commandArguments, [FFmpegSessionCompleteCallback? completeCallback = null,] [LogCallback? logCallback = null,] [StatisticsCallback? statisticsCallback = null,] ) ``` ### Parameters #### Path Parameters - **commandArguments** (List) - Required - FFmpeg command arguments as a list of strings - **completeCallback** (FFmpegSessionCompleteCallback) - Optional - Callback invoked when execution completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated - **statisticsCallback** (StatisticsCallback) - Optional - Callback invoked when statistics are generated ### Returns - `Future` - An FFmpeg session that will be updated as execution progresses ### Throws - `PlatformException` - if execution fails to start ### Example ```dart final args = ['-i', 'input.mp4', '-c:v', 'mpeg4', 'output.mp4']; FFmpegKit.executeWithArgumentsAsync( args, (session) { print('Complete'); } ); ``` ``` -------------------------------- ### getMediaInformationFromCommandAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution to extract media information using a custom command. ```APIDOC ## getMediaInformationFromCommandAsync ### Description Starts an asynchronous FFprobe execution to extract media information using a command. ### Method `static Future getMediaInformationFromCommandAsync(String command, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null])` ### Parameters #### Path Parameters - **command** (String) - Required - Custom FFprobe command that outputs JSON - **completeCallback** (MediaInformationSessionCompleteCallback) - Optional - Callback invoked when extraction completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated - **waitTimeout** (int) - Optional - Timeout in milliseconds ### Returns `Future` - An asynchronous media information session. ``` -------------------------------- ### getMediaInformationAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Starts an asynchronous FFprobe execution to extract media information for a specified file. Returns immediately. ```APIDOC ## getMediaInformationAsync ### Description Starts an asynchronous FFprobe execution to extract media information for the specified file. This method returns immediately. ### Method `static Future getMediaInformationAsync(String path, [MediaInformationSessionCompleteCallback? completeCallback = null, LogCallback? logCallback = null, int? waitTimeout = null])` ### Parameters #### Path Parameters - **path** (String) - Required - Path to media file - **completeCallback** (MediaInformationSessionCompleteCallback) - Optional - Callback invoked when extraction completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated - **waitTimeout** (int) - Optional - Timeout in milliseconds ### Returns `Future` - An asynchronous media information session. ### Example ```dart FFprobeKit.getMediaInformationAsync( 'video.mp4', (session) async { final info = await session.getMediaInformation(); print('Got media info'); } ); ``` ``` -------------------------------- ### executeAsync Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit.md Starts an asynchronous FFmpeg execution for a given command string. Returns immediately, notifying via callbacks for completion, logs, and statistics. ```APIDOC ## executeAsync ### Description Starts an asynchronous FFmpeg execution for the given command. This method returns immediately and does not wait for execution to complete. You must use an FFmpegSessionCompleteCallback if you want to be notified about the result. ### Method Signature ```dart static Future executeAsync( String command, [FFmpegSessionCompleteCallback? completeCallback = null,] [LogCallback? logCallback = null,] [StatisticsCallback? statisticsCallback = null,] ) ``` ### Parameters #### Path Parameters - **command** (String) - Required - FFmpeg command string with arguments separated by spaces - **completeCallback** (FFmpegSessionCompleteCallback) - Optional - Callback invoked when execution completes - **logCallback** (LogCallback) - Optional - Callback invoked when logs are generated - **statisticsCallback** (StatisticsCallback) - Optional - Callback invoked when statistics are generated ### Returns - `Future` - An FFmpeg session that will be updated as execution progresses ### Throws - `PlatformException` - if execution fails to start ### Example ```dart FFmpegKit.executeAsync( '-i input.mp4 -c:v mpeg4 output.mp4', (session) { print('Execution complete'); }, (log) { print('Log: ${log.getMessage()}'); }, (stats) { print('Frame: ${stats.getVideoFrameNumber()}'); } ); ``` ``` -------------------------------- ### Get Chapter Start Timestamp Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the start timestamp of the chapter in time base units. Returns null if the start timestamp is not available. ```dart int? getStart() ``` -------------------------------- ### Get Build Date Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Retrieves the build date of the native FFmpegKit library. ```APIDOC ## getBuildDate ### Description Returns the native library build date. ### Returns `String?` — Build date or null ### Endpoint `FFmpegKitConfig.getBuildDate()` ``` -------------------------------- ### Log Callback Example Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/types.md Demonstrates how to set up a log callback to receive and process log messages from FFmpegKit. It uses the `levelToString` method to format the log level. ```dart FFmpegKitConfig.enableLogCallback((log) { final levelStr = Level.levelToString(log.getLevel()); print('[$levelStr] ${log.getMessage()}'); }); ``` -------------------------------- ### Get FFmpegKit Flutter Library Version Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Returns the version of the FFmpegKit Flutter library itself. Example: "4.4.0". ```dart final version = await FFmpegKitConfig.getVersion(); ``` -------------------------------- ### Get FFmpeg Version Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Retrieves the version string of the FFmpeg library bundled within FFmpegKit Flutter. Example: "8.1.1". ```dart final version = await FFmpegKitConfig.getFFmpegVersion(); print('FFmpeg version: $version'); ``` -------------------------------- ### Configure FFmpegKit Windows Build Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/windows/CMakeLists.txt Sets up variables for FFmpegKit version, package, download URL, and local paths. It also manages the installation marker to ensure correct variants are used. ```cmake set(FFMPEGKIT_RELEASE_TAG "${FFMPEGKIT_VERSION}-${FFMPEGKIT_PACKAGE}") set(FFMPEGKIT_ZIP_NAME "ffmpeg-kit-windows-${FFMPEGKIT_ARCH}-${FFMPEGKIT_PACKAGE}-${FFMPEGKIT_VERSION}.zip") set(FFMPEGKIT_DOWNLOAD_URL "https://github.com/sk3llo/ffmpeg_kit_flutter/releases/download/${FFMPEGKIT_RELEASE_TAG}/${FFMPEGKIT_ZIP_NAME}") set(FFMPEGKIT_ZIP_PATH "${FFMPEGKIT_PREBUILT_DIR}/${FFMPEGKIT_ZIP_NAME}") # Marker recording which variant is currently installed, so changing # FFMPEGKIT_PACKAGE / FFMPEGKIT_LOCAL_DIR triggers a clean re-fetch. set(FFMPEGKIT_MARKER "${FFMPEGKIT_PREBUILT_DIR}/bin/.ffmpegkit_variant") if(FFMPEGKIT_LOCAL_DIR) set(FFMPEGKIT_WANT "local:${FFMPEGKIT_LOCAL_DIR}") else() set(FFMPEGKIT_WANT "${FFMPEGKIT_RELEASE_TAG}") endif() set(FFMPEGKIT_HAVE "") if(EXISTS "${FFMPEGKIT_MARKER}") file(READ "${FFMPEGKIT_MARKER}" FFMPEGKIT_HAVE) string(STRIP "${FFMPEGKIT_HAVE}" FFMPEGKIT_HAVE) endif() if(NOT "${FFMPEGKIT_HAVE}" STREQUAL "${FFMPEGKIT_WANT}") file(REMOVE_RECURSE "${FFMPEGKIT_PREBUILT_DIR}/bin") file(MAKE_DIRECTORY "${FFMPEGKIT_PREBUILT_DIR}") if(FFMPEGKIT_LOCAL_DIR) if(NOT EXISTS "${FFMPEGKIT_LOCAL_DIR}/bin/libffmpegkit.dll") message(FATAL_ERROR "FFMPEGKIT_LOCAL_DIR=${FFMPEGKIT_LOCAL_DIR} has no bin/libffmpegkit.dll") endif() message(STATUS "FFmpegKit: installing local bundle from ${FFMPEGKIT_LOCAL_DIR}") file(COPY "${FFMPEGKIT_LOCAL_DIR}/bin" DESTINATION "${FFMPEGKIT_PREBUILT_DIR}") if(EXISTS "${FFMPEGKIT_LOCAL_DIR}/include") file(REMOVE_RECURSE "${FFMPEGKIT_PREBUILT_DIR}/include") file(COPY "${FFMPEGKIT_LOCAL_DIR}/include" DESTINATION "${FFMPEGKIT_PREBUILT_DIR}") endif() else() message(STATUS "FFmpegKit: downloading ${FFMPEGKIT_PACKAGE} from ${FFMPEGKIT_DOWNLOAD_URL}") file(DOWNLOAD "${FFMPEGKIT_DOWNLOAD_URL}" "${FFMPEGKIT_ZIP_PATH}" SHOW_PROGRESS STATUS FFMPEGKIT_DOWNLOAD_STATUS ) list(GET FFMPEGKIT_DOWNLOAD_STATUS 0 FFMPEGKIT_DOWNLOAD_CODE) list(GET FFMPEGKIT_DOWNLOAD_STATUS 1 FFMPEGKIT_DOWNLOAD_MSG) if(NOT FFMPEGKIT_DOWNLOAD_CODE EQUAL 0) file(REMOVE "${FFMPEGKIT_ZIP_PATH}") message(FATAL_ERROR "Failed to download FFmpegKit (${FFMPEGKIT_PACKAGE}): ${FFMPEGKIT_DOWNLOAD_MSG}") endif() execute_process( COMMAND ${CMAKE_COMMAND} -E tar xf "${FFMPEGKIT_ZIP_PATH}" WORKING_DIRECTORY "${FFMPEGKIT_PREBUILT_DIR}" RESULT_VARIABLE FFMPEGKIT_UNZIP_RESULT ) file(REMOVE "${FFMPEGKIT_ZIP_PATH}") if(NOT FFMPEGKIT_UNZIP_RESULT EQUAL 0) message(FATAL_ERROR "Failed to extract FFmpegKit archive") endif() endif() file(WRITE "${FFMPEGKIT_MARKER}" "${FFMPEGKIT_WANT}\n") message(STATUS "FFmpegKit ${FFMPEGKIT_WANT} ready") endif() ``` -------------------------------- ### Configure Include Directories and Link Libraries Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/windows/CMakeLists.txt Sets up include directories for the plugin and links against necessary Flutter libraries. 'PRIVATE' includes are for the plugin's implementation, while 'INTERFACE' includes are for consumers. ```cmake target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}") target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_BINARY_DIR}/include") target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin) ``` -------------------------------- ### Asynchronously Execute FFmpeg Session Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Start an asynchronous FFmpeg execution. This method returns immediately without waiting for the FFmpeg process to finish. ```dart static Future asyncFFmpegExecute(FFmpegSession ffmpegSession) ``` -------------------------------- ### FFprobeKit - Media Information API Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/MANIFEST.txt Offers methods for executing FFprobe commands to retrieve media information, supporting both synchronous and asynchronous operations. ```APIDOC ## FFprobeKit ### Description The `FFprobeKit` class provides an interface for running FFprobe commands to extract detailed media information from files. It supports synchronous execution, asynchronous execution, and specific methods for directly retrieving media metadata. ### Methods - **execute(String command)**: Executes an FFprobe command synchronously. - **executeWithArguments(List arguments)**: Executes an FFprobe command with a list of arguments synchronously. - **executeAsync(String command)**: Executes an FFprobe command asynchronously and returns a `Future`. - **executeWithArgumentsAsync(List arguments)**: Executes an FFprobe command with a list of arguments asynchronously and returns a `Future`. - **getMediaInformation(String mediaPath)**: Retrieves media information synchronously for a given file path. - **getMediaInformationAsync(String mediaPath)**: Retrieves media information asynchronously for a given file path and returns a `Future`. - **listFFprobeSessions()**: Returns a list of active and completed FFprobe sessions. - **listMediaInformationSessions()**: Returns a list of active and completed media information sessions. ``` -------------------------------- ### Get Return Code Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Asynchronously retrieves the return code for the session. This is only set for sessions that end with the COMPLETED state. Returns null if the session is not started, still running, or failed. Throws a PlatformException if the query fails. ```dart Future getReturnCode() ``` -------------------------------- ### Asynchronously Execute FFprobe Session Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Start an asynchronous FFprobe execution. This method returns immediately without waiting for the FFprobe process to finish. ```dart static Future asyncFFprobeExecute(FFprobeSession ffprobeSession) ``` -------------------------------- ### FFprobeKit Class Methods Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Methods for executing FFprobe commands and managing FFprobe sessions, including retrieving media information. ```APIDOC ## FFprobeKit ### Description Provides methods to execute FFprobe commands, retrieve media information, and manage FFprobe sessions. ### Methods - `execute(String command)`: Executes a single FFprobe command. - `executeWithArguments(List args)`: Executes an FFprobe command with a list of arguments. - `executeAsync(String command, [callbacks])`: Executes an FFprobe command asynchronously, with optional callbacks. - `executeWithArgumentsAsync(List args, [callbacks])`: Executes an FFprobe command with arguments asynchronously, with optional callbacks. - `getMediaInformation(String path, [timeout])`: Retrieves media information for a given file path. - `getMediaInformationFromCommand(String command, [timeout])`: Retrieves media information using an FFprobe command. - `getMediaInformationFromCommandArguments(List args, [timeout])`: Retrieves media information using FFprobe command arguments. - `getMediaInformationAsync(String path, [callbacks, timeout])`: Retrieves media information asynchronously for a given file path. - `getMediaInformationFromCommandAsync(String command, [callbacks, timeout])`: Retrieves media information asynchronously using an FFprobe command. - `getMediaInformationFromCommandArgumentsAsync(List args, [callbacks, timeout])`: Retrieves media information asynchronously using FFprobe command arguments. - `listFFprobeSessions()`: Retrieves a list of all active and completed FFprobe sessions. - `listMediaInformationSessions()`: Retrieves a list of all active and completed media information sessions. ``` -------------------------------- ### Configuring FFmpegKit Callbacks Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Set up global callbacks for logs, statistics, and completion events. These notifications are essential for monitoring FFmpeg processes. ```dart FFmpegKitConfig.enableLogCallback((log) { ... }); FFmpegConfig.enableStatisticsCallback((stats) { ... }); FFmpegConfig.enableFFmpegSessionCompleteCallback((session) { ... }); ``` -------------------------------- ### Get Create Time Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the timestamp when the session was created. ```dart DateTime? getCreateTime() ``` -------------------------------- ### FFprobeSession.create Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Creates a new FFprobe session with the specified arguments and optional callbacks. This session is designed for executing FFprobe commands. ```APIDOC ## FFprobeSession.create ### Description Creates a new FFprobe session with the specified arguments and optional callbacks. ### Method `static Future create` ### Parameters #### Arguments Array - **argumentsArray** (List) - Required - FFprobe command arguments #### Optional Parameters - **completeCallback** (FFprobeSessionCompleteCallback) - Optional - Invoked when execution completes - **logCallback** (LogCallback) - Optional - Invoked when logs are generated - **logRedirectionStrategy** (LogRedirectionStrategy) - Optional - Log output strategy ### Returns `Future` - New FFprobe session ``` -------------------------------- ### Get Session ID Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the unique identifier for the session. ```dart int? getSessionId() ``` -------------------------------- ### MediaInformation Constructor Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Initializes a MediaInformation object by parsing FFprobe JSON output. ```APIDOC ## MediaInformation Constructor ### Description Parses raw properties map from FFprobe JSON output. ### Signature ```dart MediaInformation(Map allProperties) ``` ``` -------------------------------- ### Get FFmpegKit Version Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Retrieves the version of the FFmpegKit Flutter library itself. ```APIDOC ## getVersion ### Description Returns FFmpegKit Flutter library version. ### Returns `String` — Library version (e.g., "4.4.0") ### Endpoint `FFmpegKitConfig.getVersion()` ``` -------------------------------- ### MediaInformationSession.create Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Creates a new MediaInformation session with the specified arguments. This session is specialized for producing a MediaInformation object from FFprobe output. ```APIDOC ## MediaInformationSession.create ### Description Creates a new MediaInformation session with the specified arguments. ### Method `static Future create` ### Parameters #### Arguments Array - **argumentsArray** (List) - Required - FFprobe command arguments that output JSON #### Optional Parameters - **completeCallback** (MediaInformationSessionCompleteCallback) - Optional - Invoked when extraction completes - **logCallback** (LogCallback) - Optional - Invoked when logs are generated ### Returns `Future` - New media information session ``` -------------------------------- ### List FFprobe Sessions Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Get a list of all active FFprobe sessions. ```dart FFprobeKit.listFFprobeSessions() ``` -------------------------------- ### Add Dependency Libraries and Include Directories Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/runner/CMakeLists.txt Links necessary libraries (`flutter`, `flutter_wrapper_app`, `dwmapi.lib`) and adds include directories for the application target. Application-specific dependencies should also be added here. ```cmake target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) ``` ```cmake target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") ``` ```cmake target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") ``` -------------------------------- ### Get Command Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the command arguments as a single concatenated string. ```dart String? getCommand() ``` -------------------------------- ### executeWithArguments Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit.md Synchronously executes FFmpeg with command arguments provided as a list of strings. ```APIDOC ## executeWithArguments ### Description Synchronously executes FFmpeg with arguments provided as a list. ### Method Signature ```dart static Future executeWithArguments(List commandArguments) ``` ### Parameters #### Path Parameters - **commandArguments** (List) - Required - FFmpeg command arguments as a list of strings ### Returns - `Future` - A completed FFmpeg session with execution results ### Throws - `PlatformException` - if execution fails ### Example ```dart final args = ['-i', 'input.mp4', '-c:v', 'mpeg4', 'output.mp4']; FFmpegKit.executeWithArguments(args).then((session) async { final returnCode = await session.getReturnCode(); if (ReturnCode.isSuccess(returnCode)) { print('Success'); } }); ``` ``` -------------------------------- ### Get Stream Index Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the 0-based index of a specific media stream. ```dart int? getIndex() ``` -------------------------------- ### FFprobeKit - Query Media Files Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/README.md Enables querying media files using FFprobe to extract detailed information and metadata. ```APIDOC ## FFprobeKit ### Description Query media files with FFprobe to extract metadata and information. ### Methods - `execute(String command)`: Execute an FFprobe command. - `getMediaInformation(String mediaFile)`: Extract media metadata from a given file. - `getMediaInformationAsync(String mediaFile, [Function callback])`: Asynchronously extract media metadata with an optional callback. - `listFFprobeSessions()`: Retrieve a list of all FFprobe sessions. ``` -------------------------------- ### Get Filename - MediaInformation Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the filename from the media information. Returns null if not available. ```dart String? getFilename() ``` -------------------------------- ### Get FFmpeg Version Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md Retrieves the version of the FFmpeg library bundled within FFmpegKit. ```APIDOC ## getFFmpegVersion ### Description Returns the FFmpeg version bundled in this library. ### Returns `String?` — Version string (e.g., "8.1.1") ### Example ```dart final version = await FFmpegKitConfig.getFFmpegVersion(); print('FFmpeg version: $version'); ``` ``` -------------------------------- ### Initialize FFmpegKit Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Initializes the FFmpegKit library asynchronously. This method must be called before any other FFmpegKit operations. ```APIDOC ## init ### Description Initializes the library asynchronously. Must be called before any other FFmpegKit operations. ### Method `static Future init()` ### Returns `Future` — Completes when initialization is done ### Example ```dart await FFmpegKitConfig.init(); ``` ``` -------------------------------- ### MediaInformation Constructor Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Initializes MediaInformation by parsing a map of FFprobe properties. ```dart MediaInformation(Map allProperties) ``` -------------------------------- ### Get Platform Information Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Retrieve the current platform identifier (e.g., 'android', 'ios'). ```dart FFmpegKitConfig.getPlatform() ``` -------------------------------- ### Get FFmpegSession Complete Callback Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Retrieves the completion callback function for this FFmpeg session. ```dart FFmpegSessionCompleteCallback? getCompleteCallback() ``` -------------------------------- ### Get Media Information from Command Arguments (Sync) Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Extracts media information using a list of FFprobe command arguments. This is an alternative to providing a single command string, useful when arguments are already parsed. ```dart static Future getMediaInformationFromCommandArguments( List commandArguments, [int? waitTimeout = null,] ) ``` -------------------------------- ### Get Output Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/sessions.md Asynchronously retrieves the console output generated during the session's execution. ```dart Future getOutput() ``` -------------------------------- ### FFmpegKitConfig Class Methods Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Configuration methods for FFmpegKit, including initialization, logging, redirection, statistics, and environment settings. ```APIDOC ## FFmpegKitConfig ### Description Provides static methods for configuring FFmpegKit, including initialization, logging, redirection, statistics, font handling, environment variables, and session management. ### Methods - `init()`: Initializes the FFmpegKit library. - `enableRedirection() / disableRedirection()`: Enables or disables log redirection. - `setFontDirectory(String path)`: Sets the directory for custom fonts. - `setFontDirectoryList(List paths)`: Sets a list of directories for custom fonts. - `registerNewFFmpegPipe(String name)`: Registers a new named pipe for FFmpeg communication. - `closeFFmpegPipe(String name)`: Closes a previously registered named pipe. - `getFFmpegVersion()`: Gets the FFmpeg version. - `getVersion()`: Gets the FFmpegKit version. - `isLTSBuild()`: Checks if the build is an LTS (Long-Term Support) build. - `getBuildDate()`: Gets the build date of FFmpegKit. - `setEnvironmentVariable(String key, String value)`: Sets an environment variable for FFmpeg. - `ignoreSignal()`: Ignores signals for FFmpeg processes. - `getLogLevel()`: Gets the current log level. - `setLogLevel(int level)`: Sets the log level. - `enableLogs()`: Enables logging. - `disableLogs()`: Disables logging. - `enableStatistics()`: Enables statistics collection. - `disableStatistics()`: Disables statistics collection. - `getSafParameterForRead(String uri)`: Gets the SAF parameter for reading a URI. - `getSafParameterForWrite(String uri)`: Gets the SAF parameter for writing a URI. - `getSafParameter(String uri)`: Gets the SAF parameter for a URI. - `selectDocumentForRead()`: Opens a document picker for reading. - `selectDocumentForWrite()`: Opens a document picker for writing. - `getSessionHistorySize()`: Gets the maximum number of sessions to keep in history. - `setSessionHistorySize(int size)`: Sets the maximum number of sessions to keep in history. - `getSession(int sessionId)`: Retrieves a session by its ID. - `getLastSession()`: Retrieves the last executed session. - `getLastCompletedSession()`: Retrieves the last completed session. - `getSessions()`: Retrieves all stored sessions. - `getFFmpegSessions()`: Retrieves all stored FFmpeg sessions. - `getFFprobeSessions()`: Retrieves all stored FFprobe sessions. - `getMediaInformationSessions()`: Retrieves all stored media information sessions. - `getSessionsByState(int state)`: Retrieves sessions by their state. - `clearSessions()`: Clears all stored sessions. - `getLogRedirectionStrategy()`: Gets the current log redirection strategy. - `setLogRedirectionStrategy(int strategy)`: Sets the log redirection strategy. - `messagesInTransmit()`: Checks if there are messages in transmit. - `sessionStateToString(int state)`: Converts a session state to a string. - `parseArguments(String command)`: Parses FFmpeg command arguments. - `argumentsToString(List args)`: Converts a list of arguments to a command string. - `writeToPipe(String name, String data)`: Writes data to a named pipe. - `getPlatform()`: Gets the current platform. - `setFontconfigConfigurationPath(String path)`: Sets the fontconfig configuration path. ``` -------------------------------- ### Initialization Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/configuration.md All FFmpegKit operations require initialization. The `init()` method is automatically called by most FFmpegKit functions, but it's recommended to call it explicitly in your app's initialization phase. ```APIDOC ## Initialization ### Basic Setup ```dart import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart'; void main() async { await FFmpegKitConfig.init(); runApp(MyApp()); } ``` All FFmpegKit operations require initialization. The `init()` method is automatically called by most FFmpegKit functions, but it's recommended to call it explicitly in your app's initialization phase. ``` -------------------------------- ### Add FFmpegKit Dependency Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/README.md Add the ffmpeg_kit_flutter_new package as a dependency in your pubspec.yaml file to install the library. ```yaml dependencies: ffmpeg_kit_flutter_new: ^4.4.0 ``` -------------------------------- ### Enable Unicode Support Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/example/windows/CMakeLists.txt Adds preprocessor definitions to enable Unicode support for all projects. ```cmake add_definitions(-DUNICODE -D_UNICODE) ``` -------------------------------- ### Get All MediaInformation Sessions Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Retrieves a list of all sessions specifically related to MediaInformation operations from the history. ```dart static Future> getMediaInformationSessions() ``` -------------------------------- ### Get All FFprobe Sessions Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Retrieves a list of all sessions specifically related to FFprobe operations from the history. ```dart static Future> getFFprobeSessions() ``` -------------------------------- ### FFprobeKit.executeWithArguments Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffprobe_kit.md Synchronously executes FFprobe with arguments provided as a list of strings. ```APIDOC ## FFprobeKit.executeWithArguments ### Description Synchronously executes FFprobe with arguments provided as a list. ### Method Signature ```dart static Future executeWithArguments(List commandArguments) ``` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None #### Parameters - **commandArguments** (List) - Required - FFprobe command arguments as a list of strings ### Request Example ```dart FFprobeKit.executeWithArguments(['-v', 'error', '-show_entries', 'format=duration', 'input.mp4']).then((session) async { final output = await session.getOutput(); print('Output: $output'); }); ``` ### Response #### Success Response - **FFprobeSession** - A completed FFprobe session #### Response Example (See Request Example for usage, response is within the session object) ### Error Handling - **PlatformException** - if execution fails ``` -------------------------------- ### Asynchronously Execute Media Information Session Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Start an asynchronous MediaInformation session execution. This method returns immediately without waiting for the process to finish. A timeout can also be specified. ```dart static Future asyncGetMediaInformationExecute( MediaInformationSession mediaInformationSession, [int? waitTimeout = null,] ) ``` -------------------------------- ### Get All FFmpeg Sessions Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit_config.md Retrieves a list of all sessions specifically related to FFmpeg operations from the history. ```dart static Future> getFFmpegSessions() ``` -------------------------------- ### Get Chapter ID Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the unique identifier for the chapter. Returns null if the ID is not available. ```dart int? getId() ``` -------------------------------- ### Execute FFmpeg Command Asynchronously (Arguments List) Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/ffmpeg_kit.md Starts an asynchronous FFmpeg execution with arguments provided as a list. This method returns immediately, allowing for non-blocking operations. Callbacks can be provided for completion, logs, and statistics. ```dart final args = ['-i', 'input.mp4', '-c:v', 'mpeg4', 'output.mp4']; FFmpegKit.executeWithArgumentsAsync( args, (session) { print('Complete'); } ); ``` -------------------------------- ### Get Stream Type Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the type of the media stream, such as 'video', 'audio', 'subtitle', or 'data'. ```dart String? getType() ``` -------------------------------- ### Get Size - MediaInformation Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/api-reference/data_classes.md Retrieves the file size in bytes as a string. Returns null if not available. ```dart String? getSize() ``` -------------------------------- ### Execute FFmpeg/FFprobe/MediaInformation Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Direct execution methods for FFmpeg, FFprobe, and MediaInformation. ```dart FFmpegKitConfig.ffmpegExecute() ``` ```dart FFmpegKitConfig.ffprobeExecute() ``` ```dart FFmpegKitConfig.getMediaInformationExecute() ``` -------------------------------- ### Log Redirection Strategy Source: https://github.com/sk3llo/ffmpeg_kit_flutter/blob/master/_autodocs/INDEX.md Get the current log redirection strategy and set a new one. ```dart FFmpegKitConfig.getLogRedirectionStrategy() ``` ```dart FFmpegKitConfig.setLogRedirectionStrategy() ```