You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Kemp Xu 75efdbaea1 Optimize ffmpeg build scripts 3 years ago
app Add publish script & update publish version 5 years ago
gradle/wrapper Initial commit 5 years ago
library Add publish script & update publish version 5 years ago
.gitignore Optimize ffmpeg build scripts 3 years ago
README.md Add publish script & update publish version 5 years ago
build.gradle Config publish library to jcenter 5 years ago
build_ffmpeg.sh Optimize ffmpeg build scripts 3 years ago
gradle.properties Initial commit 5 years ago
gradlew Initial commit 5 years ago
gradlew.bat Initial commit 5 years ago
publish.bat Add publish script & update publish version 5 years ago
publish.sh Add publish script & update publish version 5 years ago
secret.gradle Config publish library to jcenter 5 years ago
settings.gradle Add library module 5 years ago

README.md

FFmpeg-Invoker

FFmpeg invoker

Download

implementation 'com.github.xch168:ffmpeg-invoker:0.0.2'

The Library supports three cpu abi: armeabi-v7a, arm64-v8a, x86. If you don't need x86 lib, you can exclude it according to the following configuration:

android {
    ...
    packagingOptions {
        exclude 'lib/x86/*.so'
    }
}

Usage

// you can use FFmpegCmd to build an ffmpeg command
// For example: ffmpeg -y -ss 1 -t 100 -accurate_seek -i + videoPath + -codec copy + savePath
FFmpegCmd cmd = new FFmpegCmd();
cmd.append("-ss").append(1);
cmd.append("-t").append(500);
cmd.append("-accurate_seek");
cmd.append("-i").append(videoPath2);
cmd.append("-codec").append("copy");
cmd.append(savePath);

FFmpegInvoker.exec(cmd.build(), new FFmpegInvoker.Callback() {
    @Override
    public void onSuccess() {

    }

    @Override
    public void onFailure() {

    }

    @Override
    public void onProgress(float percent) {

    }
});

Build FFmpeg

$ git clone git@github.com:xch168/FFmpeg-Invoker.git
$ cd FFmpeg-Invoker
$ ./build_ffmpeg.sh

License

Copyright (c) 2020-present. xch168

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.