FFmpegKit Test

repository·main·Indexed 41 days ago

https://github.com/arthenica/ffmpeg-kit-test

A 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.

Tokens
1.2K
Snippets
5
Records
9
Agent score
51%

What's inside FFmpegKit Test

  1. Overview of FFmpegKit Test applications

    main

    FFmpegKit 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.
  2. Build the FFmpegKit Linux test application

    main

    To build the test application that depends on a local ffmpeg-kit build, you must use cmake to point to the location of your local ffmpeg-kit library bundle using the FFMPEG_KIT_LIBRARY_PATH flag.

    Prerequisites

    • cmake > 3.7
    • C++ compiler with C++11 support
    • libgtkmm-3.0-dev > 3.0

    Build Steps

    1. Create a build directory and enter it.
    2. Configure the project with cmake, providing the path to your local ffmpeg-kit library bundle via -DFFMPEG_KIT_LIBRARY_PATH.
    3. Run make to compile the application.
    4. (Optional) Run make install to install the library.
    mkdir build
    cd build
    cmake -DFFMPEG_KIT_LIBRARY_PATH=/path/to/your/ffmpeg-kit/lib ..
    make
    make install
  3. Customize the iOS launch screen assets

    main

    To 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:

    1. Open the iOS workspace using open ios/Runner.xcworkspace.
    2. In the Xcode Project Navigator, navigate to Runner/Assets.xcassets.
    3. Drag and drop your desired images into the asset catalog to replace the launch screen images.
    open ios/Runner.xcworkspace
  4. Configure Metro for the local dependency test app

    main

    The metro.config.js file in the react-native/test-app-local-dependency directory uses the standard React Native Metro configuration pattern. It initializes the configuration by merging a custom config object with the default configuration provided by @react-native/metro-config using mergeConfig. 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);
  5. Configure Metro for the React Native test app

    main

    The project uses the standard Metro bundler configuration pattern for React Native. It utilizes @react-native/metro-config to 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 the config object.

    const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
    
    const config = {};
    
    module.exports = mergeConfig(getDefaultConfig(__dirname), config);
  6. Available FFmpegKit Test versions by platform

    main

    The test applications are organized into platform-specific folders and are tagged according to the specific ffmpeg-kit release 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