GithubHelp home page GithubHelp logo

liuchaopan / ffmpegcmdsdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mengzhidaren/ffmpegcmdsdk

0.0 1.0 0.0 52.69 MB

ffmpeg and ffprobe android command line tools

Java 6.37% C 92.44% Shell 0.98% CMake 0.21%

ffmpegcmdsdk's Introduction

#ffmpeg and ffprobe android command line tools

FFMPEG(4.1.3 官网2019-07-05最新版本)

  1. ffmpeg日志回调接口
  2. ffmpeg增加监听百分比进度(需要获取转码后视频的总时间 具体看demo)
ffmpeg需要单例运行  
如:转码mp4 CPU利用率80%以上 其它视频不低于60%间波动  (冬天暖手宝)

FFPROBE

  1. ffprobe 只实现了返回 json 回调
  2. ffprobe线程和ffmpeg线程独立运行

注意编解码器

如果编码器全开放 库文件就太大了
解码器全部放开了 但是编码器只有aac 和 libx264  所以大部分手机基本都支持了
--disable-encoders 
--enable-encoder=aac 
--enable-encoder=libx264 
--enable-encoder=png 
--enable-encoder=mjpeg

如果对编码器有特殊需求的可以重新编译库文件
重新裁剪编码器解决问题

review runing

Gradle

implementation 'com.yyl.ffmpeg:ffmpeg_cmd:4.1.3'

目前支持的库 armeabi-v7a  arm64-v8a 也可以参考build_android.sh脚本定制
 ndk {
            abiFilters "armeabi-v7a","arm64-v8a" 
      }

java Code

    
   //ffprobe -v error -print_format json -select_streams v:0 -show_entries stream=width,height,index inputFile
    String cmd = "ffprobe -v quiet -print_format json -show_format -i " +inputFile;
    String json = FFmpegUtils.getInstance().execffprobe(cmd);
  
    String cmd = "ffmpeg -h"
    int code = FFmpegUtils.getInstance().execffmpeg(cmd,callback);
    

####编译版本号官网2019-07-05最新版本ffmpeg和h264

License

MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.