FFmpegKit Test
repository·main·Indexed 41 days ago
https://github.com/arthenica/ffmpeg-kit-testA suite of reference applications for Android, iOS, Flutter, React Native, Linux, macOS, and tvOS designed to demonstrate the capabilities of the FFmpegKit library, including command execution, video and audio encoding, and pipe operations.
What's inside FFmpegKit Test
- FFmpegKit Flutter provides FFmpeg capabilities for Flutter applications. It allows developers to perform various media processing tasks (such as transcoding, filtering, and muxing) within a Flutter environment using the FFmpeg engine.
Overview of FFmpegKit ReactNative
mainFFmpegKit ReactNative provides FFmpeg capabilities for React Native applications. It allows developers to perform video and audio processing tasks directly within a React Native environment using the FFmpeg engine.Overview of FFmpegKit Test applications
mainFFmpegKit Test is a collection of test applications designed to demonstrate the capabilities of FFmpegKit. These applications are identical across platforms and provide a way to verify command execution, media encoding, and other FFmpeg-related tasks in a real-world environment.
Supported features demonstrated in these applications include:
- Command execution
- Video encoding
- Accessing HTTPS URLs
- Audio encoding
- Burning subtitles
- Video stabilization
- Pipe operations
- Concurrent command execution
Platform-specific features:
- Android and React Native (on Android): Include a Storage Access Framework (SAF) tab to demonstrate how to use SAF URIs with
FFmpegKit.
Build the FFmpegKit Linux test application
mainTo build the test application that depends on a local
ffmpeg-kitbuild, you must usecmaketo point to the location of your localffmpeg-kitlibrary bundle using theFFMPEG_KIT_LIBRARY_PATHflag.Prerequisites
cmake> 3.7- C++ compiler with C++11 support
libgtkmm-3.0-dev> 3.0
Build Steps
- Create a build directory and enter it.
- Configure the project with
cmake, providing the path to your localffmpeg-kitlibrary bundle via-DFFMPEG_KIT_LIBRARY_PATH. - Run
maketo compile the application. - (Optional) Run
make installto install the library.
mkdir build cd build cmake -DFFMPEG_KIT_LIBRARY_PATH=/path/to/your/ffmpeg-kit/lib .. make make installRun the FFmpegKit Linux test application
mainAfter building and installing the application via
make install, you can execute the test application using theffmpeg-kit-linux-test-app.shscript located in thebindirectory../ffmpeg-kit-linux-test-app.shCustomize the iOS launch screen assets
mainTo change the image displayed during the app launch on iOS, you can replace the existing image files in the
flutter/test-app-pub/ios/Runner/Assets.xcassets/LaunchImage.imageset/directory with your own assets.Alternatively, you can manage these assets using Xcode:
- Open the iOS workspace using
open ios/Runner.xcworkspace. - In the Xcode Project Navigator, navigate to
Runner/Assets.xcassets. - Drag and drop your desired images into the asset catalog to replace the launch screen images.
open ios/Runner.xcworkspace- Open the iOS workspace using
Configure Metro for the local dependency test app
mainThe
metro.config.jsfile in thereact-native/test-app-local-dependencydirectory uses the standard React Native Metro configuration pattern. It initializes the configuration by merging a customconfigobject with the default configuration provided by@react-native/metro-configusingmergeConfig. This ensures that all standard React Native assets and modules are correctly resolved while allowing for local overrides.const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); const config = {}; module.exports = mergeConfig(getDefaultConfig(__dirname), config);Configure Metro for the React Native test app
mainThe project uses the standard Metro bundler configuration pattern for React Native. It utilizes
@react-native/metro-configto merge a custom configuration object with the default React Native Metro configuration. This ensures that the project maintains compatibility with the default React Native environment while allowing for local overrides in theconfigobject.const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); const config = {}; module.exports = mergeConfig(getDefaultConfig(__dirname), config);Available FFmpegKit Test versions by platform
mainThe test applications are organized into platform-specific folders and are tagged according to the specific
ffmpeg-kitrelease they depend on. You can find the source code for specific versions by navigating to the corresponding tags in the repository.Supported Platforms:
- Android
- Flutter
- iOS
- Linux
- macOS
- React Native
- tvOS